sonatype / nexus-ruby-support

26 stars 7 forks source link

Problems compiling this plugin with Maven #48

Closed KAllan357 closed 10 years ago

KAllan357 commented 10 years ago

I think some of the poms are messed up now? (maybe because of the changes to the root pom.xml in 56f85d5289699f28c02e67214fcc09412274a7f3)

[kallan@KAlla1ml1:~/src/nexus-ruby-support] (master) C  $ mvn clean install -Dmaven.test.skip
[INFO] Scanning for projects...
[ERROR] The build could not read 3 projects -> [Help 1]
[ERROR]
[ERROR]   The project org.sonatype.nexus.plugins:nexus-ruby-plugin:1.1.0-SNAPSHOT (/Users/kallan/src/nexus-ruby-support/nexus-ruby-plugin/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact org.sonatype.nexus.ruby:nexus-ruby-support:pom:1.1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.sonatype.nexus.plugins:nexus-ruby-plugin-its:1.1.0-SNAPSHOT (/Users/kallan/src/nexus-ruby-support/nexus-ruby-plugin-its/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact org.sonatype.nexus.ruby:nexus-ruby-support:pom:1.1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.sonatype.nexus.ruby:nexus-ruby-tools:1.1.0-SNAPSHOT (/Users/kallan/src/nexus-ruby-support/nexus-ruby-tools/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact org.sonatype.nexus.ruby:nexus-ruby-support:pom:1.1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

If I mess around with some of the versioning in the parent pom, it leads me to a slightly different error, that may also be preventing my success:

Detected Maven Version: 3.1.0 is not in the allowed range [3.0.4,3.1).

Maybe this is on my end, though I'm not sure where the Enforcer plugin is being included / used.

KAllan357 commented 10 years ago

Sorry this might be just my mistake. My settings.xml got wiped away somehow and I was unable to resolve jars. I'm still having problems on my end, so I will close this for now and reopen if something comes up once I think my environment is fixed.

mkristian commented 10 years ago

it is possible that things got messed up a bit. just reopen the issue if the problem persists !!

KAllan357 commented 10 years ago

Apologies for the confusion, I have fixed up my settings.xml and verified I have the appropriate group repo settings.

This error that I am getting might be real though:

[INFO] Nexus Ruby Plugin ................................. FAILURE [0.560s]
...
[ERROR] Failed to execute goal on project nexus-ruby-plugin: Could not resolve dependencies for project org.sonatype.nexus.plugins:nexus-ruby-plugin:nexus-plugin:1.1.0-SNAPSHOT: Failure to find org.sonatype.nexus.ruby:nexus-ruby-tools:jar:1.1.1 in <group nexus> was cached in the local repository, resolution will not be reattempted until the update inte

Possibly because of a missing version element on the nexus-ruby-tools dependency in nexus-ruby-plugin/pom.xml? I see the same error in the nexus-ruby-plugin-its/pom.xml.

bdellegrazie commented 10 years ago

@mkristian There are still three further problems after you fixed the parent/version to 1.2.0-SNAPSHOT for all modules:

  1. nexus-ruby-plugin/pom.xml still contains a reference to ${nexus.version} which is not defined (to the best of my knowledge)
  2. building with -Dmaven.test.skip fails because the 'jar:test-jar' goal of nexus-ruby-tools-1.2.0-SNAPSHOT-test.jar is skipped - therefore the nexus-ruby-support-its build fails as its dependencies cannot be satisfied.
  3. building without -Dmaven.test.skip I get test failures:
test_0006_should_merge_the_dependencies_map_in_the_given_order(Nexus::BundlerDependencies) [/srv/jenkins/jobs/nexus-ruby-support/workspace/nexus-ruby-tools/src/test/minispecs/bundler_dependencies_spec.rb:88]:
[INFO] Expected {"0.33.0-ruby"=>[], "0.33.1-ruby"=>[["virtus", "~> 0.5"]], "0.29.0-ruby"=>[], "0.29.1-ruby"=>[], "0.29.2-ruby"=>[], "0.29.3-ruby"=>[], "0.30.0-ruby"=>[], "0.31.0-ruby"=>[], "0.32.0-ruby"=>[], "0.32.1-ruby"=>[], "0.32.3-ruby"=>[], "0.32.4-ruby"=>[], "0.32.5-ruby"=>[], "0.33.2-ruby"=>[["virtus", "~> 0.5"]], "0.33.3-ruby"=>[["virtus", "~> 0.5"]], "0.33.4-ruby"=>[["virtus", "~> 0.5"]], "0.33.5-ruby"=>[["virtus", "~> 0.5"]]} to not be equal to {"0.33.0-ruby"=>[], "0.33.1-ruby"=>[["virtus", "~> 0.5"]], "0.29.0-ruby"=>[], "0.29.1-ruby"=>[], "0.29.2-ruby"=>[], "0.29.3-ruby"=>[], "0.30.0-ruby"=>[], "0.31.0-ruby"=>[], "0.32.0-ruby"=>[], "0.32.1-ruby"=>[], "0.32.3-ruby"=>[], "0.32.4-ruby"=>[], "0.32.5-ruby"=>[], "0.33.2-ruby"=>[["virtus", "~> 0.5"]], "0.33.3-ruby"=>[["virtus", "~> 0.5"]], "0.33.4-ruby"=>[["virtus", "~> 0.5"]], "0.33.5-ruby"=>[["virtus", "~> 0.5"]]}.
mkristian commented 10 years ago

ad 1) that is set by the parentorg.sonatype.nexus.plugins:nexus-plugins:2.7.0-06

ad 2) ok - that is right. I will do something about it

ad 3) I will see to this.

mkristian commented 10 years ago

so mvn install -Dmaven.test.skip should work now.

the test failures with nexus-ruby-tools I still need a way to reproduce it :(

bdellegrazie commented 10 years ago

@mkristian All working now! I think the test failures are specific to my environment as it works locally on my system but not in Jenkins on my server. I think you can close this issue. Thank you.

mkristian commented 10 years ago

my last commit 461fac1 also tries to fix the failing spec. it looks like that it did depend how the directory listing gets ordered. could you please check this one out now - since I can not reproduce it. would be just nice to have the spec working on different environments as expected.

bdellegrazie commented 10 years ago

Similar problem:

[INFO] --- minitest-maven-plugin:1.0.0-rc4:spec (default) @ nexus-ruby-tools ---
[INFO] 
[INFO]  run with jruby 1.7.6
[INFO] 
[INFO] Run options: --seed 46162
[INFO] 
[INFO] # Running tests:
[INFO] 
[INFO] F..........["target/broken/gems/n/nexus-0.2.0.gem"]
[INFO] "target/broken/gems/*/*.gem"
[INFO] Generating Marshal quick index gemspecs for 1 gems
[INFO] .
[INFO] Complete
[INFO] Generated Marshal quick index gemspecs: 0.020s
[INFO] ["target/broken/gems/n/nexus-0.2.0.gem"]
[INFO] "target/broken/gems/*/*.gem"
[INFO] Generating Marshal master index
[INFO] Generated Marshal master index: 0.003s
[INFO] Generating specs index
[INFO] Generated specs index: 0.012s
[INFO] Generating latest specs index
[INFO] Generated latest specs index: 0.001s
[INFO] Generating prerelease specs index
[INFO] Generated prerelease specs index: 0.000s
[INFO] Compressing indicies
[INFO] Compressed indicies: 0.013s
[INFO] ....
[INFO] 
[INFO] Finished tests in 2.422000s, 6.1932 tests/s, 49.1329 assertions/s.
[INFO] 
[INFO]   1) Failure:
[INFO] test_0006_should_merge_the_dependencies_map_in_the_given_order(Nexus::BundlerDependencies) [/srv/jenkins/jobs/nexus-ruby-support/workspace/nexus-ruby-tools/src/test/minispecs/bundler_dependencies_spec.rb:88]:
[INFO] Expected {"0.33.0-ruby"=>[], "0.33.1-ruby"=>[["virtus", "~> 0.5"]], "0.29.0-ruby"=>[], "0.29.1-ruby"=>[], "0.29.2-ruby"=>[], "0.29.3-ruby"=>[], "0.30.0-ruby"=>[], "0.31.0-ruby"=>[], "0.32.0-ruby"=>[], "0.32.1-ruby"=>[], "0.32.3-ruby"=>[], "0.32.4-ruby"=>[], "0.32.5-ruby"=>[], "0.33.2-ruby"=>[["virtus", "~> 0.5"]], "0.33.3-ruby"=>[["virtus", "~> 0.5"]], "0.33.4-ruby"=>[["virtus", "~> 0.5"]], "0.33.5-ruby"=>[["virtus", "~> 0.5"]]} to not be equal to {"0.33.0-ruby"=>[], "0.33.1-ruby"=>[["virtus", "~> 0.5"]], "0.29.0-ruby"=>[], "0.29.1-ruby"=>[], "0.29.2-ruby"=>[], "0.29.3-ruby"=>[], "0.30.0-ruby"=>[], "0.31.0-ruby"=>[], "0.32.0-ruby"=>[], "0.32.1-ruby"=>[], "0.32.3-ruby"=>[], "0.32.4-ruby"=>[], "0.32.5-ruby"=>[], "0.33.2-ruby"=>[["virtus", "~> 0.5"]], "0.33.3-ruby"=>[["virtus", "~> 0.5"]], "0.33.4-ruby"=>[["virtus", "~> 0.5"]], "0.33.5-ruby"=>[["virtus", "~> 0.5"]]}.
[INFO] 
[INFO] 15 tests, 119 assertions, 1 failures, 0 errors, 0 skips
[INFO] 
[INFO]  Overall Summary
[INFO]  ===============
[INFO]  jruby-1.7.6 mode 1.9: 15 tests, 119 assertions, 1 failures, 0 errors, 0 skips
[INFO] 
[INFO] use '/srv/jenkins/jobs/nexus-ruby-support/workspace/nexus-ruby-tools/target/bin/minitest-runner.rb' for faster command line execution.
mkristian commented 10 years ago

thanx for help.

I made the test pass now and have a closer look it that really is such big issue or just some "nice to have" thingy.

bdellegrazie commented 10 years ago

@mkristian Thank you!

KAllan357 commented 10 years ago

@mkristian This appears to be working now, thanks!