Sorry for the late reply, it took me a while to figure out that the
exception only triggers for Pipeline builds (which makes sense, given the
message); but as I was working on normal Job runs, it seemed to have gone
away - unfortunately it did not.

I launch Jenkins like this: mvnDebug hpi:run -Dport=5000

I do not see the flags which mvnDebug uses internally but I did find a
MANIFEST.MF file which states:
Add-Opens: java.base/java.lang java.base/java.io java.base/java.util
java.desktop/com.sun.beans.introspect

At the risk of jumping the gun, this morning I added this to the pom.xml
file:
  <properties>
...
    <jenkins.addOpens>--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED --add-opens
java.base/java.util=ALL-UNNAMED</jenkins.addOpens>
  </properties>

And now the error seems to be gone.

On Mon, Apr 22, 2024 at 6:30 PM Tim Jacomb <timjaco...@gmail.com> wrote:

> I find in my IDE (IntelliJ) sometimes I need to add the `--add-opens` to
> command line arguments for hpi:run
>
> On Mon, 22 Apr 2024 at 13:15, 'Jesse Glick' via Jenkins Developers <
> jenkinsci-dev@googlegroups.com> wrote:
>
>> How are you running Jenkins when you see this? Should not occur when
>> either using `mvn hpi:run` nor `mvn test` on a `JenkinsRule`-based test so
>> far as I know.
>> https://github.com/jenkinsci/plugin-pom/blob/692c7757f468ea6b1ecf52a39edb8379020816c3/pom.xml#L65-L70
>> and associated setup should be passing the right JVM argument to allow this
>> reflection.
>>
>> --
>> 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/CANfRfr3fMOePYaXEa6q4uFc-%2BJMB8dN%2B80-aLN7V4GtnMV_muQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3fMOePYaXEa6q4uFc-%2BJMB8dN%2B80-aLN7V4GtnMV_muQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAH-3Bifz2JnhaBnUVYUa8vzCzZKVZz%2BeSXw2NiwYG81Et5Y9tQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3Bifz2JnhaBnUVYUa8vzCzZKVZz%2BeSXw2NiwYG81Et5Y9tQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAJBx0ENde4DfGk1_e9zUThRsL2BUk3JwFxTqTZrtccX_foXYSQ%40mail.gmail.com.

Reply via email to