Update Jenkins parent POM to LTS version

93 views
Skip to first unread message

Rafael Ribeiro Rezende

unread,
Mar 12, 2015, 2:10:36 PM3/12/15
to jenkin...@googlegroups.com
Hello,
I have a use case in which I need to maintain a 1:1 relationship between a corporate parent POM and a LTS Jenkins parent POM.
The corporate POM in this case is a child of the Jenkins POM, plus attributes.

To implement this, I'm planning to run automated daily checks in which the version of the parent POM in the corporate POM is updated to the latest LTS version of Jenkins.
The easy way to update automatically via maven is using

mvn versions:update-parent

It indeed works perfect for regular Jenkins releases:

C:\workspaces\rafael_workspace\jenkins-parent-pom>mvn versions:update-parent
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Jenkins Corporate POM 1.580.3
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- versions-maven-plugin:1.3.1:update-parent (default-cli) @ jenkins-ci ---
[INFO] artifact org.jenkins-ci.plugins:plugin: checking for updates from nexus-cdg
[INFO] Updating parent from 1.580.3 to 1.602
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.466s
[INFO] Finished at: Thu Mar 12 18:59:51 CET 2015
[INFO] Final Memory: 18M/124M
[INFO] ------------------------------------------------------------------------

Then, what should I do to update to the latest LTS version instead of the regular versions?

--
Rafael

Daniel Beck

unread,
Mar 12, 2015, 2:24:01 PM3/12/15
to jenkin...@googlegroups.com
Isn't this a Maven question? Why are you asking on the Jenkins dev list?

---

Looking at the docs for Maven Versions Plugin reveals

http://mojo.codehaus.org/versions-maven-plugin/update-parent-mojo.html#rulesUri

And the format definition

http://mojo.codehaus.org/versions-maven-plugin/rule.html#

indicates support for ignoring a version pattern. In this case, something like

1\....

or

^1\....$

should ignore regular weekly releases (for the next eight years or so).

More docs:

http://mojo.codehaus.org/versions-maven-plugin/version-rules.html
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9f72c900-5199-4dc9-a92e-3660103551a3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Rafael Ribeiro Rezende

unread,
Mar 12, 2015, 2:50:00 PM3/12/15
to jenkin...@googlegroups.com, m...@beckweb.net
Isn't this a Maven question? Why are you asking on the Jenkins dev list?

Well, I presented my use case and the closest result I could get to a solution, that happens to be in Maven.
Since I'm adding a layer between the Jenkins parent POM and our Jenkins plugins, I hoped that someone else here could have already had such use case. Maybe those people solved it in another way, maybe Jenkins provides a real solution out-of-the-box and Maven is actually the wrong direction to go.

Maybe a Maven expert wouldn't have known about the Jenkins version pattern as you know :-)

I'll try your suggestion! Thanks!

--
Rafael
Reply all
Reply to author
Forward
0 new messages