We are migrating a lot of project to Java21 SpringBoot 3.2.3 and MongoDB v7 and Maven run with Java21.
We will use Liberica JDK and Alpaquita Linux of BellSoft as Docker.
The one problem that we had was find, in the migration to Java 21, a NOT 100% compatible plugin Maven / dependencies to generate stub classes with jakarta.* packages, but follow a lot of dependency and maven plugin nobody is 100% compatible from Java 20 forward.
For example we used below maven plugin/dependencies that have some problem about deprecated but it works fine:
java.net.URL = new URL("...")
instead of using the non-deprecated mode from Java 20:
java.net.URL = Paths.get("...")
.toUri()
.toURL();
To migrate webservice we had used dependency:
<dependency>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.15.3</version>
</dependency>
and Maven plugin:
<build>
<plugins>
...
<plugin>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>4.0.2</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<wsdlDirectory>${project.basedir}/src/main/resources/wsdl</wsdlDirectory>
<wsdlFiles>
<wsdlFile>file.wsdl</wsdlFile>
</wsdlFiles>
<sourceDestDir>${project.basedir}/src/main/java</sourceDestDir>
<packageName>com. ... .stub</packageName>
</configuration>
</plugin>
...
</plugins>
<extensions>
...
<extension>
...
</extension>
...
</extensions>
</build>
Somebody know a stable maven plugin or stable dependencies that is 100% compatible with Java21 with javadoc or documentation about version proposed?
Thanks a lot to support community.
Kind regards