Quantcast

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
Alex Koon created JENKINS-12735:
-----------------------------------

             Summary: No upstream or downstream resolution with Maven version ranges
                 Key: JENKINS-12735
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12735
             Project: Jenkins
          Issue Type: Bug
          Components: maven
    Affects Versions: current
            Reporter: Alex Koon


This is essentially reopening JENKINS-2787 (https://issues.jenkins-ci.org/browse/JENKINS-2787). We are in an environment where we do have version ranges and ignoring the arguments for or against version ranges, we like to resolve this issue. I have looked at the patch provided in JENKINS-2787 and have integrated this into the latest 1.450 of jenkins and running this in our CI environment.

What would be required to submit this latest patch to Jenkins and have this promoted?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org

    [ https://issues.jenkins-ci.org/browse/JENKINS-12735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158910#comment-158910 ]

sergei_ivanov commented on JENKINS-12735:
-----------------------------------------

Please add support for automatic resolution of version ranges in Maven dependencies into upstream and downstream relationships between the correcponding Jenkins jobs.
We started using version ranges in our project, because we have a very fluid development environment. We manage almost a hundred of modules, which have dependencies between themselves, and which are assembled into applications often with a very short release cycle. Our key requirement is to always keep all module dependencies in sync, essentially by always depending on the latest available version. Without version ranges it becomes a royal pain, because after the release of each module, a newly released module version has to be propagated into all dependencies. If we were to do that, we'd have spent half of our time updating dependencies in the projects.
If the changes in the patch have a potential to destabilise Jenkins for the existing users, let's make this option configurable from either Jenkins configuration, or individual job configuration.
               

> No upstream or downstream resolution with Maven version ranges
> --------------------------------------------------------------
>
>                 Key: JENKINS-12735
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12735
>             Project: Jenkins
>          Issue Type: Bug
>          Components: maven
>    Affects Versions: current
>            Reporter: Alex Koon
>
> This is essentially reopening JENKINS-2787 (https://issues.jenkins-ci.org/browse/JENKINS-2787). We are in an environment where we do have version ranges and ignoring the arguments for or against version ranges, we like to resolve this issue. I have looked at the patch provided in JENKINS-2787 and have integrated this into the latest 1.450 of jenkins and running this in our CI environment.
> What would be required to submit this latest patch to Jenkins and have this promoted?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

    [ https://issues.jenkins-ci.org/browse/JENKINS-12735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158913#comment-158913 ]

kutzi commented on JENKINS-12735:
---------------------------------

Alex, as said in the previous to last comment on JENKINS-2787: to get this integrated you should convert the patch into a Github pull request and tackle the mentioned problems (performance and missing unit test)
               

> No upstream or downstream resolution with Maven version ranges
> --------------------------------------------------------------
>
>                 Key: JENKINS-12735
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12735
>             Project: Jenkins
>          Issue Type: Bug
>          Components: maven
>    Affects Versions: current
>            Reporter: Alex Koon
>
> This is essentially reopening JENKINS-2787 (https://issues.jenkins-ci.org/browse/JENKINS-2787). We are in an environment where we do have version ranges and ignoring the arguments for or against version ranges, we like to resolve this issue. I have looked at the patch provided in JENKINS-2787 and have integrated this into the latest 1.450 of jenkins and running this in our CI environment.
> What would be required to submit this latest patch to Jenkins and have this promoted?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

    [ https://issues.jenkins-ci.org/browse/JENKINS-12735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159101#comment-159101 ]

Alex Koon commented on JENKINS-12735:
-------------------------------------

I have submitted a pull request for this now - #374.
               

> No upstream or downstream resolution with Maven version ranges
> --------------------------------------------------------------
>
>                 Key: JENKINS-12735
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12735
>             Project: Jenkins
>          Issue Type: Bug
>          Components: maven
>    Affects Versions: current
>            Reporter: Alex Koon
>
> This is essentially reopening JENKINS-2787 (https://issues.jenkins-ci.org/browse/JENKINS-2787). We are in an environment where we do have version ranges and ignoring the arguments for or against version ranges, we like to resolve this issue. I have looked at the patch provided in JENKINS-2787 and have integrated this into the latest 1.450 of jenkins and running this in our CI environment.
> What would be required to submit this latest patch to Jenkins and have this promoted?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: SCM/JIRA link daemon (01/Sep/12 6:08 PM)
Status: Open Resolved
Resolution: Fixed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: alexkoon
Path:
maven-plugin/src/main/java/hudson/maven/MavenModule.java
maven-plugin/src/main/java/hudson/maven/ModuleDependency.java
maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java
http://jenkins-ci.org/commit/jenkins/65cd6555301535af4f8796a694c4d52664205778
Log:
JENKINS-12735 - Maven version range resolution.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
maven-plugin/src/main/java/hudson/maven/MavenModule.java
maven-plugin/src/main/java/hudson/maven/ModuleDependency.java
maven-plugin/src/main/java/hudson/maven/ModuleName.java
maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java
http://jenkins-ci.org/commit/jenkins/a0c02400313cee84e06a960be29b8f43389ab274
Log:
[FIXED JENKINS-12735] Merge branch 'pull-542'

Compare: https://github.com/jenkinsci/jenkins/compare/7fead6ff7f00...a0c02400313c

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jay Meyer commented on Bug JENKINS-12735

in Jenkins 1.482, this is causing Jenkins to kick off downstream builds of un-related versions.

Example: mygrp-projCore-3.4 is kicking off mygrp-projWeb-3.4 (which is correct) and also the old mygrp-projWeb-3.3. The old projWeb artifact id matches, but the version does not match. So when Jenkinds is configured to build both versions in different jobs, Jenkins is kicking off all versions of old downstream jobs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Jay Meyer edited a comment on Bug JENKINS-12735

in Jenkins 1.482, this is causing Jenkins to kick off downstream builds of un-related versions.

Example: mygrp-projCore-3.4 is kicking off mygrp-projWeb-3.4 (which is correct) and also the old mygrp-projWeb-3.3. The old projWeb artifact id matches, but the version does not match. So when Jenkins is configured to build both versions in different jobs, Jenkins is kicking off all versions of old downstream jobs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

I'm having the same problem as Jay, this change makes this option useless, as we would end up having nearly every project depended on other project.
Please re-open it.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Please look on this again, the latest change create huge list of downstream projects to build. (although they are not really affected)

Change By: Michael Glauche (26/Oct/12 9:11 AM)
Resolution: Fixed
Status: Resolved Reopened
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Alex Koon commented on Bug JENKINS-12735

I was the one that submitted the original patch and Kohsuke kindly integrated and cleaned up the code to provide Maven version range resolution. We have a live production system using this new version and it works very well - practically all module projects (in excess of 100 project modules and Maven reactor projects) are referenced by version ranges and projects up and downstream are initiated correctly when we commit code.

Your issues with this failing isn't very clear - are you using version ranges and this is now failing (or initiating builds outside the range)? Or is this affecting your projects where the versions are defined by a hard version number? I imagine if the versions are defined (no version ranges) then this would have caused many more people grief.

If you could clarify the project dependencies you have with real practical examples or better yet a unit test proving the failure that would help in resolving the issue and whether this is the correct JIRA to raise for this issue. I am happy to try and track the issue down subject to time but will need more information (note I am not a committer to the Jenkins project and have contributed this patch as we have a large project base that is very fluid and requires version ranges to function under Maven when we migrated from Ivy + Ant).

Under maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java are the unit tests for testing the resolution of up and downstream dependencies for reference. If you can supply a patch for this unit test with an example of your project structure and the breakage - this would help reproduce and track your issue down immensely.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jay Meyer commented on Bug JENKINS-12735

The new bug is not related to Maven version ranges. Instead, its about specific versions. My project has specific version numbers: e.g 1.1 vs. 1.2 in the pom dependencies specified. But when Jenkins reads them, it builds every OLD version of the downstream dependencies. A scenarios is spelled out in JENKINS-15367. And also bad, the old downstream versions are NOT built by the old upstream version, because Jenkins has associate the downstream projects with the incorrect upstream projects. So in this state I can no longer build version 1.1 of the system of projects. And the 1.2 version kicks off too many build, because it builds all of the 1.1 builds too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Jay Meyer edited a comment on Bug JENKINS-12735

The new bug is not related to Maven version ranges. Instead, its about specific versions. My project has specific version numbers: e.g 1.1 vs. 1.2 in the pom dependencies specified. But when Jenkins reads them, it builds every OLD version of the downstream dependencies. A scenario is spelled out in JENKINS-15367. And also bad, the old downstream versions are NOT built by the old upstream version, because Jenkins has associated the downstream projects with the incorrect upstream projects. So in this state I can no longer build version 1.1 of the system of projects. And the 1.2 version kicks off too many build, because it builds all of the 1.1 builds too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Michael Glauche (27/Oct/12 11:05 AM)
Attachment: JENKINS-12735.zip
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

I did attach two simple test-scenarios, both with project "A" and "B".

In the "working" scenario, jenkins did see the relationship correctly between B and A, so that when B was build A will be build later. (makes sense, direct dependency did change)

In the "failing" scenario, the "B" project did create a release (0.0.1), move the development version to 0.0.2-SNAPSHOT. However the A project decides that they want only the latest stable version, so they switch their dependency to the 0.0.1 release.

Now, however, when Jenkins (1.487) builds B with 0.0.2-SNAPSHOT it does trigger the A job too! (which makes no sense, because A is using the "stable" build 0.0.1, which should not change, so no re-building ins needed.)
This did lead to a massive increase of number of projects building (and me having to switch off the option on 100+ jenkins jobs ..)

I think the behavior was correct at least in 1.474, where only depdencencies with exactly the same dependency version got build.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

The behavior was correct up to 1.480, I'm blocked also to this version.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Alex Koon commented on Bug JENKINS-12735

I am trying to look into this.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Alex Koon commented on Bug JENKINS-12735

I think I have found the bug. I have a unit test to prove the bug and the associated fix. Its related to the way the maven API deals with versions http://maven.apache.org/ref/3.0.3/maven-artifact/apidocs/org/apache/maven/artifact/versioning/VersionRange.html#createFromVersion(java.lang.String)

Although this is fixed via unit tests, I would like a few days testing on a Jenkins instance to prove it works.

I will try and submit a patch soon subject to work load.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-12735) No upstream or downstream resolution with Maven version ranges

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

This could be the reason, I remember there was some breaking change from 3.0.3 to 3.0.4 with SNAPSHOTS in version ranges, but i can't find it anymore.

But, there's still MNG-3092 , which could be the main reason behind it. This thread on the maven list also goes in detail about the problem.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12
Loading...