Overriding parent pom on lower version

33 views
Skip to first unread message

gro...@gmail.com

unread,
Jun 4, 2018, 3:46:46 AM6/4/18
to Jenkins Developers

Hey, I am the new Dev owner on the MicroFocus (previously HPE) Application Automation Tools plugin (link).  We wanted to add new features that are using Java 8 and got maven issues due to the compiler source settings in our parent pom file. Our plugin pom file is currently using Jenkins 2.14 as parent pom which has java.level is set to 7.

Will overriding the plugin parent pom java language level can cause potential breakage when loading the plugin in older Jenkins servers?

Thanks for your help.

Baptiste Mathus

unread,
Jun 4, 2018, 4:58:18 AM6/4/18
to Jenkins Developers
You would be much better and easier bumping jenkins.version to 2.60.1, since this is the first LTS where Jenkins is using Java 8.

Basically, if you release your plugin using a baseline <2.60, and your plugin is compiled for Java 8, then any user of your plugin who upgrades, and uses Jenkins < 2.60 will see it blow up (hopefully, only your plugin will not be loaded, and not the whole instance screwed, but not sure, didn't check recently). 

Also: if you wish to do that, please do not hesitate to file your ongoing work as a PR, and explaining what possibly is blocking you. It's *much* easier for everyone here to help you fix a given PR, than try and guess all the reasons something might be failing for.

I just filed a PR BTW to add a standard Jenkinsfile: https://github.com/jenkinsci/hpe-application-automation-tools-plugin/pull/91

Though, building locally:and building locally, it failed. It looks to me there is some dependency for this plugin that is not publicly accessible.
Note that we do not host non open source plugins.

Is that com.hp.sv:SVConfigurator:jar:4.20.0.49985 artifact published somewhere?

[...] Downloaded: https://redacted/content/groups/staged/org/jenkins-ci/main/jenkins-war/1.642.4/jenkins-war-1.642.4.war (64 MB at 653 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:35 min
[INFO] Finished at: 2018-06-04T10:53:34+02:00
[INFO] Final Memory: 44M/465M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hp-application-automation-tools-plugin: Could not resolve dependencies for project org.jenkins-ci.plugins:hp-application-automation-tools-plugin:hpi:5.4.1-SNAPSHOT: Could not find artifact com.hp
.sv:SVConfigurator:jar:4.20.0.49985 in cloudbees-internal (https://nexus-internal.cloudbees.com/content/groups/staged/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

Thanks!

--
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/a8362ece-a962-4bb8-a842-4bd49abf0286%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jesse Glick

unread,
Jun 4, 2018, 10:01:03 AM6/4/18
to Jenkins Dev
On Mon, Jun 4, 2018 at 4:58 AM, Baptiste Mathus <m...@batmat.net> wrote:
> You would be much better and easier bumping jenkins.version to 2.60.1, since
> this is the first LTS where Jenkins is using Java 8.

BTW newer parent POMs force you to specify the Java level explicitly.

fkp...@gmail.com

unread,
Jun 5, 2018, 8:13:05 AM6/5/18
to Jenkins Developers
Hi,
Would you mind configure your mvn look for artifacts outside your local nexus. I think that might be the issue - since it's hosted on bintray (the repo is defined in the POM).
Also, our external build on AppVeyor is currently passing - https://ci.appveyor.com/project/HPEbot/hp-application-automation-tools-plugin/branch/latest and it's able to get the required dependencies.
Please update us and we will investigate the matter.

On the matter of local Jenkins-CI build -
As far as i recall, those builds are on Linux machines while our plugin needs windows machine in order to build components written in .Net/C#.
Moreover, I believe that such option exist (right?) but we still need to specifically configure that Jenkins file in order to do so.

On the Jenkins version issue -
would you suggest to bump it even if 50% of our users still use Jenkins 1.x LTS (taking this from jenkins stats)?
I mean we can't actually force them to upgrade, and so we understand that the only possible way is to stay with Java 7 till most of our users upgrade... WDYT?

Thanks,
Fima

Daniel Beck

unread,
Jun 5, 2018, 8:30:36 AM6/5/18
to jenkin...@googlegroups.com

> On 5. Jun 2018, at 14:13, fkp...@gmail.com wrote:
>
> Would you mind configure your mvn look for artifacts outside your local nexus. I think that might be the issue - since it's hosted on bintray (the repo is defined in the POM).
> Also, our external build on AppVeyor is currently passing - https://ci.appveyor.com/project/HPEbot/hp-application-automation-tools-plugin/branch/latest and it's able to get the required dependencies.
> Please update us and we will investigate the matter.

Could you provide the source code for that dependency?

> On the matter of local Jenkins-CI build -
> As far as i recall, those builds are on Linux machines while our plugin needs windows machine in order to build components written in .Net/C#.
> Moreover, I believe that such option exist (right?) but we still need to specifically configure that Jenkins file in order to do so.

See https://github.com/jenkins-infra/pipeline-library#optional-arguments for how to limit it to Windows.

> On the Jenkins version issue -
> would you suggest to bump it even if 50% of our users still use Jenkins 1.x LTS (taking this from jenkins stats)?
> I mean we can't actually force them to upgrade, and so we understand that the only possible way is to stay with Java 7 till most of our users upgrade... WDYT?

You released version 5.2 in August 2017. 81% of its users are on 2.60.1 or newer. 94% of 5.3 users, 100% of 5.4 users.

Source: http://stats.jenkins.io/pluginversions/hp-application-automation-tools-plugin.html (it's in the tool tips of the cells)

In other words, users who don't update Jenkins don't update your plugin either, so new releases don't need to care about them.

Reply all
Reply to author
Forward
0 new messages