[ 
https://issues.apache.org/jira/browse/PROTON-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13885885#comment-13885885
 ] 

Robbie Gemmell commented on PROTON-499:
---------------------------------------

This wasnt really a circular dependency as such, instead more of an unenforced 
ordering requirement. While it could use the artifacts from a previous build 
(as its really meant to be able to, for what it thinks are independent modules) 
it typically wouldnt be doing so.

The main reason you saw a problem (which admittedly is still quite an 
annoyance) is that the 'tests' module depended on the test jar from the 
proton-j module, which you explicitly didnt create by only running 'maven 
compile'. I have run the build on a number of fresh boxes recently without 
issue, the main diference being that the more typical 'maven test' or 'maven 
install' commands create the test artifacts for project-j before ever getting 
to the 'tests' module ('maven test-compile' might also have worked due to being 
in the same reactor build, not sure), which would then pick up the necessary 
artifact from the current reactor build. When using 'maven compile' by itself, 
it would have either been picking up a previously installed version if you had 
recently done that, or instead been hitting the Apache snapshots repository 
occasionally to download the nightly build, hence the offline flag making the 
difference when your local repo was cleared.

> maven build is circularly dependent
> -----------------------------------
>
>                 Key: PROTON-499
>                 URL: https://issues.apache.org/jira/browse/PROTON-499
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: 0.6
>            Reporter: Rafael H. Schloming
>            Assignee: Rafael H. Schloming
>             Fix For: 0.7
>
>
> The maven build depends on the binaries from the output of the prior 
> iteration of the build. This is a bit hard to notice because maven seems to 
> be downloading snapshot binaries from somewhere. Reproduce with the following 
> steps:
> # First ensure legitimate dependencies are downloaded:
> mvn compile
> # now blow away snapshots that should not be needed for a clean build
> rm -rf ~/.m2/repository/org/apache/qpid/
> # now run an offline build
> mvn -o compile
> You should see this failure:
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-remote-resources-plugin:1.4:process (default) 
> on project proton-tests: Failed to resolve dependencies for one or more 
> projects in the reactor. Reason: Missing:
> [ERROR] ----------
> [ERROR] 1) org.apache.qpid:proton-j-impl:test-jar:tests:1.0-SNAPSHOT
> [ERROR] 
> [ERROR] Try downloading the file manually from the project website.
> [ERROR] 
> [ERROR] Then, install it using the command:
> [ERROR] mvn install:install-file -DgroupId=org.apache.qpid 
> -DartifactId=proton-j-impl -Dversion=1.0-SNAPSHOT -Dclassifier=tests 
> -Dpackaging=test-jar -Dfile=/path/to/file
> [ERROR] 
> [ERROR] Alternatively, if you host your own repository you can deploy the 
> file there:
> [ERROR] mvn deploy:deploy-file -DgroupId=org.apache.qpid 
> -DartifactId=proton-j-impl -Dversion=1.0-SNAPSHOT -Dclassifier=tests 
> -Dpackaging=test-jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> [ERROR] 
> [ERROR] Path to dependency:
> [ERROR] 1) org.apache.qpid:proton-tests:jar:1.0-SNAPSHOT
> [ERROR] 2) org.apache.qpid:proton-j-impl:test-jar:tests:1.0-SNAPSHOT
> [ERROR] 
> [ERROR] ----------
> [ERROR] 1 required artifact is missing.
> [ERROR] 
> [ERROR] for artifact:
> [ERROR] org.apache.qpid:proton-tests:jar:1.0-SNAPSHOT
> [ERROR] 
> [ERROR] from the specified remote repositories:
> [ERROR] apache.snapshots (http://repository.apache.org/snapshots, 
> releases=false, snapshots=true),
> [ERROR] central (http://repo.maven.apache.org/maven2, releases=true, 
> snapshots=false)
> [ERROR] -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> [ERROR] 
> [ERROR] After correcting the problems, you can resume the build with the 
> command
> [ERROR]   mvn <goals> -rf :proton-tests



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to