Skip to content

Commit

Permalink
Changes required to build the java cluster on JDK 17.
Browse files Browse the repository at this point in the history
 - java cluster source version bump to 1.8 in properties.
 - java cluster source version bump to release=8 in ant files.
 - keystore command requires "-keyalg" to be set on modern JDKs.
 - fixed NPE in nb-javac ant task when only 'release' is specified.
 - updated test, 1.8 is now the default.
  • Loading branch information
mbien committed Dec 3, 2021
1 parent 3ded4d1 commit bf8c26d
Show file tree
Hide file tree
Showing 68 changed files with 109 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testGetSourceLevel() {
String path = "java/junit/src/org/netbeans/modules/junit/api/JUnitSettings.java";
FileObject f = nbRoot().getFileObject(path);
assertNotNull("found " + path, f);
assertEquals("1.6 used for an average module", "1.6", SourceLevelQuery.getSourceLevel(f));
assertEquals("1.8 used for an average module", "1.8", SourceLevelQuery.getSourceLevel(f));
}

}
2 changes: 1 addition & 1 deletion extide/o.apache.tools.ant.module/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<path path="${src-bridge.cp}"/>
</classpath>
</depend>
<javac srcdir="src-bridge" destdir="build/bridge-classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" source="1.6" target="1.6" includeantruntime="false">
<javac srcdir="src-bridge" destdir="build/bridge-classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" release="8" includeantruntime="false">
<classpath>
<path path="${src-bridge.cp}"/>
</classpath>
Expand Down
2 changes: 1 addition & 1 deletion harness/apisupport.harness/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<target name="compile-jnlp-launcher" depends="init,compile">
<mkdir dir="${build.dir}/jnlp-launcher-classes"/>
<nb-javac srcdir="jnlp-src" destdir="${build.dir}/jnlp-launcher-classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" source="1.6" target="1.6" includeantruntime="false">
<nb-javac srcdir="jnlp-src" destdir="${build.dir}/jnlp-launcher-classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" release="8" includeantruntime="false">
<classpath>
<path path="${jnlp.cp}"/>
</classpath>
Expand Down
2 changes: 1 addition & 1 deletion harness/apisupport.harness/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.6
javac.source=1.8
jnlp.cp=\
${o.n.bootstrap.dir}/lib/boot.jar:\
${openide.modules.dir}/lib/org-openide-modules.jar:\
Expand Down
2 changes: 1 addition & 1 deletion harness/jemmy/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.
is.autoload=true
javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.6
javac.source=1.8
release.external/jemmy-2.3.1.1.jar=modules/ext/jemmy-2.3.1.1.jar
release.external/jemmy-2.3.1.1-doc.zip=docs/jemmy-2.3.1.1-doc.zip
release.external/jemmy-2.3.1.1-src.zip=docs/jemmy-2.3.1.1-src.zip
Expand Down
4 changes: 3 additions & 1 deletion harness/libs.nbi.ant/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
# specific language governing permissions and limitations
# under the License.
is.autoload=true
javac.source=1.6
javac.source=1.8
javac.target=1.8
javac.compilerargs=-Xlint -Xlint:-serial
extra.module.files=\
modules/ext/nbi-ant-tasks.jar,\
modules/ext/nbi-registries-management.jar,\
nbi/
nbm.module.author=Dmitry Lipin

2 changes: 1 addition & 1 deletion harness/libs.nbi.engine/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
is.autoload=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
extra.module.files=modules/ext/nbi-engine.jar
nbm.module.author=Dmitry Lipin
2 changes: 1 addition & 1 deletion ide/csl.api/anttask/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" target="1.6" source="1.6" >
<javac srcdir="src" destdir="build/classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" release="8" >
<classpath>
<!-- cmdline Ant -->
<pathelement location="${ant.core.lib}"/>
Expand Down
4 changes: 2 additions & 2 deletions ide/db/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<target name="compile-lib" depends="init,fake-jdbc-40">
<mkdir dir="${build.dir}/lib-classes" />
<javac target="${javac.target}" srcdir="libsrc" destdir="${build.dir}/lib-classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" source="1.6">
<javac release="8" srcdir="libsrc" destdir="${build.dir}/lib-classes" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
<classpath>
<pathelement path="${lib.cp}"/>
</classpath>
Expand All @@ -50,7 +50,7 @@
public class RowIdLifetime {}
</echo>
<mkdir dir="${fake-jdbc-40.build}"/>
<javac target="${javac.target}" source="1.7" srcdir="${fake-jdbc-40.src}" destdir="${fake-jdbc-40.build}"/>
<javac release="8" srcdir="${fake-jdbc-40.src}" destdir="${fake-jdbc-40.build}"/>
</target>

<target name="jar-lib" depends="compile-lib">
Expand Down
2 changes: 1 addition & 1 deletion java/ant.browsetask/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<target name="nblib" depends="init">
<mkdir dir="build/antclasses"/>
<javac srcdir="antsrc" destdir="build/antclasses" debug="${build.compiler.debug}" deprecation="${build.compiler.deprecation}" source="1.6" target="1.8" includeantruntime="false">
<javac srcdir="antsrc" destdir="build/antclasses" debug="${build.compiler.debug}" deprecation="${build.compiler.deprecation}" release="8" includeantruntime="false">
<classpath>
<pathelement path="${antsrc.cp}"/>
</classpath>
Expand Down
2 changes: 1 addition & 1 deletion java/debugger.jpda.ant/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<target name="nblib" depends="init">
<mkdir dir="build/antclasses"/>
<javac srcdir="antsrc" destdir="build/antclasses" source="1.6" target="1.6" debug="true" deprecation="true">
<javac srcdir="antsrc" destdir="build/antclasses" source="1.8" target="1.8" debug="true" deprecation="true">
<classpath>
<path refid="cp"/>
<pathelement location="${ant.jar}"/>
Expand Down
2 changes: 1 addition & 1 deletion java/form.nb/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
spec.version.base=0.33.0
requires.nb.javac=true
2 changes: 1 addition & 1 deletion java/form.refactoring/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
spec.version.base=0.32.0
requires.nb.javac=true
2 changes: 1 addition & 1 deletion java/form/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

extra.module.files=modules/ext/AbsoluteLayout.jar
javac.source=1.7
javac.source=1.8
javadoc.arch=${basedir}/arch.xml
spec.version.base=1.72.0
test-unit-sys-prop.org.netbeans.modules.form.layoutdesign.test=0
Expand Down
2 changes: 1 addition & 1 deletion java/i18n/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

javac.source=1.6
javac.source=1.8
javadoc.arch=${basedir}/arch.xml
disable.qa-functional.tests=true

Expand Down
2 changes: 1 addition & 1 deletion java/j2ee.metadata/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint:unchecked

javadoc.arch=${basedir}/arch.xml
Expand Down
2 changes: 1 addition & 1 deletion java/java.source.ant/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<target name="nblib" depends="init">
<mkdir dir="build/antclasses"/>
<javac srcdir="antsrc" destdir="build/antclasses" source="1.6" target="1.6" debug="true" deprecation="true">
<javac srcdir="antsrc" destdir="build/antclasses" release="8" debug="true" deprecation="true">
<classpath>
<path refid="cp"/>
<pathelement location="${ant.jar}"/>
Expand Down
2 changes: 1 addition & 1 deletion java/java.testrunner.ant/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
# specific language governing permissions and limitations
# under the License.
is.eager=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
2 changes: 1 addition & 1 deletion java/java.testrunner/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# specific language governing permissions and limitations
# under the License.
is.eager=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
requires.nb.javac=true
2 changes: 1 addition & 1 deletion java/javawebstart/AntTasks/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ javac.deprecation=false
javac.external.vm=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
Expand Down
2 changes: 1 addition & 1 deletion java/javawebstart/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

javac.compilerargs=-Xlint:unchecked
javac.source=1.7
javac.source=1.8
extra.module.files=ant/extra/org-netbeans-modules-javawebstart-anttasks.jar
jnlp.indirect.jars=ant/extra/org-netbeans-modules-javawebstart-anttasks.jar
requires.nb.javac=true
2 changes: 1 addition & 1 deletion java/junit/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


is.eager=true
javac.source=1.6
javac.source=1.8
javadoc.arch=${basedir}/arch.xml
javadoc.apichanges=${basedir}/apichanges.xml

Expand Down
2 changes: 1 addition & 1 deletion java/maven.checkstyle/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
2 changes: 1 addition & 1 deletion java/maven.coverage/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
nbm.homepage=http://wiki.netbeans.org/MavenCodeCoverage
nbm.module.author=Jesse Glick <jglick@netbeans.org>
2 changes: 1 addition & 1 deletion java/maven.hints/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
#javac.compilerargs=-Xlint -Xlint:-serial

test.config.stableBTD.includes=**/*Test.class
Expand Down
2 changes: 1 addition & 1 deletion java/maven.indexer.ui/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
# under the License.

is.autoload=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

2 changes: 1 addition & 1 deletion java/maven.junit/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

test.config.stableBTD.includes=**/*Test.class
2 changes: 1 addition & 1 deletion java/maven.kit/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
# specific language governing permissions and limitations
# under the License.

javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
2 changes: 1 addition & 1 deletion java/maven.osgi/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

test.config.stableBTD.includes=**/*Test.class
2 changes: 1 addition & 1 deletion java/maven.persistence/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
2 changes: 1 addition & 1 deletion java/maven.refactoring/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
requires.nb.javac=true
3 changes: 2 additions & 1 deletion java/maven.search/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

3 changes: 2 additions & 1 deletion java/maven.spring/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

2 changes: 1 addition & 1 deletion java/websvc.jaxws21/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
is.autoload=true

javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.6
javac.source=1.8
jnlp.indirect.jars=\
modules/ext/jaxws22/FastInfoset.jar,\
modules/ext/jaxws22/gmbal-api-only.jar,\
Expand Down
2 changes: 1 addition & 1 deletion java/websvc.jaxws21api/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
is.autoload=true

javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.6
javac.source=1.8
jnlp.indirect.jars=\
modules/ext/jaxws22/api/jaxws-api.jar,\
modules/ext/jaxws22/api/jsr181-api.jar,\
Expand Down
2 changes: 1 addition & 1 deletion java/xml.jaxb/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=1.6
javac.source=1.8
# added to classpath for compilation of unit tests
#test.unit.cp.extra=../../junit/external/junit-4.1.jar
# added to classpath for running of unit tests
Expand Down
3 changes: 2 additions & 1 deletion javafx/javafx2.platform/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=1.7
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

5 changes: 2 additions & 3 deletions javafx/javafx2.scenebuilder/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
# specific language governing permissions and limitations
# under the License.


javac.source=1.6
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
requires.nb.javac=true

# Please change this to point to jfxrt.jar coming e.g. from the JavaFX 2.0 SDK
#test-unit-sys-prop.jfxrt.url=file:/Users/david/Thunderbird/javafx-sdk2.0/rt/lib/jfxrt.jar
# The following works only inside Oracle (I am sorry):
test-unit-sys-prop.jfxrt.url=http://jre.us.oracle.com/java/re/javafx/2.0.2/promoted/latest/binaries/windows-i586/javafx-sdk2.0.2/rt/lib/jfxrt.jar
test-unit-sys-prop.jfxrt.url=http://jre.us.oracle.com/java/re/javafx/2.0.2/promoted/latest/binaries/windows-i586/javafx-sdk2.0.2/rt/lib/jfxrt.jar
2 changes: 1 addition & 1 deletion nb/updatecenters/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<tempfile destdir="${build.dir}" prefix="sign" suffix=".ks" property="netbeans.bundled.ks" deleteonexit="true" />
<tempfile destdir="${build.dir}" prefix="sign" suffix=".cert" property="netbeans.bundled.cert" deleteonexit="true"/>
<genkey
keystore="${netbeans.bundled.ks}"
keystore="${netbeans.bundled.ks}" keyalg="RSA"
alias="netbeans-bundled" storepass="${netbeans.bundled.ks}"
dname="CN=Ant Group, OU=NetBeans, O=Apache.org, C=US"
/>
Expand Down
Loading

0 comments on commit bf8c26d

Please sign in to comment.