Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Auto Closed
-
2.1.3
-
None
-
None
Description
In a project we're using the maven ant tasks to manage dependencies via pom.xml. Recently one of our third party libraries pom changed so the following invocation failed during build:
<artifact:mvn pom="../pom.xml"> <arg value="validate"/> </artifact:mvn>
I tried to perform the same invocation with maven 3.0.4 on the cmdline with the same results. After googling I found this: http://jira.codehaus.org/browse/MDEP-356 and updated the dependency plugin in our pom to 2.5.1 and that worked for us.
As a workaround I set the mvnhome on the task to my local maven installation, but now the build is less environment agnostic.
Any chances that the dependency plugin fix will be integrated into maven ant tasks in the near future?
Here comes the log:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.901s [INFO] Finished at: Mon Oct 01 10:49:32 CEST 2012 [INFO] Final Memory: 19M/200M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.4:purge-local-repository (purge-local-repository) on project cs-abc-srv: Faile d to refresh project dependencies for: com.mycompany.cs:cs-abc-srv:ejb:1.0.0: Failed to refresh project dependencies for: com.mycompany.cs:cs-abc-srv:ejb:1.0.0: [ERROR] Artifact resolution failed for project: com.mycompany.cs:cs-abc-srv:ejb:1.0.0: required artifacts missing: [ERROR] com.mycompany.connector:myconnector:jar:1.1.2-SNAPSHOT [ERROR] [ERROR] for the artifact: [ERROR] com.mycompany.cs:cs-abc-srv:ejb:1.0.0 [ERROR] [ERROR] from the specified remote repositories: [ERROR] nexus (http://192.168.1.1:8081/nexus/content/groups/public, releases=true, snapshots=true) [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.4:purge-local-repository (purg e-local-repository) on project cs-abc-srv: Failed to refresh project dependencies for: com.mycompany.cs:cs-abc-srv:ejb:1.0.0 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoFailureException: Failed to refresh project dependencies for: com.mycompany.cs:cs-abc-srv:ejb:1.0.0 at org.apache.maven.plugin.dependency.PurgeLocalRepositoryMojo.execute(PurgeLocalRepositoryMojo.java:196) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: required artifacts missing: com.mycompany.connector:myconnector:jar:1.1.2-SNAPSHOT for the artifact: com.mycompany.cs:cs-abc-srv:ejb:1.0.0 from the specified remote repositories: nexus (http://192.168.1.1:8081/nexus/content/groups/public, releases=true, snapshots=true) at org.apache.maven.plugin.dependency.PurgeLocalRepositoryMojo.refreshDependenciesForProject(PurgeLocalRepositoryMojo.java:421) at org.apache.maven.plugin.dependency.PurgeLocalRepositoryMojo.execute(PurgeLocalRepositoryMojo.java:192)