Change to JDK11 LTS

As of Eclipse IDE 2020-12, the JDK minimum requirement is JDK11. Also, BIRT-Components like RCP Report Designer do not work with JDK-Releases higher JDK8.

So essentially, we want two things:
First: change the build environment from JDK8 to JDK11
Second: make sure BIRT runs with JDK11+

I probably going to miss some steps as this was really a lot of work and research! But I will give it a try:

Here is a top-level view of problems to solve:
1. Include missing classes with Bundles that were removed from JDK after version 8. This hits especially javax.xml.bind.
2. Make sure Maven uses JDK 11.
3. Fix Problems with Maven Ant Plugin with JavaScript-Engine.
4. Fix Problems with Javadoc generation
5. Fix Problems with Compilation of JSP-Pages for Jetty
6. Fix Problems with native2ascii

Regarding 1)
Include the appropriate Bundle from Orbit (XML Binding for Java) and add the javax.xml.bind dependency in the Manifest-File of org.eclipse.birt.data.oda.mongodb

Regarding 2)
You’ll find this easily with Google.

Regarding 3)
In build.xml (location: build/org.eclipse.birt.api) make the following changes:

<script language="javascript" classpath="${plugin_classpath}">

<target name="all">
  <property name="plugin_classpath" refid="maven.plugin.classpath"/>
</target>

Regarding 4)
BuildISVDoc.xml:
Raise source-level above 1.5 for all javadoc executions.

BuildChartISVDoc.xml:
Raise source-level above 1.5 for all javadoc executions.

Deactivate the Javascript section and rewrite Target “javadoc_check” as follows:

<target name="javadoc_check">
  <property name="javadoc.doclint.none" value="-Xdoclint:none"/>
</target>

Regarding 5)
Compilation of JSP-Pages fails because the Java sourceVersion is below 1.6 Unfortunatly, the jspc-maven-plugin does not allow to set the Source Level.

One has to check-out the source of this plugin (https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-jspc-maven-plugin) and rebuild the module.

You have to take one of the 9.0.x Versions (obviously, it’s best to grab the newest one which is 9.0.7).

The changes to the source in JspcMojo.java:

/**
* Source version - if not set defaults to jsp default (currently 1.5)
* 
* @parameter
*/
private String sourceVersion;
/**
* Target version - if not set defaults to jsp default (currently 1.5)
* 
* @parameter
*/
private String targetVersion;

and later on (you’ll find it):

if (sourceVersion != null) 
  jspc.setCompilerSourceVM(sourceVersion);
if (targetVersion != null) 
  jspc.setCompilerTargetVM(targetVersion);

Install the Plugin in a Maven-Repository, I.e:
mvn install:install-file -Dfile=/home/adiinfo/NetBeansProjects/jspc-maven-plugin-newest/target/jetty-jspc-adi-maven-plugin-9.0.7.v20131107.jar -DgroupId=org.eclipse.jetty -DartifactId=jetty-jspc-adi-maven-plugin -Dversion=9.0.7.v20131107 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true

Use the newly installed module in the POM (location:viewer/org.eclipse.bit.report.viewer):

<artifactId>jetty-jspc-adi-maven-plugin</artifactId> (use your own artifactId)
<version>9.0.7.v20131107</version> (use the version you picked for re-compilation)

and in the configuration section define source/target level for Java (1.6 is the highest allowed source level):

<sourceVersion>1.6</sourceVersion>
<targetVersion>1.6</targetVersion>

Regarding 6)
native2ascii Translation fails as tools.jar is used and there is no replacement in JDK greater JDK8.

In the POM (location: nl) one has the change native2ascii to the internal ANT implementation, so:

<target description="Execute native2ascii for *.msg files" name="NativeToAscii">
  <native2ascii dest="." encoding="Cp1252" ext=".properties" includes="**/*_de_DE.msg, **/*_fr_FR.msg, **/*_es_ES.msg" src="." implementation="builtin"/>
  <native2ascii dest="." encoding="GBK" ext=".properties" includes="**/*_zh_CN.msg" src="." implementation="builtin"/>
  <native2ascii dest="." encoding="SJIS" ext=".properties" includes="**/*_ja_JP.msg" src="." implementation="builtin"/>
  <native2ascii dest="." encoding="MS949" ext=".properties" includes="**/*_ko_KR.msg" src="." implementation="builtin"/>
</target>

and don’t forget to deactivate the dependency “com.sun” further below in the POM.

Also, change of Version for the maven-antrun-plugin to 3.0.0 is imperative.


0 Kommentare

Schreiben Sie einen Kommentar

Avatar placeholder

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert