OK, some strange things I’ve noticed. The Effective POM for the external-monitor-job plugin, with Baptiste’s updated POM, contains the following:
* There is a section in <build> for the maven-hpi-plug-in where, as part of the configuration, a ‘showDeprecation’ attribute is set * The source of the Maven-hpi-plugin seems to be org.jenkins-ci.tools which I presume is sourced from https://github.com/jenkinsci/maven-hpi-plugin BUT https://github.com/jenkinsci/maven-hpi-plugin DOES seem to contain a ‘minimumJavaVersion’ attribute but does NOT contain a ‘showDeprecation’ attribute. However if I skip across to https://github.com/hudson/maven-hpi-plugin (note the ‘hudson’ not ‘jenkinsci’) then I can find a ‘showDeprecation’ attribute. I’m further lost because when I look here… https://mvnrepository.com/artifact/org.jenkins-ci.tools/maven-hpi-plugin?repo=springio-plugins-release … I can’t find a maven-hpi-run version higher than 2.7 so where is 3.0 coming from and is it the jenkinsci or Hudson version, or some other? Does this explain any of my issues or are these just ‘the way it works’ and I’m simply not understanding Maven at all? Paul DS. From: jenkinsci-dev@googlegroups.com <jenkinsci-dev@googlegroups.com> On Behalf Of Paul Smith Sent: 14 December 2018 09:53 To: jenkinsci-dev@googlegroups.com Subject: RE: maven-hpi-plugin ... minimumJavaVersion attribute must be set... Devin, I’m running Maven 3.6.0, OpenJDK 8 on Ubuntu 18.04.1 Bionic Beaver (4.15.0-42-generic kernel). Thanks for the info about the ‘work’ directory – that matches what I expected. I’ve just tried deleting both my ‘fully installed Jenkins’ and all Java stuff and then reinstalling just the OpenJDK JDK (as required by Maven) but this has made no difference. I’m going to have one last run at figuring this out before walking away for a while. Paul DS. From: jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com> <jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com>> On Behalf Of Devin Nusbaum Sent: 13 December 2018 19:35 To: jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com> Subject: Re: maven-hpi-plugin ... minimumJavaVersion attribute must be set... What versions of Maven, Java, and Ubuntu are you running? I would run `mvn --version` to see what it tells you. You want Java 8 and Maven 3.5+. Maybe if you have a really old Maven version you could be getting those kinds of errors, but I’m not sure. Regarding the `work` directory, that is the directory that `mvn hpi:run` uses as JENKINS_HOME when running a plugin. You don’t need to install Jenkins or run it directly at all when working on plugins, since it will be handled automatically in that local directory, although there should not be any conflicts if you do have it running or installed other than needing to specify a different port when running `mvn hpi:run` if you want to run them simultaneously. On Dec 13, 2018, at 14:27, Paul Smith <paul_d_sm...@hotmail.com<mailto:paul_d_sm...@hotmail.com>> wrote: Thanks Devin. Unfortunately it appears that I have some sort or install/dev environment problem. I’ve tried downloading a clean copy of the external job plugin and running the clean install and hpi:run jobs with that and it doesn’t work for me ☹. With the plugin as downloaded, I get… [ERROR] Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.3:findbugs (findbugs) on project external-monitor-job: Unable to parse configuration of mojo org.codehaus.mojo:findbugs-maven-plugin:3.0.3:findbugs for parameter pluginArtifacts: Cannot assign configuration entry 'pluginArtifacts' with value '${plugin.artifacts}' of type java.util.Collections.UnmodifiableRandomAccessList to property of type java.util.ArrayList -> [Help 1] So I created a branch and tried Baptiste’s updated POM and got batch to the error that has been holding me up before… [ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.0:run (default-cli) on project external-monitor-job: minimumJavaVersion attribute must be set starting from version 2.8 -> [Help 1] I’m running on a clean Ubuntu image (under VirtualBox) and I believe that I followed the ‘get started’ guides correctly so now I’m completely lost! Are there any sensible checks that I can make to ensure that I’ve not got anything strange lying around? The two things that spring to mind are that I’ve got the OpenJDK and Jenkins installed but Jenkins is not running; it looked to me like Maven installed a copy of Jenkins below the ../work directory when running the plug-in dev environments but is there some sort of possible interaction even though Jenkins is not active? Happy to try a few things before I create another Ubuntu image and start from scratch again. Paul DS. From: jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com> <jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com>> On Behalf Of Devin Nusbaum Sent: 13 December 2018 18:59 To: jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com> Subject: Re: maven-hpi-plugin ... minimumJavaVersion attribute must be set... I'm trying to create a plug-in and started from the external-jobs plugin. Unfortunately this had a very obsolete pom.xml so I've tried updating it following some help given elsewhere in this group but I'm stuff no this error when I try to run 'mvn hpi:run' For what it’s worth, there are Maven archetypes for creating a new Jenkins plugin<https://github.com/jenkinsci/archetypes>, which will get you a relatively up-to-date pom.xml free from any historical quirks or unnecessary configuration that you might be present in the pom.xml of existing plugins. To use the archetypes, run `mvn archetype:generate -Dfilter=io.jenkins.archetypes:` (trailing colon is import) from the command line, and then follow the on-screen prompts. -- 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-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3DC89470-5B16-40BB-B124-0318D910A180%40cloudbees.com<https://groups.google.com/d/msgid/jenkinsci-dev/3DC89470-5B16-40BB-B124-0318D910A180%40cloudbees.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/VI1P192MB02554492592A9921C0E40F4FC8A00%40VI1P192MB0255.EURP192.PROD.OUTLOOK.COM<https://groups.google.com/d/msgid/jenkinsci-dev/VI1P192MB02554492592A9921C0E40F4FC8A00%40VI1P192MB0255.EURP192.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/27BCFCCB-FE85-47E9-96DA-DDEDDBC76012%40cloudbees.com<https://groups.google.com/d/msgid/jenkinsci-dev/27BCFCCB-FE85-47E9-96DA-DDEDDBC76012%40cloudbees.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/VI1P192MB0255FA7B147CD5C748DBCF3AC8A10%40VI1P192MB0255.EURP192.PROD.OUTLOOK.COM<https://groups.google.com/d/msgid/jenkinsci-dev/VI1P192MB0255FA7B147CD5C748DBCF3AC8A10%40VI1P192MB0255.EURP192.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/VI1P192MB0255372C67297264FFB23208C8A10%40VI1P192MB0255.EURP192.PROD.OUTLOOK.COM. For more options, visit https://groups.google.com/d/optout.