For the Plugin POM, https://github.com/jenkinsci/plugin-pom/pull/133 needs 
to be finalized and landed. I did not proceed with it 2 years ago, because 
Java 11 only plugins sounded very undesirable for the Jenkins ecosystem at 
that point. In 2021 I do not have objections about finalizing and landing 
this pull request 

> You should not switch your plugin to Java 11 unless Jenkins core switches 
to Java 11. Otherwise your plugin will not work in Jenkins instances that 
run with Java 8. So do not expect a solution until that step has been 
announced.  

The solution is mostly there.  We have added support for Java 11+ plugins 
when working on support for Java 11 in 2018-2019. All recent Jenkins core 
versions will process the java version support metadata and show warnings 
if a plugin is not compatible with the controller's Java version. It should 
be formally supported since 2.164 or so.

On Saturday, May 29, 2021 at 12:50:25 PM UTC+2 [email protected] wrote:

> Hi Bryan,
>
> I have recently the same issue with a plugin I am developing, some of the 
> libraries I use do not support Java 8 anymore so the plugin will work only 
> on Jenkins instances running on JDK 11+. The change of the java.level to 11 
> will not work directly you have to overwrite some of the configurations 
> that the parent pom made, this is the build config changes you will need.
>
> <properties>
> ...
> <java.level>11</java.level>
> </properties>
>
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-compiler-plugin</artifactId>
>       <configuration>
>         <source>${java.level}</source>
>         <target>${java.level}</target>
>         <testSource>${java.level}</testSource>
>         <testTarget>${java.level}</testTarget>
>       </configuration>
>     </plugin>
>     <!-- https://github.com/mojohaus/animal-sniffer/issues/62 after Java 
> 9 the there is no signatures with animal sniffer, the recommended way is to 
> use releases with the maven-compiler-plugin -->
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>animal-sniffer-maven-plugin</artifactId>
>       <configuration>
>         <signature>
>           <groupId>org.codehaus.mojo.signature</groupId>
>           <artifactId>java18</artifactId>
>         </signature>
>       </configuration>
>     </plugin>
>   </plugins>
> </build>
>
> El jueves, 27 de mayo de 2021 a las 20:36:29 UTC+2, [email protected] 
> escribió:
>
>> You should not switch your plugin to Java 11 unless Jenkins core switches 
>> to Java 11. Otherwise your plugin will not work in Jenkins instances that 
>> run with Java 8. So do not expect a solution until that step has been 
>> announced. 
>>
>> Am 27.05.2021 um 20:01 schrieb Bryan Stopp <[email protected]>:
>>
>>
>> Was looking at updating my plugin to only build using Java11 and output 
>> Java11 bytecode.
>>
>> But when I went to use 11 as the value of *java.level* in my pom, it 
>> broke due to the plugins not understanding Java target of "1.11" (because 
>> its supposed to be just "11").
>>
>> Is there a plan to update/release a plugin parent pom that is 
>> predominantly configured to support only Java11?
>>
>> Thanks,
>>
>> -Bryan
>>
>> -- 
>> 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/55720f8e-4944-49e1-ae8a-bc00d34fc50cn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-dev/55720f8e-4944-49e1-ae8a-bc00d34fc50cn%40googlegroups.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/ee927abc-a3eb-4d53-81c5-0f1cda44454cn%40googlegroups.com.

Reply via email to