maven-2

Maven: How to check if an artifact exists?

此生再无相见时 提交于 2020-02-20 11:42:26
问题 How do I check from within a Mojo if an artifact already exists in the local repository? I'm installing large binaries into the local Maven repository and I need to know if they already exist before attempting to download them. 回答1: Solved with the help of http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook /** * The local maven repository. * * @parameter expression="${localRepository}" * @required * @readonly */ @SuppressWarnings("UWF_UNWRITTEN_FIELD") private

Maven release:perform without deploy and calling an external shell script

淺唱寂寞╮ 提交于 2020-02-17 06:14:06
问题 I am using the maven release plugin. Problem is simple: I don't want to do a deploy on release:perform. I actually want to execute a shell script that will do the deploy for me. So I have two things to accomplish: Somehow disable the default "deploy" goal from release:perform Somehow make release:perform call the exec:exec plugin to execute a shell script Here is my pom: <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.0</version> <configuration> <tagBase>svn://saoj-la.dyndns

Maven release:perform without deploy and calling an external shell script

亡梦爱人 提交于 2020-02-17 06:13:09
问题 I am using the maven release plugin. Problem is simple: I don't want to do a deploy on release:perform. I actually want to execute a shell script that will do the deploy for me. So I have two things to accomplish: Somehow disable the default "deploy" goal from release:perform Somehow make release:perform call the exec:exec plugin to execute a shell script Here is my pom: <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.0</version> <configuration> <tagBase>svn://saoj-la.dyndns

Maven release:perform without deploy and calling an external shell script

我怕爱的太早我们不能终老 提交于 2020-02-17 06:13:00
问题 I am using the maven release plugin. Problem is simple: I don't want to do a deploy on release:perform. I actually want to execute a shell script that will do the deploy for me. So I have two things to accomplish: Somehow disable the default "deploy" goal from release:perform Somehow make release:perform call the exec:exec plugin to execute a shell script Here is my pom: <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.0</version> <configuration> <tagBase>svn://saoj-la.dyndns

Compilation error in building maven project

一笑奈何 提交于 2020-01-30 10:52:26
问题 we are trying to build and deploy a maven artifact into our Nexus Repository Manager from Jenkins, But we are facing compilation error during the build. This is the error that we are getting.! ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project studentapp: Compilation failure ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] COMPILATION ERROR : [INFO] -------------

Escape property in pom.xml

放肆的年华 提交于 2020-01-30 05:11:08
问题 I would like to escape a property in pom.xml. Not in ressources, I know it is possible with a filter. For example I try to use launch4j plugin like this : <plugin> <groupId>org.bluestemsoftware.open.maven.plugin</groupId> <artifactId>launch4j-plugin</artifactId> <executions> <execution> <id>l4j-cli</id> <phase>install</phase> <goals> <goal>launch4j</goal> </goals> <configuration> <headerType>console</headerType> <outfile>../out.exe</outfile> <dontWrapJar>true</dontWrapJar> <jar>./../out.jar<

How to find out what jar file provides a class during runtime using maven?

血红的双手。 提交于 2020-01-29 21:21:12
问题 I run my application using mvn jetty:run At compile time everything is fine, my row Tidy tidier = new Tidy(); tidier.setInputEncoding("UTF-8"); compiles fine and the classpath shows the appropriate jar. However, at runtime I get the following exception and I cannot undestand why: 2009-11-11 17:48:53.384::WARN: Error starting handlers java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setInputEncoding(Ljava/lang/String;)V I am now thinking maybe there are two different versions of this Tidy in my

How to find out what jar file provides a class during runtime using maven?

自古美人都是妖i 提交于 2020-01-29 21:19:40
问题 I run my application using mvn jetty:run At compile time everything is fine, my row Tidy tidier = new Tidy(); tidier.setInputEncoding("UTF-8"); compiles fine and the classpath shows the appropriate jar. However, at runtime I get the following exception and I cannot undestand why: 2009-11-11 17:48:53.384::WARN: Error starting handlers java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setInputEncoding(Ljava/lang/String;)V I am now thinking maybe there are two different versions of this Tidy in my

How to find out what jar file provides a class during runtime using maven?

老子叫甜甜 提交于 2020-01-29 21:17:52
问题 I run my application using mvn jetty:run At compile time everything is fine, my row Tidy tidier = new Tidy(); tidier.setInputEncoding("UTF-8"); compiles fine and the classpath shows the appropriate jar. However, at runtime I get the following exception and I cannot undestand why: 2009-11-11 17:48:53.384::WARN: Error starting handlers java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setInputEncoding(Ljava/lang/String;)V I am now thinking maybe there are two different versions of this Tidy in my

Configure hibernate 3.6 dependencies

独自空忆成欢 提交于 2020-01-25 10:25:06
问题 I want to use hibernate 3.6 but I can't configure it properly With my maven configuration <hibernate.version>3.6.6.Final</hibernate.version> <dependency> <groupId>org.hibernate.javax.persistence</groupId> <artifactId>hibernate-jpa-2.0-api</artifactId> <version>1.0.0.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId>