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> 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 <jenkinsci-dev@googlegroups.com> On > Behalf Of Devin Nusbaum > Sent: 13 December 2018 18:59 > To: 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 > <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 > <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/27BCFCCB-FE85-47E9-96DA-DDEDDBC76012%40cloudbees.com. For more options, visit https://groups.google.com/d/optout.