-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
Powered by SuggestiMate
Given two Maven2 projects:
Project A (POM only)
Project B (Jar), has A as parent (build when SNAPSHOT-dependencies are built)
Now, when A is built (#1), a build of B (#1) is correctly triggered. A shows a DS dependency to B, B an US dependency to A.
However, when viewing build #1 of A, it shows a downstream dependency to B without a specific build number (none).
When comparing both projects via "project dependecies", no dependencies are shown, which is plainly wrong.
A small change to MavenFingerprinter should do the trick.
[JENKINS-8383] Maven Jobs should include their parent POM's fingerprint to correctly link projects
Confirm:
create a Maven Project building the parent
create a different Maven Project using the parent artifact as parent
build the parent project
build the child project
parent project has parent.pom as fingerprint
child project has child.pom as fingerprint BUT NOT parent.pom
parent project has a downstream dependency to child (correct)
no build parent again, child should be built as well.
compare both projects using "project dependencies" -> no common artifacts.
Code changed in jenkins
User: Christoph Kutzinski
Path:
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/9015b0bd0a40602eac35c55abc7c3829848752ce
Log:
Merge pull request #225 from pauxus/master
JENKINS-8383 Record fingerprints for parent POMs, too
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/38e5d115c9beece378082542c55ddbc5013caf57
Log:
minor follow up and changelog for JENKINS-8383
Integrated in jenkins_main_trunk #1107
JENKINS-8383 record fingerprints of ancestor poms
JENKINS-8383 Fixed parent fingerprinting for relativePath style
stephan : 5d202a2b9902082e9a44a2e0f5834e941b2c36dc
Files :
- maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
stephan : 6f389236eaaf799a07b53ffd7f1aed996bdb95c3
Files :
- maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
I just tried it at my local instance and got:
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.apache.maven.project.MavenProject.getProjectBuildingRequest()Lorg/apache/maven/project/ProjectBuildingRequest;
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.getProjectBuildingRequest()Lorg/apache/maven/project/ProjectBuildingRequest;
at hudson.maven.reporters.MavenFingerprinter.recordParents(MavenFingerprinter.java:141)
at hudson.maven.reporters.MavenFingerprinter.postBuild(MavenFingerprinter.java:100)
at hudson.maven.MavenModuleSetBuild$Builder.postModule(MavenModuleSetBuild.java:1037)
at hudson.maven.MavenBuilder$Adapter.fireLeaveModule(MavenBuilder.java:353)
at hudson.maven.MavenBuilder$Adapter.postBuild(MavenBuilder.java:311)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:68)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at hudson.maven.agent.Main.launch(Main.java:173)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:164)
at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:987)
at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:918)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:283)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Thu Sep 08 14:33:39 CEST 2011
[INFO] Final Memory: 44M/564M
[INFO] ------------------------------------------------------------------------
channel stopped
Looks like it only works with Maven 3+
BTW: thanks to Maven folks for NOT adding a @since to getProjectBuildingRequest()
Could you have a look and try to rework the pull request to work with Maven2, too?
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/db23d8cf788f2d1748d63e5049264d1adc8f0856
Log:
Revert JENKINS-8383 as it didn't work with Maven 2
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/ab1eed1488923415754719a87e887c66cfff343e
Log:
Revert JENKINS-8383 as it didn't work with Maven 2(cherry picked from commit db23d8cf788f2d1748d63e5049264d1adc8f0856)
Conflicts:
changelog.html
Actually, the only quick option that I see right now is to simply exclude the local-repo resolution when a Maven version 2.0.x is used.
It doesn't work for Maven 2.2, since ProjectBuildConfiguration provided by MavenProject is empty. For now, only consider Maven3 for local Repo resolve (relativePath resolve DOES work with Maven2) - Creating another pull request.
Code changed in jenkins
User: Stephan Pauxberger
Path:
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/5d202a2b9902082e9a44a2e0f5834e941b2c36dc
Log:
JENKINS-8383 record fingerprints of ancestor poms
Code changed in jenkins
User: Stephan Pauxberger
Path:
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/6f389236eaaf799a07b53ffd7f1aed996bdb95c3
Log:
JENKINS-8383 Fixed parent fingerprinting for relativePath style
parents
Code changed in jenkins
User: Christoph Kutzinski
Path:
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/9015b0bd0a40602eac35c55abc7c3829848752ce
Log:
Merge pull request #225 from pauxus/master
JENKINS-8383 Record fingerprints for parent POMs, too
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/38e5d115c9beece378082542c55ddbc5013caf57
Log:
minor follow up and changelog for JENKINS-8383
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/db23d8cf788f2d1748d63e5049264d1adc8f0856
Log:
Revert JENKINS-8383 as it didn't work with Maven 2
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/ab1eed1488923415754719a87e887c66cfff343e
Log:
Revert JENKINS-8383 as it didn't work with Maven 2(cherry picked from commit db23d8cf788f2d1748d63e5049264d1adc8f0856)
Conflicts:
changelog.html
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/4dc4678fd85c790fb619acb6e3c1cea7181863ce
Log:
Changelog for JENKINS-8383 and JENKINS-11073
Compare: https://github.com/jenkinsci/jenkins/compare/a7ce870...4dc4678
Integrated in jenkins_main_trunk #1283
JENKINS-8383 recreated changes
JENKINS-8383 Do not attempt to resolve parent with Maven 2.0
JENKINS-8383 Maven 2.2 Project does not return a BuilderConfiguration,
Changelog for JENKINS-8383 and JENKINS-11073
stephan : 85b9c503c02c9e44216cdba72a78f612c8299a52
Files :
- maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
- changelog.html
stephan : 8e334165309db82ca56be7c813ad7b9294376bce
Files :
- maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
stephan : b82d07712e5003cebace29e5d25fdc61f1751390
Files :
- maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
Christoph Kutzinski : 4dc4678fd85c790fb619acb6e3c1cea7181863ce
Files :
- changelog.html
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/jenkins/38aa485883b3304b919101b4730485f45b988ed4
Log:
Make parent POM fingerprinting work with Maven 2.2, too JENKINS-8383
Integrated in jenkins_main_trunk #1285
Make parent POM fingerprinting work with Maven 2.2, too JENKINS-8383
Christoph Kutzinski : 38aa485883b3304b919101b4730485f45b988ed4
Files :
- changelog.html
- maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
Code changed in jenkins
User: Stephan Pauxberger
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/7468a99eb37b75ad20d3937c0e57fe40703c44ae
Log:
JENKINS-8383 record fingerprints of ancestor poms
Originally-Committed-As: 5d202a2b9902082e9a44a2e0f5834e941b2c36dc
Code changed in jenkins
User: Stephan Pauxberger
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/cf49b58dc7e1808dbb89a8af596a108bb48cfab4
Log:
JENKINS-8383 Fixed parent fingerprinting for relativePath style
parents
Originally-Committed-As: 6f389236eaaf799a07b53ffd7f1aed996bdb95c3
Code changed in jenkins
User: Christoph Kutzinski
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/ee60a842bc0e0bf92feaa596b9da43181697a226
Log:
Merge pull request #225 from pauxus/master
JENKINS-8383 Record fingerprints for parent POMs, too
Originally-Committed-As: 9015b0bd0a40602eac35c55abc7c3829848752ce
Code changed in jenkins
User: Christoph Kutzinski
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/6cfc8b9a2f24f24795c92a4585121d83e9cae1ed
Log:
minor follow up and changelog for JENKINS-8383
Originally-Committed-As: 38e5d115c9beece378082542c55ddbc5013caf57
Code changed in jenkins
User: Christoph Kutzinski
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/f98b3d4068dafe794c31bfdadf432e8b682353b6
Log:
Revert JENKINS-8383 as it didn't work with Maven 2
Originally-Committed-As: db23d8cf788f2d1748d63e5049264d1adc8f0856
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/b5352e26565df87cad343e87590405feb21bcaf4
Log:
Revert JENKINS-8383 as it didn't work with Maven 2(cherry picked from commit db23d8cf788f2d1748d63e5049264d1adc8f0856)
Conflicts:
changelog.html
Originally-Committed-As: ab1eed1488923415754719a87e887c66cfff343e
Code changed in jenkins
User: Stephan Pauxberger
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/7cd8f4e6932cb521bfe5c8b7c4441c32ba3c5e13
Log:
JENKINS-8383 recreated changes
Originally-Committed-As: 85b9c503c02c9e44216cdba72a78f612c8299a52
Code changed in jenkins
User: Stephan Pauxberger
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/02a08e038bc5f1d1a68c6c5485b60027e2e176ec
Log:
JENKINS-8383 Do not attempt to resolve parent with Maven 2.0
Originally-Committed-As: 8e334165309db82ca56be7c813ad7b9294376bce
Code changed in jenkins
User: Stephan Pauxberger
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/302289501379d0cdae7bc81977c9e035fe3e6b76
Log:
JENKINS-8383 Maven 2.2 Project does not return a BuilderConfiguration,
only resolve parent artifact for Maven 3+
Originally-Committed-As: b82d07712e5003cebace29e5d25fdc61f1751390
Code changed in jenkins
User: Christoph Kutzinski
Path:
src/main/java/hudson/maven/reporters/MavenFingerprinter.java
http://jenkins-ci.org/commit/maven-plugin/5add57a49d3aa455647ccbc2c9ef4666b44d5afa
Log:
Make parent POM fingerprinting work with Maven 2.2, too JENKINS-8383
Originally-Committed-As: 38aa485883b3304b919101b4730485f45b988ed4
If you've already identified the necessary change to MavenFingerprinter, could you please do it on Github and open a pull request?