We had to update the enforcer plugin to work around the bug where it was
reading code from META-INF where it's not supposed to. See here for
example:
https://github.com/jenkinsci/audit-log-plugin/blob/master/pom.xml#L202-L214

On Mon, Oct 21, 2019 at 6:08 AM Oleg Nenashev <[email protected]>
wrote:

> Just to add some info about using Java 9+ in plugins
>
> JEP-211 requires plugins to stay on Java 8.
> If necessary, they can indeed go to higher version, but Plugin POM does
> not fully support it. https://github.com/jenkinsci/plugin-pom/pull/133 would
> need to be finished and integrated.
> Note that, even if it is landed, using Java 9+ can cause various
> disruptions for users of old Jenkins core versions before 2.164.x where the
> JDK version metadata was introduced. Also, custom update centers may not
> return this metadata.
>
> On Monday, October 21, 2019 at 10:48:05 AM UTC+2, Ullrich Hafner wrote:
>>
>> Here is an example on how to suppress those files:
>>
>> https://github.com/jenkinsci/warnings-ng-plugin/blob/master/pom.xml#L922
>>
>>
>> Am 20.10.2019 um 23:37 schrieb Damian Szczepanik <[email protected]>:
>>
>> I think that's the second option:
>>
>> [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @
>> cucumber-reports ---
>> [INFO] Restricted to JDK 1.8 yet
>> com.fasterxml.jackson.core:jackson-annotations:jar:2.10.0.pr2:compile
>> contains module-info.class targeted to 53.0
>> [INFO] Restricted to JDK 1.8 yet
>> com.fasterxml.jackson.core:jackson-databind:jar:2.10.0.pr2:compile contains
>> module-info.class targeted to 53.0
>> [INFO] Restricted to JDK 1.8 yet
>> com.fasterxml.jackson.core:jackson-core:jar:2.10.0.pr2:compile contains
>> module-info.class targeted to 53.0
>> [INFO] Ignoring requireUpperBoundDeps in com.google.guava:guava
>> [WARNING] Rule 2:
>> org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with
>> message:
>> Found Banned Dependency:
>> com.fasterxml.jackson.core:jackson-annotations:jar:2.10.0.pr2
>> Found Banned Dependency:
>> com.fasterxml.jackson.core:jackson-databind:jar:2.10.0.pr2
>> Found Banned Dependency:
>> com.fasterxml.jackson.core:jackson-core:jar:2.10.0.pr2
>>
>>
>> but then how to skip this particular 'violation' in this dependency? Or
>> maybe discard all such problems?
>>
>> Damian
>>
>>
>> You should not change to JDK 9 if not absolutely necessary.
>>
>> Did your dependency really change the API to JDK 9? Or did they just
>> compile with JDK 9 and add a module information file which requires the
>> increased class file level? Those files can be ignored in the pom...
>>
>>
>> Am 20.10.2019 um 23:16 schrieb Damian Szczepanik <[email protected]>:
>>
>> Hi,
>>
>> After upgrading some plugin dependencies I found that dependency is
>> compiled against JDK 9 while my plugin still uses 8 - compilation has
>> failed.
>>
>> Is there any recommendation, guideline, best practices that guide about:
>>
>>    1. Should I upgrade the plugin to JDK 9+ or it's not mandatory
>>    because from SLA perspective Jenkins should be upgraded?
>>    2. Jenkins does not support 9 so should I upgrade to 11 at least?
>>    3. Is there any plugin that have been already upgraded and could be
>>    taken as good reference how to make it painless?
>>    4. What I would loose? eg Jenkins with older JDK won't be able to
>>    install new version of my plugin
>>
>> Damian
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/20bf28ca-34fa-4776-9946-d7c1e166cdcb%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/20bf28ca-34fa-4776-9946-d7c1e166cdcb%40googlegroups.com?utm_medium=email&utm_source=footer>
>> . --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Developers" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jenkinsci-dev/UgQ9wznpybw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/1021736F-D106-4C86-8FA5-91F3C2074ACF%40gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/1021736F-D106-4C86-8FA5-91F3C2074ACF%40gmail.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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/1131298390.20191020233750%40gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/1131298390.20191020233750%40gmail.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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/2386d4a7-9872-478d-b56c-3f91b78fcd8b%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/2386d4a7-9872-478d-b56c-3f91b78fcd8b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Matt Sicker
Senior Software Engineer, CloudBees

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAEot4ozXu38THYh5WsJJgvdUDi5cHQ2zFhRUkRYmu5WPixJhKQ%40mail.gmail.com.

Reply via email to