[ http://jira.codehaus.org/browse/MRELEASE-285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier reopened MRELEASE-285: -------------------------------- > Unresolved test-jar dependency during release > --------------------------------------------- > > Key: MRELEASE-285 > URL: http://jira.codehaus.org/browse/MRELEASE-285 > Project: Maven 2.x Release Plugin > Issue Type: Bug > Affects Versions: 2.0-beta-4 > Environment: Maven version: 2.0.7 > Java version: 1.5.0_07 > OS name: "mac os x" version: "10.4.10" arch: "i386" > Reporter: Rod Coffin > Fix For: 2.0 > > Attachments: example.jar > > > I have a multi-module project where one project produces a normal jar and a > test-jar > (http://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html). > Another submodule has a test scoped dependency on the test-jar from the first > submodule. For example, this is the structure and produced artifacts for a > small sample (attached) I built to reproduce this behavior: > release-test-jar (parent project) > project-with-test-jar (submodule) > => project-with-test-jar-1.0.jar > => project-with-test-jar-1.0-tests.jar > project-using-test-jar (submodule) > => project-user-test-jar-1.0.jar > When I run a 'clean install' the build succeeds. However, when I run a > 'release:prepare' the build fails with the following error: > 1 required artifact is missing. > for artifact: > com.rfc:project-using-test-jar:jar:1.1 > from the specified remote repositories: > central (http://repo1.maven.org/maven2) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:556) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) > 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:585) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: > org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: > Missing: > ---------- > 1) com.rfc:project-with-test-jar:test-jar:tests:1.1 > Try downloading the file manually from the project website. > Then, install it using the command: > mvn install:install-file -DgroupId=com.rfc > -DartifactId=project-with-test-jar \ > -Dversion=1.1 -Dclassifier=tests -Dpackaging=test-jar > -Dfile=/path/to/file > Alternatively, if you host your own repository you can deploy the file there: > mvn deploy:deploy-file -DgroupId=com.rfc > -DartifactId=project-with-test-jar \ > -Dversion=1.1 -Dclassifier=tests -Dpackaging=test-jar > -Dfile=/path/to/file \ > -Durl=[url] -DrepositoryId=[id] > Path to dependency: > 1) com.rfc:project-using-test-jar:jar:1.1 > 2) com.rfc:project-with-test-jar:test-jar:tests:1.1 > ---------- > 1 required artifact is missing. > for artifact: > com.rfc:project-using-test-jar:jar:1.1 > from the specified remote repositories: > central (http://repo1.maven.org/maven2) > at > org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:305) > at > org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:272) > at > org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1238) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:397) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) > Judging from the stack trace this problem seems to occur during dependency > resolution as is declared PrepareReleaseMojo with the annotation > "@requiresDependencyResolution test". -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira