diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index a07e1142d250..214076d28290 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -5,5 +5,5 @@ contact_links:
url: https://github.com/apache/netbeans/discussions/
about: Ask a question or request support for using Apache NetBeans.
- name: Mailing lists
- url: https://netbeans.apache.org/community/mailing-lists.html
+ url: https://netbeans.apache.org/community/mailing-lists
about: Subscribe to the users, dev or announce mailing lists for Apache NetBeans.
diff --git a/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml b/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml
index 39d09225a53d..11e1c5c44eef 100644
--- a/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml
@@ -27,8 +27,8 @@ body:
Latest releases are always available from https://netbeans.apache.org/download/
multiple: false
options:
- - "Apache NetBeans 20"
-# - "Apache NetBeans 21 release candidate"
+ - "Apache NetBeans 21"
+ - "Apache NetBeans 22 release candidate"
- "Apache NetBeans latest daily build"
validations:
required: true
@@ -73,13 +73,12 @@ body:
multiple: false
options:
- "No / Don't know"
+ - "Apache NetBeans 21"
+ - "Apache NetBeans 20"
- "Apache NetBeans 19"
- "Apache NetBeans 18"
- "Apache NetBeans 17"
- - "Apache NetBeans 16"
- - "Apache NetBeans 15"
- - "Apache NetBeans 14"
- - "Apache NetBeans 13 or earlier"
+ - "Apache NetBeans 16 or earlier"
validations:
required: true
- type: input
diff --git a/.github/actions/delete-artifact b/.github/actions/delete-artifact
deleted file mode 160000
index 54ab544f12cd..000000000000
--- a/.github/actions/delete-artifact
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 54ab544f12cdb7b71613a16a2b5a37a9ade990af
diff --git a/.github/release.yml b/.github/release.yml
index 91e1ce8ce946..559e27ee99b5 100644
--- a/.github/release.yml
+++ b/.github/release.yml
@@ -104,7 +104,7 @@ changelog:
labels:
- 'VSCode Extension'
- - title: 'Maintanance'
+ - title: 'Maintenance'
labels:
- 'Code cleanup'
- 'Upgrade Library'
diff --git a/.github/scripts/BinariesListUpdates.java b/.github/scripts/BinariesListUpdates.java
new file mode 100644
index 000000000000..6a64515f5ee3
--- /dev/null
+++ b/.github/scripts/BinariesListUpdates.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.atomic.LongAdder;
+import java.util.stream.Stream;
+import org.apache.maven.search.api.SearchRequest;
+import org.apache.maven.search.backend.smo.SmoSearchBackend;
+import org.apache.maven.search.backend.smo.SmoSearchBackendFactory;
+import org.apache.maven.artifact.versioning.ComparableVersion;
+
+import static java.util.FormatProcessor.FMT;
+import static org.apache.maven.search.api.MAVEN.ARTIFACT_ID;
+import static org.apache.maven.search.api.MAVEN.CLASSIFIER;
+import static org.apache.maven.search.api.MAVEN.GROUP_ID;
+import static org.apache.maven.search.api.MAVEN.VERSION;
+import static org.apache.maven.search.api.request.BooleanQuery.and;
+import static org.apache.maven.search.api.request.FieldQuery.fieldQuery;
+
+/**
+ * Scans for binaries-list files and checks if newer versions of the declared dependencies exist.
+ *
+ *
org.apache.maven.indexer:search-backend-smo
must be in classpath.
+ *
+ * @author mbien
+ */
+public class BinariesListUpdates {
+
+ private static final LongAdder updates = new LongAdder();
+ private static final LongAdder checks = new LongAdder();
+ private static final LongAdder skips = new LongAdder();
+
+ // java --enable-preview --source 22 --class-path "lib/*" BinariesListUpdates.java /path/to/netbeans/project
+ public static void main(String[] args) throws IOException, InterruptedException {
+
+ if (args.length != 1 || Files.notExists(Path.of(args[0]).resolve("README.md"))) {
+ throw new IllegalArgumentException("path to netbeans folder expected");
+ }
+
+ Path path = Path.of(args[0]);
+ try (Stream dependencyFiles = Files.find(path, 10, (p, a) -> p.getFileName().toString().equals("binaries-list"));
+ SmoSearchBackend backend = SmoSearchBackendFactory.createDefault()) {
+ dependencyFiles.sorted().forEach(p -> {
+ try {
+ checkDependencies(p, backend);
+ } catch (IOException | InterruptedException ex) {
+ throw new RuntimeException(ex);
+ }
+ });
+ }
+
+ System.out.println(STR."checked \{checks.sum()} dependencies, found \{updates.sum()} updates, skipped \{skips.sum()}." );
+ }
+
+ private static void checkDependencies(Path path, SmoSearchBackend backend) throws IOException, InterruptedException {
+ System.out.println(path);
+ try (Stream lines = Files.lines(path).parallel()) {
+
+ // 321C614F85F1DEA6BB08C1817C60D53B7F3552FD org.fusesource.jansi:jansi:2.4.0
+ lines.filter(l -> !l.startsWith("#"))
+ .filter(l -> l.length() > 40 && l.charAt(40) == ' ')
+ .map(l -> l.substring(40+1))
+ .forEach(l -> {
+
+ String[] comp = l.split("\\:");
+ if (comp.length == 3 || comp.length == 4) {
+ String gid = comp[0].strip();
+ String aid = comp[1].strip();
+ String version = comp[2].strip();
+ String classifier = comp.length == 4 ? comp[3].strip() : null;
+ try {
+ String gac;
+ String latest;
+ if (classifier == null) {
+ latest = queryLatestVersion(backend, gid, aid);
+ gac = String.join(":", gid, aid);
+ } else {
+ latest = queryLatestVersion(backend, gid, aid, classifier.split("@")[0]);
+ gac = String.join(":", gid, aid, classifier);
+ }
+ if (latest != null && !version.equals(latest)) {
+ System.out.println(FMT." %-50s\{gac} \{version} -> \{latest}");
+ updates.increment();
+ }
+ } catch (IOException | InterruptedException ex) {
+ throw new RuntimeException(ex);
+ }
+ } else {
+ System.out.println(" skip: '"+l+"'");
+ skips.increment();
+ }
+ checks.increment();
+ });
+ }
+ System.out.println();
+ }
+
+ private static String queryLatestVersion(SmoSearchBackend backend, String gid, String aid) throws IOException, InterruptedException {
+ return queryLatestVersion(backend, new SearchRequest(and(fieldQuery(GROUP_ID, gid), fieldQuery(ARTIFACT_ID, aid))));
+ }
+
+ private static String queryLatestVersion(SmoSearchBackend backend, String gid, String aid, String classifier) throws IOException, InterruptedException {
+ return queryLatestVersion(backend, new SearchRequest(and(fieldQuery(GROUP_ID, gid), fieldQuery(ARTIFACT_ID, aid), fieldQuery(CLASSIFIER, classifier))));
+ }
+
+ // reduce concurrency level if needed
+ private final static Semaphore requests = new Semaphore(4);
+
+ private static String queryLatestVersion(SmoSearchBackend backend, SearchRequest request) throws IOException, InterruptedException {
+ requests.acquire();
+ try {
+ return backend.search(request).getPage().stream()
+ .map(r -> r.getValue(VERSION))
+ .filter(v -> !v.contains("alpha") && !v.contains("beta"))
+ .filter(v -> !v.contains("M") && !v.contains("m") && !v.contains("B") && !v.contains("b") && !v.contains("ea"))
+ .limit(5)
+ .max((v1, v2) -> new ComparableVersion(v1).compareTo(new ComparableVersion(v2)))
+ .orElse(null);
+ } finally {
+ requests.release();
+ }
+ }
+
+}
diff --git a/.github/workflows/dependency-checks.yml b/.github/workflows/dependency-checks.yml
new file mode 100644
index 000000000000..034aca8b53c7
--- /dev/null
+++ b/.github/workflows/dependency-checks.yml
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: NetBeans Dependency Checks
+
+on:
+# pull_request:
+ # Allows you to run this workflow manually from the Actions tab in GitHub UI
+ workflow_dispatch:
+
+# cancel other workflow run in the same head-base group if it exists
+concurrency:
+ group: dep-checker-${{ github.head_ref || github.run_id }}-${{ github.base_ref }}
+ cancel-in-progress: true
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+
+ base-build:
+ name: Check Dependencies
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ steps:
+
+ - name: Checkout ${{ github.ref }} ( ${{ github.sha }} )
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ submodules: false
+ show-progress: false
+
+ - name: Check Dependencies
+ run: |
+ mvn -q dependency:copy -Dartifact=org.apache.maven.indexer:search-backend-smo:7.1.1 -DoutputDirectory=./lib
+ mvn -q dependency:copy -Dartifact=org.apache.maven.indexer:search-api:7.1.1 -DoutputDirectory=./lib
+ mvn -q dependency:copy -Dartifact=com.google.code.gson:gson:2.10.1 -DoutputDirectory=./lib
+ mvn -q dependency:copy -Dartifact=org.apache.maven:maven-artifact:3.9.6 -DoutputDirectory=./lib
+ echo "
" >> $GITHUB_STEP_SUMMARY
+ $JAVA_HOME_21_X64/bin/java --enable-preview --source 21 -cp "lib/*" .github/scripts/BinariesListUpdates.java ./ | tee -a $GITHUB_STEP_SUMMARY
+ echo "
" >> $GITHUB_STEP_SUMMARY
+ rm -Rf lib
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5856777d1c5c..b4943feb75cb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -50,11 +50,25 @@ env:
# what to build and test, see nbbuild/cluster.properties
CLUSTER_CONFIG: 'full'
+
+ # default java distribution used by the setup-java action
+ # see https://github.com/actions/setup-java#supported-distributions
+ DEFAULT_JAVA_DISTRIBUTION: 'zulu'
+
+ # labels are mapped to env vars for pipeline customization. If this is not a PR, (almost) everything will run, but with a reduced matrix.
+ # note: env vars don't work in the job's 'if' field but do work within jobs ( https://github.com/actions/runner/issues/1189 ), the whole expression must be duplicated
+
+ # labels for special commands:
+ # 'ci:all-tests' enables everything
+ # 'ci:no-build' disables the build job (and test jobs too)
+ # 'ci:dev-build' produces an artifact containing a runnable NetBeans zip distribution
- # flags for conditional, long running steps or jobs configurable with labels. If this is not a PR, everything will run.
# 'Java' label
test_java: ${{ contains(github.event.pull_request.labels.*.name, 'Java') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+ # 'JavaFX' label
+ test_javafx: ${{ contains(github.event.pull_request.labels.*.name, 'JavaFX') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+
# 'JavaDoc' or 'API Change' labels
test_javadoc: ${{ contains(github.event.pull_request.labels.*.name, 'JavaDoc') || contains(github.event.pull_request.labels.*.name, 'API Change') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
@@ -73,11 +87,9 @@ env:
# 'Platform' label
test_platform: ${{ contains(github.event.pull_request.labels.*.name, 'Platform') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
- # 'tests' label for building all tests
- test_tests: ${{ contains(github.event.pull_request.labels.*.name, 'tests') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
-
# 'LSP' label for enabling Language Server Protocol tests
- test_lsp: ${{ contains(github.event.pull_request.labels.*.name, 'LSP') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+ # 'Gradle' or 'Maven' will activate lsp tests too due to test dependencies on project API (ProjectViewTest, LspBrokenReferencesImplTest, ...)
+ test_lsp: ${{ contains(github.event.pull_request.labels.*.name, 'LSP') || contains(github.event.pull_request.labels.*.name, 'Gradle') || contains(github.event.pull_request.labels.*.name, 'Maven') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
# 'GraalVM' label for tests requirering GraalVM
test_graalvm: ${{ contains(github.event.pull_request.labels.*.name, 'GraalVM') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
@@ -85,17 +97,20 @@ env:
# 'VSCode Extension' label for building and testing the VSCode Extension
test_vscode_extension: ${{ contains(github.event.pull_request.labels.*.name, 'VSCode Extension') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
- # 'Ant', 'Gradle', 'Maven' and 'MX' labels trigger build-tools job
- # see job condition (env vars don't work for job conditions https://github.com/actions/runner/issues/1189 )
+ # 'Ant', 'Gradle', 'Maven' and 'MX' labels trigger the build-tools job
+ test_build_tools: ${{ contains(github.event.pull_request.labels.*.name, 'Ant') || contains(github.event.pull_request.labels.*.name, 'Gradle') || contains(github.event.pull_request.labels.*.name, 'Maven') || contains(github.event.pull_request.labels.*.name, 'MX') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
- # special commands:
- # 'ci:all-tests' enables everything
- # 'ci:no-build' disables the build job (and test jobs too)
- # 'ci:dev-build' produces an artifact containing a runnable NetBeans zip distribution
-
- # default java distribution used by the setup-java action
- # see https://github.com/actions/setup-java#supported-distributions
- default_java_distribution: 'zulu'
+ # 'git', 'subversion' and 'mercurial' labels trigger the versioning job
+ test_versioning: ${{ contains(github.event.pull_request.labels.*.name, 'git') || contains(github.event.pull_request.labels.*.name, 'subversion') || contains(github.event.pull_request.labels.*.name, 'mercurial') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+
+ # 'Java EE/Jakarta EE', 'Micronaut' and 'enterprise' labels trigger the enterprise job
+ test_enterprise: ${{ contains(github.event.pull_request.labels.*.name, 'Java EE/Jakarta EE') || contains(github.event.pull_request.labels.*.name, 'Micronaut') || contains(github.event.pull_request.labels.*.name, 'enterprise') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+
+ # 'JavaScript', 'TypeScript', 'HTML', 'CSS', 'CSL' and 'web' labels the trigger web job
+ test_web: ${{ contains(github.event.pull_request.labels.*.name, 'JavaScript') || contains(github.event.pull_request.labels.*.name, 'TypeScript') || contains(github.event.pull_request.labels.*.name, 'HTML') || contains(github.event.pull_request.labels.*.name, 'CSS') || contains(github.event.pull_request.labels.*.name, 'CSL') || contains(github.event.pull_request.labels.*.name, 'web') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+
+ # 'tests' label activates an extra step which builds all tests
+ test_tests: ${{ contains(github.event.pull_request.labels.*.name, 'tests') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
jobs:
@@ -106,18 +121,20 @@ jobs:
name: Build Clusters on JDK ${{ matrix.java }}
if: contains(github.event.pull_request.labels.*.name, 'ci:no-build') == false
runs-on: ubuntu-latest
- timeout-minutes: 60
+ timeout-minutes: 40
strategy:
matrix:
- java: [ '11', '21' ]
+ java: [ '17', '21', '22' ]
+ exclude:
+ - java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
fail-fast: false
steps:
-
+
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Checkout ${{ github.ref }} ( ${{ github.sha }} )
uses: actions/checkout@v4
@@ -127,7 +144,7 @@ jobs:
show-progress: false
- name: Caching dependencies
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.hgexternalcache
key: ${{ runner.os }}-${{ hashFiles('*/external/binaries-list', '*/*/external/binaries-list') }}
@@ -137,28 +154,30 @@ jobs:
run: ant $OPTS -quiet -Dcluster.config=$CLUSTER_CONFIG build-nozip
- name: Prepare Artifact
- if: ${{ matrix.java == '11' }}
+ if: ${{ matrix.java == '17' }}
run: tar -I 'zstd -9 -T0' -cf /tmp/build.tar.zst --exclude ".git" .
- name: Upload Workspace
- if: ${{ (matrix.java == '11') && success() }}
- uses: actions/upload-artifact@v3
+ if: ${{ (matrix.java == '17') && success() }}
+ uses: actions/upload-artifact@v4
with:
name: build
path: /tmp/build.tar.zst
+ compression-level: 0
retention-days: 2
if-no-files-found: error
- name: Create Dev Build
- if: ${{ matrix.java == '11' && contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && success() }}
+ if: ${{ matrix.java == '17' && contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && success() }}
run: ant $OPTS -quiet -Dcluster.config=$CLUSTER_CONFIG zip-cluster-config
- name: Upload Dev Build
- if: ${{ matrix.java == '11' && contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && success() }}
- uses: actions/upload-artifact@v3
+ if: ${{ matrix.java == '17' && contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && success() }}
+ uses: actions/upload-artifact@v4
with:
name: dev-build
path: nbbuild/NetBeans-*.zip
+ compression-level: 0
retention-days: 7
if-no-files-found: error
@@ -176,13 +195,13 @@ jobs:
submodules: false
show-progress: false
- - name: Set up JDK 11
- uses: actions/setup-java@v3
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
with:
- distribution: ${{ env.default_java_distribution }}
- java-version: 11
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
+ java-version: 17
- name: Caching dependencies
- uses: actions/cache/restore@v3
+ uses: actions/cache/restore@v4
with:
path: ~/.hgexternalcache
key: ${{ runner.os }}-${{ hashFiles('*/external/binaries-list', '*/*/external/binaries-list') }}
@@ -199,26 +218,26 @@ jobs:
run: ant $OPTS commit-validation -Dnbjavac.class.path=java/libs.javacapi/external/*.jar
# secondary jobs
- linux-commit-validation:
+ commit-validation:
name: CV on ${{ matrix.os }}/JDK ${{ matrix.java }}
needs: base-build
runs-on: ${{ matrix.os }}
- timeout-minutes: 60
+ timeout-minutes: 40
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
- java: [ 11 ]
+ java: [ 17 ]
include:
- os: ubuntu-latest
- java: 21
+ java: 22
fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
if: contains(matrix.os, 'ubuntu') && success()
@@ -227,7 +246,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -244,14 +263,12 @@ jobs:
if: contains(matrix.os, 'macos') && success()
run: ant $OPTS -f platform/masterfs.macosx test
- # fails on 17+
+ - name: Commit Validation tests
+ run: .github/retry.sh ant $OPTS -Dcluster.config=$CLUSTER_CONFIG commit-validation
+
- name: platform/core.network
- if: matrix.java == 11 && success()
run: ant $OPTS -f platform/core.network test
- - name: Commit Validation tests
- run: ant $OPTS -Dcluster.config=$CLUSTER_CONFIG commit-validation
-
- name: Create Test Summary
uses: test-summary/action@v2
if: failure()
@@ -264,21 +281,28 @@ jobs:
paperwork:
name: Check Paperwork on Linux/JDK ${{ matrix.java }}
needs: base-build
- if: always()
+ if: ${{ !cancelled() }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
ANT_OPTS: -Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
steps:
+ - name: Check PR labels
+ if: ${{ github.event_name == 'pull_request' && join(github.event.pull_request.labels.*.name) == '' }}
+ run: |
+ echo "::error::PRs must be labeled, see: https://cwiki.apache.org/confluence/display/NETBEANS/PRs+and+You+-+A+reviewer+Guide"
+ exit 1
+
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ if: ${{ !cancelled() }}
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Checkout ${{ github.ref }} ( ${{ github.sha }} )
if: ${{ !cancelled() }}
@@ -308,7 +332,7 @@ jobs:
- name: Download Build
if: ${{ needs.base-build.result == 'success' && !cancelled() }}
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -330,23 +354,29 @@ jobs:
build-system-test:
- name: Build-System Test on Linux/JDK ${{ matrix.java }}
+ name: Build-System / Misc Tests on Linux/JDK ${{ matrix.java }}
needs: base-build
runs-on: ubuntu-latest
- timeout-minutes: 60
+ timeout-minutes: 100
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
+
+ - name: Setup Xvfb
+ run: |
+ echo "DISPLAY=:99.0" >> $GITHUB_ENV
+ Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -355,44 +385,54 @@ jobs:
- name: Test Netbeans Build System
run: ant $OPTS -Dcluster.config=$CLUSTER_CONFIG localtest
+
+ - name: harness/o.n.insane
+ run: ant $OPTS -f harness/o.n.insane test
- - name: Build all Tests
- # runs only in PRs if requested, nowhere else (~18 min)
- if: env.test_tests == 'true' && github.event_name == 'pull_request' && success()
- run: ant -quiet -Dcluster.config=$CLUSTER_CONFIG test -Dtest.includes=NoTestsJustBuild
+ - name: harness/apisupport.harness
+ run: ant $OPTS -f harness/apisupport.harness test
+ - name: harness/harness/nbjunit
+ run: ant $OPTS -f harness/nbjunit test
- build-nbms:
- name: Build NBMs and Javadoc on JDK ${{ matrix.java }}
- needs: base-build
- runs-on: ubuntu-latest
- timeout-minutes: 60
- strategy:
- matrix:
- java: [ '11' ]
- steps:
+ - name: harness/jellytools.platform
+ run: ant $OPTS -f harness/jellytools.platform test -Dtest.config=stable
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
- with:
- java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ - name: ergonomics/ide.ergonomics
+ run: ant $OPTS -f ergonomics/ide.ergonomics test -Dtest.config=commit
- - name: Download Build
- uses: actions/download-artifact@v3
- with:
- name: build
+ - name: nb/deadlock.detector
+ run: ant $OPTS -f nb/deadlock.detector test
- - name: Extract
- run: tar --zstd -xf build.tar.zst
+ - name: nb/ide.branding
+ run: ant $OPTS -f nb/ide.branding test
+ - name: nb/o.n.upgrader
+ run: ant $OPTS -f nb/o.n.upgrader test
+
+# - name: nb/updatecenters
+# run: ant $OPTS -f nb/updatecenters test
+
+ # 5-6 min
- name: Build nbms
run: ant $OPTS build-nbms
+ # 13-14 min
- name: Build javadoc
if: env.test_javadoc == 'true' && success()
run: ant $OPTS build-javadoc
+ # runs only in PRs if requested; ~18 min
+ - name: Build all Tests
+ if: env.test_tests == 'true' && github.event_name == 'pull_request' && success()
+ run: ant -quiet -Dcluster.config=$CLUSTER_CONFIG test -Dtest.includes=NoTestsJustBuild
+
+ - name: Create Test Summary
+ uses: test-summary/action@v2
+ if: failure()
+ with:
+ paths: "./*/*/build/test/*/results/TEST-*.xml"
+
build-from-src-zip:
name: Build ${{ matrix.config }} from src.zip on JDK ${{ matrix.java }}
@@ -403,18 +443,19 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
config: [ 'platform', 'release' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -422,7 +463,7 @@ jobs:
run: tar --zstd -xf build.tar.zst
- name: Restoring Cache
- uses: actions/cache/restore@v3
+ uses: actions/cache/restore@v4
with:
path: ~/.hgexternalcache
key: ${{ runner.os }}-${{ hashFiles('*/external/binaries-list', '*/*/external/binaries-list') }}
@@ -444,7 +485,7 @@ jobs:
# extra round for VSCodeExt which is built with 'release' config
- name: Set up node
if: ${{ (matrix.config == 'release') && success() }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: 18
@@ -462,14 +503,15 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -477,7 +519,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -508,21 +550,6 @@ jobs:
- name: ide/core.ide
run: ant $OPTS -f ide/core.ide test
- - name: ide/csl.api
- run: ant $OPTS -f ide/csl.api test
-
- - name: ide/csl.types
- run: ant $OPTS -f ide/csl.types test
-
- - name: ide/css.editor
- run: ant $OPTS -f ide/css.editor test
-
- - name: ide/css.lib
- run: ant $OPTS -f ide/css.lib test
-
- - name: ide/css.model
- run: ant $OPTS -f ide/css.model test
-
- name: ide/db
run: .github/retry.sh ant $OPTS -f ide/db test
@@ -592,27 +619,6 @@ jobs:
- name: ide/gsf.testrunner.ui
run: ant $OPTS -f ide/gsf.testrunner.ui test
- - name: ide/html
- run: .github/retry.sh ant $OPTS -f ide/html test
-
- - name: ide/html.custom
- run: ant $OPTS -f ide/html.custom test
-
- - name: ide/html.editor
- run: ant $OPTS -f ide/html.editor test
-
- - name: ide/html.editor
- run: ant $OPTS -f ide/html.editor.lib test
-
- - name: ide/html.lexer
- run: ant $OPTS -f ide/html.lexer test
-
- - name: ide/html.parser
- run: ant $OPTS -f ide/html.parser test
-
- - name: ide/html.validation
- run: ant $OPTS -f ide/html.validation test
-
- name: ide/httpserver
run: ant $OPTS -f ide/httpserver test
@@ -658,9 +664,6 @@ jobs:
- name: ide/libs.freemarker
run: ant $OPTS -f ide/libs.freemarker test
- - name: ide/libs.git
- run: ant $OPTS -f ide/libs.git test
-
- name: ide/libs.graalsdk
run: ant $OPTS -f ide/libs.graalsdk test
@@ -670,11 +673,8 @@ jobs:
- name: ide/libs.truffleapi
run: ant $OPTS -f ide/libs.truffleapi test
- - name: ide/lsp.client
- run: ant $OPTS -f ide/lsp.client test
-
- name: ide/notifications
- run: ant $OPTS -f ide/notifications test
+ run: .github/retry.sh ant $OPTS -f ide/notifications test
- name: ide/o.openidex.util
run: ant $OPTS -f ide/o.openidex.util test
@@ -739,15 +739,6 @@ jobs:
- name: ide/utilities
run: ant $OPTS -f ide/utilities test
- - name: ide/versioning.masterfs
- run: ant $OPTS -f ide/versioning.masterfs test
-
- - name: ide/versioning.ui
- run: ant $OPTS -f ide/versioning.ui test
-
- - name: ide/versioning.util
- run: ant $OPTS -f ide/versioning.util test
-
- name: ide/web.common
run: ant $OPTS -f ide/web.common test
@@ -810,23 +801,25 @@ jobs:
build-tools:
- name: Build Tools on Linux/JDK ${{ matrix.java }} (some on 17)
+ name: Build-Tools on Linux/JDK ${{ matrix.java }}
# label triggers: Ant, Gradle, Maven, MX
if: ${{ contains(github.event.pull_request.labels.*.name, 'Ant') || contains(github.event.pull_request.labels.*.name, 'Gradle') || contains(github.event.pull_request.labels.*.name, 'Maven') || contains(github.event.pull_request.labels.*.name, 'MX') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
- timeout-minutes: 60
+ timeout-minutes: 50
strategy:
matrix:
- java: [ '11', '17', '21' ]
+ java: [ '17', '21', '22' ]
+ exclude:
+ - java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -834,7 +827,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -898,28 +891,25 @@ jobs:
# - name: java/ant.grammar
# run: ant $OPTS -f java/ant.grammar test
- - name: Set up JDK 17 for JDK 21 incompatible tests
- if: ${{ matrix.java == '21' }}
- uses: actions/setup-java@v3
- with:
- java-version: 17
- distribution: ${{ env.default_java_distribution }}
-
- # TODO fix JDK 21 incompatibilites
+ # TODO next are JDK 21+ incompatibe steps
- name: java/java.mx.project
- continue-on-error: ${{ github.event_name != 'pull_request' }}
+ if: ${{ matrix.java == '17' }}
run: .github/retry.sh ant $OPTS -f java/java.mx.project test
- name: java/gradle.java
+ if: ${{ matrix.java == '17' }}
run: .github/retry.sh ant $OPTS -f java/gradle.java test
- name: extide/gradle
+ if: ${{ matrix.java == '17' }}
run: ant $OPTS -f extide/gradle test
- name: java/gradle.dependencies
+ if: ${{ matrix.java == '17' }}
run: ant $OPTS -f java/gradle.dependencies test
- name: extide/o.apache.tools.ant.module
+ if: ${{ matrix.java == '17' }}
run: ant $OPTS -f extide/o.apache.tools.ant.module test
- name: Create Test Summary
@@ -938,14 +928,15 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -953,7 +944,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -984,9 +975,6 @@ jobs:
- name: platform/api.search
run: ant $OPTS -f platform/api.search test
- - name: platform/api.templates
- run: ant $OPTS -f platform/api.templates test
-
- name: platform/api.visual
run: ant $OPTS -f platform/api.visual test
@@ -1053,9 +1041,6 @@ jobs:
- name: platform/keyring.impl
run: ant $OPTS -f platform/keyring.impl test
- - name: platform/libs.javafx
- run: ant $OPTS -f platform/libs.javafx test
-
- name: platform/libs.junit4
run: ant $OPTS -f platform/libs.junit4 test
@@ -1075,14 +1060,14 @@ jobs:
run: ant $OPTS -f platform/o.n.swing.tabcontrol test
- name: Set up JDK 8 for incompatibe tests
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: 8
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
# TODO fix JDK 11 incompatibilities
- name: platform/lib.uihandler
- run: ant $OPTS -f platform/lib.uihandler test
+ run: .github/retry.sh ant $OPTS -f platform/lib.uihandler test
- name: platform/openide.text
run: .github/retry.sh ant $OPTS -f platform/openide.text test
@@ -1119,20 +1104,15 @@ jobs:
timeout-minutes: 90
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- - name: Set up JDK 11
- uses: actions/setup-java@v3
- with:
- java-version: 11
- distribution: ${{ env.default_java_distribution }}
-
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1140,7 +1120,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1231,86 +1211,31 @@ jobs:
- name: platform/spi.quicksearch
run: ant $OPTS -f platform/spi.quicksearch test
- - name: platform/templates
- run: ant $OPTS -f platform/templates test
-
- name: platform/templatesui
run: ant $OPTS -f platform/templatesui test
- name: platform/uihandler
- run: ant $OPTS -f platform/uihandler test
+ run: .github/retry.sh ant $OPTS -f platform/uihandler test
- name: platform/o.n.bootstrap
run: ant $OPTS -f platform/o.n.bootstrap test
- - name: Create Test Summary
- uses: test-summary/action@v2
- if: failure()
+ - name: Set up JDK 11 for platform/templates
+ uses: actions/setup-java@v4
with:
- paths: "./*/*/build/test/*/results/TEST-*.xml"
-
-
- harness-modules-test:
- name: Harness, NB and Ergonomics on Linux/JDK ${{ matrix.java }}
- # equals env.test_platform == 'true'
- if: ${{ contains(github.event.pull_request.labels.*.name, 'Platform') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
- needs: base-build
- runs-on: ubuntu-latest
- timeout-minutes: 60
- strategy:
- matrix:
- java: [ '11' ]
- steps:
-
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
- with:
- java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
-
- - name: Setup Xvfb
- run: |
- echo "DISPLAY=:99.0" >> $GITHUB_ENV
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
-
- - name: Download Build
- uses: actions/download-artifact@v3
- with:
- name: build
-
- - name: Extract
- run: tar --zstd -xf build.tar.zst
-
- - name: harness/o.n.insane
- run: ant $OPTS -f harness/o.n.insane test
-
- - name: harness/apisupport.harness
- run: ant $OPTS -f harness/apisupport.harness test
-
- - name: harness/harness/nbjunit
- run: ant $OPTS -f harness/nbjunit test
-
- - name: harness/jellytools.platform
- run: ant $OPTS -f harness/jellytools.platform test -Dtest.config=stable
-
- - name: ergonomics/ide.ergonomics
- run: ant $OPTS -f ergonomics/ide.ergonomics test -Dtest.config=commit
-
- - name: nb/deadlock.detector
- run: ant $OPTS -f nb/deadlock.detector test
+ java-version: 11
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- - name: nb/ide.branding
- run: ant $OPTS -f nb/ide.branding test
+ # TODO tests rely on javax.script.ScriptEngine / js which locks this to JDK 11
+ - name: platform/templates
+ run: ant $OPTS -f platform/templates test
- - name: nb/o.n.upgrader
- run: ant $OPTS -f nb/o.n.upgrader test
+ - name: platform/api.templates
+ run: ant $OPTS -f platform/api.templates test
-# - name: nb/updatecenters
-# run: ant $OPTS -f nb/updatecenters test
+ - name: platform/openide.loaders TemplatesMimeTypeTest
+ run: ant $OPTS -f platform/openide.loaders test -Dtest.config.default.includes=**/TemplatesMimeTypeTest.class -Dtest.config.default.excludes=""
- - name: nb/welcome
- run: ant $OPTS -f nb/welcome test
-
- name: Create Test Summary
uses: test-summary/action@v2
if: failure()
@@ -1320,19 +1245,22 @@ jobs:
java-modules-test:
name: Java Modules on Linux/JDK ${{ matrix.java }}
+ # equals env.test_java == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'Java') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 100
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1340,7 +1268,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1363,15 +1291,12 @@ jobs:
run: ant $OPTS -f java/editor.htmlui test
- name: java.completion
- if: env.test_java == 'true' && success()
run: ant $OPTS -f java/java.completion test
- name: java.editor.base
- if: env.test_java == 'true' && success()
run: ant $OPTS -f java/java.editor.base test
- name: java.editor
- if: env.test_java == 'true' && success()
run: .github/retry.sh ant $OPTS -f java/java.editor test-unit
- name: java.freeform
@@ -1414,7 +1339,6 @@ jobs:
# run: ant $OPTS -f java/java.source.ant test
- name: java.source.base
- if: env.test_java == 'true' && success()
run: ant $OPTS -f java/java.source.base test
- name: java.source.compat8
@@ -1424,7 +1348,6 @@ jobs:
run: ant $OPTS -f java/java.source.queriesimpl test
- name: java.sourceui
- if: env.test_java == 'true' && success()
run: ant $OPTS -f java/java.sourceui test
- name: java.testrunner
@@ -1439,8 +1362,8 @@ jobs:
# - name: jellytools.java
# run: ant $OPTS -f java/jellytools.java test
-# - name: jshell.support
-# run: ant $OPTS -f java/jshell.support test
+ - name: jshell.support
+ run: ant $OPTS -f java/jshell.support test
- name: junit
run: ant $OPTS -f java/junit test-unit
@@ -1466,9 +1389,6 @@ jobs:
- name: spellchecker.bindings.java
run: ant $OPTS -f java/spellchecker.bindings.java test
- - name: spring.beans
- run: ant $OPTS -f java/spring.beans test
-
- name: testng
run: ant $OPTS -f java/testng test
@@ -1488,15 +1408,12 @@ jobs:
run: ant $OPTS -f java/java.lexer test
- name: refactoring.java
- if: env.test_java == 'true' && success()
run: ant $OPTS -f java/refactoring.java test-unit
- name: form
- if: env.test_java == 'true' && success()
run: ant $OPTS -f java/form test-unit
- name: javadoc
- if: env.test_javadoc == 'true' && success()
run: ant $OPTS -f java/javadoc test
- name: Create Test Summary
@@ -1506,6 +1423,7 @@ jobs:
paths: "./*/*/build/test/*/results/TEST-*.xml"
+ # TODO merge this job into other jobs once tests are fixed
apisupport-modules-test:
name: APISupport Modules on Linux/JDK ${{ matrix.java }}
needs: base-build
@@ -1514,13 +1432,14 @@ jobs:
strategy:
matrix:
java: [ '8' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1528,7 +1447,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1566,16 +1485,18 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17', '22' ]
config: [ 'batch1', 'batch2' ]
+ exclude:
+ - java: ${{ github.event_name == 'pull_request' && 'nothing' || '22' }}
fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1583,7 +1504,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1617,15 +1538,17 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11', '21' ]
+ java: [ '17', '21', '22' ]
+ exclude:
+ - java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1633,7 +1556,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1650,7 +1573,7 @@ jobs:
run: ant $OPTS -f java/debugger.jpda.js test
- name: debugger.jpda.projects
- run: ant $OPTS -f java/debugger.jpda.projects test
+ run: .github/retry.sh ant $OPTS -f java/debugger.jpda.projects test
- name: debugger.jpda.projectsui
run: ant $OPTS -f java/debugger.jpda.projectsui test
@@ -1670,19 +1593,22 @@ jobs:
profiler-test:
name: Profiler on Linux/JDK ${{ matrix.java }}
+ # equals env.test_java == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'Java') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
java: [ '11' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1690,7 +1616,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1700,6 +1626,7 @@ jobs:
- name: profiler
run: ant $OPTS -f profiler/profiler test-unit
+ # TODO OQL requires js script engine which locks this to JDK 11
- name: profiler.oql
run: ant $OPTS -f profiler/profiler.oql test
@@ -1711,20 +1638,23 @@ jobs:
webcommon-test:
- name: Webcommon Modules on Linux/JDK ${{ matrix.java }}
+ name: Web Modules on Linux/JDK ${{ matrix.java }}
+ # equals env.test_web == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'JavaScript') || contains(github.event.pull_request.labels.*.name, 'TypeScript') || contains(github.event.pull_request.labels.*.name, 'HTML') || contains(github.event.pull_request.labels.*.name, 'CSS') || contains(github.event.pull_request.labels.*.name, 'CSL') || contains(github.event.pull_request.labels.*.name, 'web') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1732,15 +1662,48 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
- name: Extract
run: tar --zstd -xf build.tar.zst
- - name: webcommon/api.knockout
- run: ant $OPTS -f webcommon/api.knockout test
+ - name: ide/csl.api
+ run: ant $OPTS -f ide/csl.api test
+
+ - name: ide/csl.types
+ run: ant $OPTS -f ide/csl.types test
+
+ - name: ide/css.editor
+ run: ant $OPTS -f ide/css.editor test
+
+ - name: ide/css.lib
+ run: ant $OPTS -f ide/css.lib test
+
+ - name: ide/css.model
+ run: ant $OPTS -f ide/css.model test
+
+ - name: ide/html
+ run: .github/retry.sh ant $OPTS -f ide/html test
+
+ - name: ide/html.custom
+ run: ant $OPTS -f ide/html.custom test
+
+ - name: ide/html.editor
+ run: ant $OPTS -f ide/html.editor test
+
+ - name: ide/html.editor
+ run: ant $OPTS -f ide/html.editor.lib test
+
+ - name: ide/html.lexer
+ run: ant $OPTS -f ide/html.lexer test
+
+ - name: ide/html.parser
+ run: ant $OPTS -f ide/html.parser test
+
+ - name: ide/html.validation
+ run: ant $OPTS -f ide/html.validation test
# - name: webcommon/cordova
# run: ant $OPTS -f webcommon/cordova test
@@ -1839,6 +1802,16 @@ jobs:
- name: webcommon/web.inspect
run: ant $OPTS -f webcommon/web.inspect test
+ - name: Set up JDK 11 for webcommon/api.knockout
+ uses: actions/setup-java@v4
+ with:
+ java-version: 11
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
+
+ # TODO: requires js script engine
+ - name: webcommon/api.knockout
+ run: ant $OPTS -f webcommon/api.knockout test
+
- name: Create Test Summary
uses: test-summary/action@v2
if: failure()
@@ -1848,19 +1821,22 @@ jobs:
javafx-test:
name: JavaFX on Linux/JDK ${{ matrix.java }}
+ # equals env.test_javafx == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'JavaFX') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1868,13 +1844,16 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
- name: Extract
run: tar --zstd -xf build.tar.zst
+ - name: platform/libs.javafx
+ run: ant $OPTS -f platform/libs.javafx test
+
- name: javafx2.editor
run: ant $OPTS -f javafx/javafx2.editor test -Dtest.config=stable
@@ -1898,13 +1877,14 @@ jobs:
strategy:
matrix:
java: [ '8' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1912,7 +1892,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1953,14 +1933,15 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -1968,7 +1949,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -1992,20 +1973,23 @@ jobs:
enterprise-test:
- name: Enterprise on Linux/JDK ${{ matrix.java }} (some on 8 and 17)
+ name: Enterprise on Linux/JDK ${{ matrix.java }} (some on 8)
+ # equals env.test_enterprise == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'Java EE/Jakarta EE') || contains(github.event.pull_request.labels.*.name, 'Micronaut') || contains(github.event.pull_request.labels.*.name, 'enterprise') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -2013,13 +1997,16 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
- name: Extract
run: tar --zstd -xf build.tar.zst
+ - name: micronaut
+ run: .github/retry.sh ant $OPTS -f enterprise/micronaut test
+
- name: api.web.webmodule
run: ant $OPTS -f enterprise/api.web.webmodule test
@@ -2035,6 +2022,7 @@ jobs:
- name: glassfish.common
run: ant $OPTS -f enterprise/glassfish.common test
+# TODO failing tests commented out
# Fails
# - name: glassfish.javaee
# run: ant $OPTS -f enterprise/glassfish.javaee test
@@ -2123,6 +2111,9 @@ jobs:
- name: spring.webmvc
run: ant $OPTS -f enterprise/spring.webmvc test
+ - name: spring.beans
+ run: ant $OPTS -f java/spring.beans test
+
- name: tomcat5
run: ant $OPTS -f enterprise/tomcat5 test
@@ -2168,10 +2159,6 @@ jobs:
# - name: web.project
# run: ant $OPTS -f enterprise/web.project test
-# Fails
-# - name: web.struts
-# run: ant $OPTS -f enterprise/web.struts test
-
- name: websvc.clientapi
run: ant $OPTS -f enterprise/websvc.clientapi test
@@ -2219,10 +2206,10 @@ jobs:
run: ant $OPTS -f enterprise/websvc.wsstackapi test
- name: Set up JDK 8 for incompatible tests
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: 8
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: websvc.editor.hints
run: ant $OPTS -f enterprise/websvc.editor.hints test
@@ -2230,15 +2217,6 @@ jobs:
- name: j2ee.dd.webservice
run: ant $OPTS -f enterprise/j2ee.dd.webservice test
- - name: Set up JDK 17 for tests that are not compatible with JDK 11
- uses: actions/setup-java@v3
- with:
- java-version: 17
- distribution: ${{ env.default_java_distribution }}
-
- - name: micronaut
- run: .github/retry.sh ant $OPTS -f enterprise/micronaut test
-
- name: Create Test Summary
uses: test-summary/action@v2
if: failure()
@@ -2248,19 +2226,22 @@ jobs:
versioning-test:
name: Versioning Modules on Linux/JDK ${{ matrix.java }}
+ # equals env.test_versioning == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'git') || contains(github.event.pull_request.labels.*.name, 'subversion') || contains(github.event.pull_request.labels.*.name, 'mercurial') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -2268,7 +2249,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -2278,6 +2259,21 @@ jobs:
- name: Setup Env
run: echo "GIT_TEST_REPO=$HOME/git_test_repo" >> $GITHUB_ENV
+ - name: ide/git
+ run: .github/retry.sh ant $OPTS -f ide/git test-unit
+
+ - name: ide/libs.git
+ run: .github/retry.sh ant $OPTS -f ide/libs.git test
+
+ - name: ide/versioning.masterfs
+ run: ant $OPTS -f ide/versioning.masterfs test
+
+ - name: ide/versioning.ui
+ run: ant $OPTS -f ide/versioning.ui test
+
+ - name: ide/versioning.util
+ run: ant $OPTS -f ide/versioning.util test
+
- name: ide/versioning.core
run: ant $OPTS -f ide/versioning.core test-unit
@@ -2313,12 +2309,15 @@ jobs:
mysql-db-test:
name: DB Tests with MySQL on Linux/JDK ${{ matrix.java }}
+ # equals env.test_enterprise == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'Java EE/Jakarta EE') || contains(github.event.pull_request.labels.*.name, 'Micronaut') || contains(github.event.pull_request.labels.*.name, 'enterprise') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
services:
mysql:
@@ -2332,10 +2331,10 @@ jobs:
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -2343,7 +2342,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -2370,6 +2369,8 @@ jobs:
php:
name: PHP on ${{ matrix.os }}/JDK ${{ matrix.java }}
+ # equals env.test_php == 'true'
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'PHP') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ${{ matrix.os }}
timeout-minutes: 120
@@ -2377,23 +2378,39 @@ jobs:
DISPLAY: ":99.0"
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
os: [ 'windows-latest', 'ubuntu-latest' ]
+ exclude:
+ - os: ${{ github.event_name == 'pull_request' && 'nothing' || 'windows-latest' }}
fail-fast: false
+ defaults:
+ run:
+ # hack: shorten paths to stay below 32k char process arg limit of windows (symptom: junit jvm spawn failures)
+ # note 'a' is apparently a mount point, we shouldn't go below that
+ # note actions don't care about the defaults here, its just for 'run:', they will keep using the long path which is fine
+ working-directory: ${{ contains(matrix.os, 'windows') && 'D:\\a\\ws' || github.workspace }}
+ shell: bash
+
steps:
+ - name: Symlink short paths for windows
+ if: contains(matrix.os, 'windows')
+ run: mklink /d D:\\a\\ws ${{ github.workspace }}
+ working-directory: ${{ github.workspace }}
+ shell: cmd
+
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
# linux specific setup
- name: Setup PHP
if: contains(matrix.os, 'ubuntu')
uses: shivammathur/setup-php@v2
with:
- php-version: '7.4'
+ php-version: '8.3'
tools: pecl
extensions: xdebug
ini-values: xdebug.mode=debug
@@ -2404,7 +2421,7 @@ jobs:
# - - -
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -2460,11 +2477,9 @@ jobs:
# longest step (~40min)
- name: php.editor
- if: env.test_php == 'true' && success()
run: ant $OPTS -Dtest.config=stable -f php/php.editor test
- name: php.editor (unreliable tests)
- if: env.test_php == 'true' && success()
run: .github/retry.sh ant $OPTS -Dtest.config=unreliable -f php/php.editor test
- name: php.latte
@@ -2513,20 +2528,21 @@ jobs:
lsp-test:
name: LSP tests on Linux/JDK ${{ matrix.java }}
# equals env.test_lsp == 'true'
- if: ${{ contains(github.event.pull_request.labels.*.name, 'LSP') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
+ if: ${{ contains(github.event.pull_request.labels.*.name, 'LSP') || contains(github.event.pull_request.labels.*.name, 'Gradle') || contains(github.event.pull_request.labels.*.name, 'Maven') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
needs: base-build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Setup Xvfb
run: |
@@ -2534,13 +2550,16 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
- name: Extract
run: tar --zstd -xf build.tar.zst
+ - name: ide/lsp.client
+ run: ant $OPTS -f ide/lsp.client test
+
- name: java/java.lsp.server
run: .github/retry.sh ant $OPTS -f java/java.lsp.server test
@@ -2560,6 +2579,8 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
+ # TODO uses GraalVM 17 / 22.3.1 which is the last known release which offers all required language extensions
+ # GraalVM based on JDK 21+ doesn't support the 'gu' tool anymore - extensions are now regular application dependencies
graal: [ '22.3.1' ]
fail-fast: false
@@ -2570,21 +2591,21 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
- name: Extract
run: tar --zstd -xf build.tar.zst
- - name: Setup GraalVM
+ - name: Setup GraalVM ${{ matrix.graal }}
run: |
- URL=https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${{ matrix.graal }}/graalvm-ce-java11-linux-amd64-${{ matrix.graal }}.tar.gz
+ URL=https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${{ matrix.graal }}/graalvm-ce-java17-linux-amd64-${{ matrix.graal }}.tar.gz
curl -L $URL | tar -xz
- GRAALVM=`pwd`/graalvm-ce-java11-${{ matrix.graal }}
+ GRAALVM=`pwd`/graalvm-ce-java17-${{ matrix.graal }}
echo "JAVA_HOME=$GRAALVM" >> $GITHUB_ENV
- - name: Setup GraalVM Languages
+ - name: Setup GraalVM Languages (python, R, ruby and js)
run: $JAVA_HOME/bin/gu install --no-progress python R ruby js
- name: platform/core.network
@@ -2624,17 +2645,18 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
- java: [ '11' ]
+ java: [ '17' ]
+ fail-fast: false
steps:
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
- distribution: ${{ env.default_java_distribution }}
+ distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
- name: Set up node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: 18
@@ -2644,7 +2666,7 @@ jobs:
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Build
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build
@@ -2667,15 +2689,13 @@ jobs:
name: Cleanup Workflow Artifacts
needs:
- base-build
- - linux-commit-validation
+ - commit-validation
- paperwork
- build-system-test
- - build-nbms
- build-from-src-zip
- ide-modules-test
- platform-modules-test1
- platform-modules-test2
- - harness-modules-test
- java-modules-test
- java-hints-test
- java-debugger-test
@@ -2702,22 +2722,15 @@ jobs:
timeout-minutes: 60
steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- persist-credentials: false
- submodules: true
- show-progress: false
-
- name: Delete Workspace Artifact
- uses: ./.github/actions/delete-artifact/
+ uses: geekyeggo/delete-artifact@v5
with:
name: build
- failOnError: true
+ useGlob: false
- name: Delete Dev Build Artifact
- uses: ./.github/actions/delete-artifact/
+ uses: geekyeggo/delete-artifact@v5
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && cancelled() }}
with:
name: dev-build
- failOnError: true
+ useGlob: false
diff --git a/.github/workflows/native-binary-build-dlight.nativeexecution.yml b/.github/workflows/native-binary-build-dlight.nativeexecution.yml
index 19b89facf035..2afaa8726c0a 100644
--- a/.github/workflows/native-binary-build-dlight.nativeexecution.yml
+++ b/.github/workflows/native-binary-build-dlight.nativeexecution.yml
@@ -94,7 +94,7 @@ jobs:
ls -l -R ${SOURCES}
- name: Upload native sources
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: nativeexecution-external-sources
path: ide/dlight.nativeexecution/build/sources/
@@ -110,7 +110,7 @@ jobs:
steps:
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: nativeexecution-external-sources
@@ -126,7 +126,7 @@ jobs:
working-directory: ide/dlight.nativeexecution/tools
- name: Upload artifact Linux 64 bit
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: Linux-x86_64
path: ide/dlight.nativeexecution/tools/buildall/
@@ -144,7 +144,7 @@ jobs:
# steps:
#
# - name: Download sources
-# uses: actions/download-artifact@v3
+# uses: actions/download-artifact@v4
# with:
# name: nativeexecution-external-sources
#
@@ -158,7 +158,7 @@ jobs:
# shell: bash
# working-directory: ide/dlight.nativeexecution/tools
# - name: Upload artifact Windows 64 bit
-# uses: actions/upload-artifact@v3
+# uses: actions/upload-artifact@v4
# with:
# name: Windows-x86_64
# path: ide/dlight.nativeexecution/tools/buildall/
@@ -174,7 +174,7 @@ jobs:
steps:
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: nativeexecution-external-sources
@@ -188,7 +188,7 @@ jobs:
working-directory: ide/dlight.nativeexecution/tools
- name: Upload artifact macOS x86_64
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: MacOSX-x86_64
path: ide/dlight.nativeexecution/tools/buildall/
@@ -203,7 +203,7 @@ jobs:
steps:
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: nativeexecution-external-sources
@@ -217,7 +217,7 @@ jobs:
working-directory: ide/dlight.nativeexecution/tools
- name: Upload artifact macOS arm64
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: MacOSX-arm_64
path: ide/dlight.nativeexecution/tools/buildall/
@@ -238,7 +238,7 @@ jobs:
run: mkdir -p myfiles/
- name: Download artifacts from predecessor jobs
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
path: myfiles/
@@ -267,7 +267,7 @@ jobs:
echo "" >> "$BUILDINFO"
- name: Upload bundle
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: nativeexecution-external-binaries
path: myfiles/
diff --git a/.github/workflows/native-binary-build-launcher.yml b/.github/workflows/native-binary-build-launcher.yml
index 2b4ea7b96eb9..c0bd965708dc 100644
--- a/.github/workflows/native-binary-build-launcher.yml
+++ b/.github/workflows/native-binary-build-launcher.yml
@@ -86,7 +86,7 @@ jobs:
ls -l -R ${SOURCES}
- name: Upload native sources
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: launcher-external-sources
path: nbbuild/build/native/launcher/sources/
@@ -105,7 +105,7 @@ jobs:
run: sudo apt install mingw-w64 mingw-w64-tools
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: launcher-external-sources
@@ -119,7 +119,7 @@ jobs:
working-directory: platform/o.n.bootstrap/launcher/windows/
- name: Upload bootstrap artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: launcher-bootstrap-bin
path: platform/o.n.bootstrap/launcher/windows/build/
@@ -135,7 +135,7 @@ jobs:
working-directory: harness/apisupport.harness/windows-launcher-src
- name: Upload harness artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: launcher-harness-bin
path: harness/apisupport.harness/windows-launcher-src/build/
@@ -151,7 +151,7 @@ jobs:
working-directory: nb/ide.launcher/windows
- name: Upload IDE artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: launcher-ide-bin
path: nb/ide.launcher/windows/build/
@@ -171,7 +171,7 @@ jobs:
run: mkdir -p myfiles/
- name: Download artifacts from predecessor jobs
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
path: myfiles/
@@ -203,7 +203,7 @@ jobs:
echo "" >> "$BUILDINFO"
- name: Upload bundle
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: launcher-external-binaries
path: myfiles/
diff --git a/.github/workflows/native-binary-build-lib.profiler.yml b/.github/workflows/native-binary-build-lib.profiler.yml
index d81bdf591ebc..e17a41ace275 100644
--- a/.github/workflows/native-binary-build-lib.profiler.yml
+++ b/.github/workflows/native-binary-build-lib.profiler.yml
@@ -93,7 +93,7 @@ jobs:
show-progress: false
- name: Caching dependencies
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.hgexternalcache
key: profiler-${{ runner.os }}-${{ hashFiles('*/external/binaries-list', '*/*/external/binaries-list') }}
@@ -118,7 +118,7 @@ jobs:
cp NOTICE ${SOURCES}/NOTICE
ls -l -R ${SOURCES}
- name: Upload native sources
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: profiler-external-sources-ASF
path: profiler/lib.profiler/build/sources/
@@ -134,7 +134,7 @@ jobs:
steps:
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: profiler-external-sources-ASF
@@ -171,13 +171,13 @@ jobs:
# Upload interim build artifacts to GitHub
#
- name: Upload artifact Linux 64 bit
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: linux-amd64
path: profiler/lib.profiler/release/lib/deployed/jdk16/linux-amd64/
if-no-files-found: error
- name: Upload artifact Linux 32 bit
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: linux
path: profiler/lib.profiler/release/lib/deployed/jdk16/linux/
@@ -195,7 +195,7 @@ jobs:
steps:
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: profiler-external-sources-ASF
@@ -246,13 +246,13 @@ jobs:
# Upload interim build artifacts to GitHub
#
- name: Upload artifact Windows 64 bit
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: windows-amd64
path: profiler/lib.profiler/release/lib/deployed/jdk16/windows-amd64/
if-no-files-found: error
- name: Upload artifact Windows 32 bit
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: windows
path: profiler/lib.profiler/release/lib/deployed/jdk16/windows/
@@ -268,7 +268,7 @@ jobs:
steps:
- name: Download sources
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: profiler-external-sources-ASF
@@ -292,7 +292,7 @@ jobs:
# Upload interim build artifacts to GitHub
#
- name: Upload artifact MacOS 64 bit
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: mac
path: profiler/lib.profiler/release/lib/deployed/jdk16/mac/
@@ -313,7 +313,7 @@ jobs:
run: mkdir -p myfiles/lib/deployed/jdk16
- name: Download artifacts from predecessor jobs
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
path: myfiles/lib/deployed/jdk16
@@ -343,7 +343,7 @@ jobs:
- name: Upload bundle
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: profiler-external-binaries-ASF
path: myfiles/
diff --git a/.gitignore b/.gitignore
index 6750ca4b18bd..6045e2589e5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -110,7 +110,11 @@ derby.log
/java/languages.antlr/external/*.g4
/java/languages.antlr/external/LexerAdaptor.java
+/ide/go.lang/src/org/antlr/parser/golang/Go*.java
/ide/languages.hcl/src/org/netbeans/modules/languages/hcl/grammar/*.java
+/java/languages.antlr/src/org/antlr/parser/*/ANTLR*.java
+
+/webcommon/javascript2.json/src/org/netbeans/modules/javascript2/json/parser/Json*.java
# idea
.idea
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 44927a9118c1..000000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule ".github/actions/delete-artifact"]
- path = .github/actions/delete-artifact
- url = https://github.com/GeekyEggo/delete-artifact
diff --git a/NOTICE b/NOTICE
index 9de85ba63c18..f7bb1161fb49 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache NetBeans
-Copyright 2017-2023 The Apache Software Foundation
+Copyright 2017-2024 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index 6c4ac6d2a18c..fa5e7e01a5cd 100644
--- a/README.md
+++ b/README.md
@@ -37,8 +37,8 @@ Apache NetBeans is an open source development environment, tooling platform, and
### Requirements
* Git
- * Ant 1.9.9 or above
- * JDK 11 or above (to build and run NetBeans)
+ * Ant
+ * JDK 17 or above (to build and run NetBeans)
#### Notes:
@@ -98,11 +98,11 @@ $ ant tryme
### Download
* [Developer builds](https://ci-builds.apache.org/job/Netbeans/job/netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/) on Jenkins (NetBeans-dev-xxx.zip).
- * [Latest release](https://netbeans.apache.org/download/index.html) (convenience binary of released source artifacts).
+ * [Latest release](https://netbeans.apache.org/download) (convenience binary of released source artifacts).
### Reporting Bugs
- * [How to report bugs](https://netbeans.apache.org/participate/report-issue.html)
+ * [How to report bugs](https://netbeans.apache.org/participate/report-issue)
### Log, Config and Cache Locations
diff --git a/apisupport/apisupport.ant/manifest.mf b/apisupport/apisupport.ant/manifest.mf
index 1cdd588ff816..99bf9f2919ce 100644
--- a/apisupport/apisupport.ant/manifest.mf
+++ b/apisupport/apisupport.ant/manifest.mf
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.apisupport.ant
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/project/Bundle.properties
-OpenIDE-Module-Specification-Version: 2.95
+OpenIDE-Module-Specification-Version: 2.97
AutoUpdate-Show-In-Client: false
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/resources/layer.xml
diff --git a/apisupport/apisupport.ant/nbproject/org-netbeans-modules-apisupport-ant.sig b/apisupport/apisupport.ant/nbproject/org-netbeans-modules-apisupport-ant.sig
index 5ba598ef8d9e..7bd68b6b63de 100644
--- a/apisupport/apisupport.ant/nbproject/org-netbeans-modules-apisupport-ant.sig
+++ b/apisupport/apisupport.ant/nbproject/org-netbeans-modules-apisupport-ant.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 2.94
+#Version 2.95
CLSS public java.lang.Object
cons public init()
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ApisupportAntUtils.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ApisupportAntUtils.java
index 9b917ca87655..ae65249c7ac3 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ApisupportAntUtils.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ApisupportAntUtils.java
@@ -186,7 +186,7 @@ public static LocalizedBundleInfo findLocalizedBundleInfo(FileObject sourceDir,
}
if (!bundleFOs.isEmpty()) {
Collections.reverse(bundleFOs);
- return LocalizedBundleInfo.load(bundleFOs.toArray(new FileObject[bundleFOs.size()]));
+ return LocalizedBundleInfo.load(bundleFOs.toArray(new FileObject[0]));
}
}
} catch (IOException e) {
@@ -264,7 +264,7 @@ public static LocalizedBundleInfo findLocalizedBundleInfoFromJAR(File binaryProj
addBundlesFromJar(main, bundleISs, locBundleResource);
if (!bundleISs.isEmpty()) {
Collections.reverse(bundleISs);
- return LocalizedBundleInfo.load(bundleISs.toArray(new InputStream[bundleISs.size()]));
+ return LocalizedBundleInfo.load(bundleISs.toArray(new InputStream[0]));
}
} finally {
for (InputStream bundleIS : bundleISs) {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/Evaluator.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/Evaluator.java
index ca6e5e1fb9d5..cf46e134d353 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/Evaluator.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/Evaluator.java
@@ -353,7 +353,7 @@ private PropertyEvaluator createEvaluator(ModuleList ml) {
String codeNameBase = project.getCodeNameBase();
PropertyEvaluator suiteEval = null;
if (type == NbModuleType.SUITE_COMPONENT) {
- suiteEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ suiteEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
}
if (type == NbModuleType.SUITE_COMPONENT) {
@@ -368,9 +368,9 @@ private PropertyEvaluator createEvaluator(ModuleList ml) {
providers.add(project.getHelper().getPropertyProvider("nbproject/platform.properties")); // NOI18N
}
if (type == NbModuleType.SUITE_COMPONENT || type == NbModuleType.STANDALONE) {
- PropertyEvaluator baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ PropertyEvaluator baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
providers.add(new ApisupportAntUtils.UserPropertiesFileProvider(baseEval, dir));
- baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
providers.add(new DestDirProvider(baseEval));
}
if (type == NbModuleType.NETBEANS_ORG) {
@@ -380,7 +380,7 @@ private PropertyEvaluator createEvaluator(ModuleList ml) {
providers.add(PropertyUtils.propertiesFilePropertyProvider(new File(nbbuild, "site.build.properties"))); // NOI18N
providers.add(PropertyUtils.propertiesFilePropertyProvider(new File(System.getProperty("user.home"), ".nbbuild.properties"))); // NOI18N
}
- PropertyEvaluator baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ PropertyEvaluator baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
providers.add(new NbJdkProvider(baseEval));
providers.add(privateProperties);
providers.add(projectProperties);
@@ -445,7 +445,7 @@ private PropertyEvaluator createEvaluator(ModuleList ml) {
}
}
- baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
Map testsCPs = computeTestingClassPaths(ml, baseEval, testTypes);
testTypes.addAll(testsCPs.keySet());
@@ -463,7 +463,7 @@ private PropertyEvaluator createEvaluator(ModuleList ml) {
providers.add(PropertyUtils.fixedPropertyProvider(buildDefaults));
}
// skip a bunch of properties irrelevant here - NBM stuff, etc.
- return PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ return PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
}
private static final RequestProcessor RP = new RequestProcessor(Evaluator.class.getName());
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProject.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
index 5f4a8e3497af..f30dc95ecbca 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
@@ -689,9 +689,13 @@ public Map getExtraCompilationUnits() {
/** Get the Java source level used for this module. Default is 1.4. */
public String getJavacSource() {
- String javacSource = evaluator().getProperty(SingleModuleProperties.JAVAC_SOURCE);
- assert javacSource != null;
- return javacSource;
+ String sourceLevel = evaluator().getProperty(SingleModuleProperties.JAVAC_RELEASE);
+ if (sourceLevel != null && !sourceLevel.isEmpty()) {
+ return sourceLevel;
+ }
+ sourceLevel = evaluator().getProperty(SingleModuleProperties.JAVAC_SOURCE);
+ assert sourceLevel != null;
+ return sourceLevel;
}
private ClassPath[] boot, source, compile;
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProviderImpl.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProviderImpl.java
index a3fc9cbbe0dc..d03b7a94284c 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProviderImpl.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/NbModuleProviderImpl.java
@@ -214,7 +214,7 @@ class NbModuleProviderImpl implements NbModuleProvider {
}
XMLFileSystem xfs = new XMLFileSystem();
try {
- xfs.setXmlUrls(otherLayerURLs.toArray(new URL[otherLayerURLs.size()]));
+ xfs.setXmlUrls(otherLayerURLs.toArray(new URL[0]));
} catch (PropertyVetoException ex) {
assert false : ex;
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ProjectXMLManager.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ProjectXMLManager.java
index f64feaf8f53d..5f2bd0e87d45 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ProjectXMLManager.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ProjectXMLManager.java
@@ -816,7 +816,7 @@ public String[] getFriends() {
public String[] getBinaryOrigins() {
Set origins = new LinkedHashSet(getClassPathExtensions().values());
origins.remove(null);
- return origins.toArray(new String[origins.size()]);
+ return origins.toArray(new String[0]);
}
/**
@@ -981,7 +981,7 @@ public static ManifestManager.PackageExport[] findPublicPackages(final Element c
if (ppEl != null) {
pps.addAll(findAllPackages(ppEl));
}
- return pps.isEmpty() ? ManifestManager.EMPTY_EXPORTED_PACKAGES : pps.toArray(new ManifestManager.PackageExport[pps.size()]);
+ return pps.isEmpty() ? ManifestManager.EMPTY_EXPORTED_PACKAGES : pps.toArray(new ManifestManager.PackageExport[0]);
}
/** Utility method for finding friend. */
@@ -994,7 +994,7 @@ public static String[] findFriends(final Element confData) {
friends.add(XMLUtil.findText(friendEl));
}
}
- return friends.toArray(new String[friends.size()]);
+ return friends.toArray(new String[0]);
}
return null;
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java
index 2130fdfc488f..e86f4a8ea0d7 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java
@@ -604,7 +604,7 @@ public ClassPath[] getProjectClassPaths(String type) {
paths.add(ClassPathSupport.createClassPath(new FileObject[] {root}));
}
}
- return paths.toArray(new ClassPath[paths.size()]);
+ return paths.toArray(new ClassPath[0]);
}
private static final class FilteredClassPathImplementation implements ClassPathImplementation, PropertyChangeListener {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalJavadocForBinaryImpl.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalJavadocForBinaryImpl.java
index 7e480382b6bb..f09635912b80 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalJavadocForBinaryImpl.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalJavadocForBinaryImpl.java
@@ -179,7 +179,7 @@ private Result findByDashedCNB(final String cnbdashes, final URL[] roots, boolea
}
return new JavadocForBinaryQuery.Result() {
public @Override URL[] getRoots() {
- return candidates.toArray(new URL[candidates.size()]);
+ return candidates.toArray(new URL[0]);
}
public @Override void addChangeListener(ChangeListener l) {}
public @Override void removeChangeListener(ChangeListener l) {}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalSourceForBinaryImpl.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalSourceForBinaryImpl.java
index 3f4b442ecece..6504abdcd50f 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalSourceForBinaryImpl.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/GlobalSourceForBinaryImpl.java
@@ -188,7 +188,7 @@ public FileObject[] getRoots() {
} catch (IOException ex) {
throw new AssertionError(ex);
}
- return candidates.toArray(new FileObject[candidates.size()]);
+ return candidates.toArray(new FileObject[0]);
}
protected abstract String resolveRelativePath(URL sourceRoot) throws IOException;
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/JavadocForBinaryImpl.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/JavadocForBinaryImpl.java
index 3640d9016430..41d81691b124 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/JavadocForBinaryImpl.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/JavadocForBinaryImpl.java
@@ -93,7 +93,7 @@ public JavadocForBinaryQuery.Result findJavadoc(URL binaryRoot) {
}
}
}
- return new R(candidates.toArray(new URL[candidates.size()]));
+ return new R(candidates.toArray(new URL[0]));
} catch (MalformedURLException e) {
throw new AssertionError(e);
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ModuleProjectClassPathExtender.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ModuleProjectClassPathExtender.java
index ddab2d53779f..c5575ad91947 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ModuleProjectClassPathExtender.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/queries/ModuleProjectClassPathExtender.java
@@ -69,7 +69,7 @@ protected SourceGroup[] getExtensibleSourceGroups() {
sgs.add(g);
}
}
- return sgs.toArray(new SourceGroup[sgs.size()]);
+ return sgs.toArray(new SourceGroup[0]);
}
protected String[] getExtensibleClassPathTypes(SourceGroup sourceGroup) {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java
index 73e310ea9492..437ede85d230 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java
@@ -188,9 +188,9 @@ private PropertyEvaluator createEvaluator() {
List providers = new ArrayList();
providers.add(helper.getPropertyProvider("nbproject/private/platform-private.properties")); // NOI18N
providers.add(helper.getPropertyProvider("nbproject/platform.properties")); // NOI18N
- PropertyEvaluator baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ PropertyEvaluator baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
providers.add(new ApisupportAntUtils.UserPropertiesFileProvider(baseEval, dir));
- baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
providers.add(new DestDirProvider(baseEval));
providers.add(helper.getPropertyProvider(AntProjectHelper.PRIVATE_PROPERTIES_PATH));
providers.add(helper.getPropertyProvider(AntProjectHelper.PROJECT_PROPERTIES_PATH));
@@ -205,7 +205,7 @@ private PropertyEvaluator createEvaluator() {
fixedProps.put("dist.dir", "dist"); // NOI18N
fixedProps.put("test.user.dir", "${suite.build.dir}/testuserdir"); // NOI18N
providers.add(PropertyUtils.fixedPropertyProvider(fixedProps));
- return PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()]));
+ return PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[0]));
}
private final class Info implements ProjectInformation, AntProjectListener {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ActionFilterNode.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ActionFilterNode.java
index 9c7dcfa6e983..b8c4bb886f07 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ActionFilterNode.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ActionFilterNode.java
@@ -127,7 +127,7 @@ private Action[] initActions() {
}
}
}
- actionCache = result.toArray(new Action[result.size()]);
+ actionCache = result.toArray(new Action[0]);
}
return actionCache;
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java
index ac3fdcc8c497..28c76e8f4f88 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java
@@ -270,7 +270,7 @@ protected Node[] createNodes(Object key) {
nodes.add(createLibraryPackageViewNode(jar));
}
}
- return nodes.toArray(new Node[nodes.size()]);
+ return nodes.toArray(new Node[0]);
}
private Node createLibraryPackageViewNode(FileObject jfo) {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
index ae6f8ce80b82..c98e3cfa21a0 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
@@ -149,7 +149,7 @@ public void refresh() {
supportedActionsSet.add(ActionProvider.COMMAND_MOVE);
supportedActionsSet.add(ActionProvider.COMMAND_COPY);
supportedActionsSet.add(ActionProvider.COMMAND_DELETE);
- supportedActions = supportedActionsSet.toArray(new String[supportedActionsSet.size()]);
+ supportedActions = supportedActionsSet.toArray(new String[0]);
}
public String[] getSupportedActions() {
@@ -362,7 +362,7 @@ TestSources findTestSourcesForSources(Lookup context) {
if (testFOs.isEmpty()) {
return null;
}
- return new TestSources(testFOs.toArray(new FileObject[testFOs.size()]), testType, testSrcDir, null);
+ return new TestSources(testFOs.toArray(new FileObject[0]), testType, testSrcDir, null);
}
}
}
@@ -407,7 +407,7 @@ TestSources findTestSourcesForFiles(Lookup context) {
}
}
}
- return testFiles.isEmpty() ? null : new TestSources(testFiles.toArray(new FileObject[testFiles.size()]), testType, testRoot, null);
+ return testFiles.isEmpty() ? null : new TestSources(testFiles.toArray(new FileObject[0]), testType, testRoot, null);
}
@Messages("MSG_no_source=No source to operate on.")
@@ -441,11 +441,7 @@ public void invokeAction(final String command, final Lookup context) throws Ille
doRun();
} finally {
if (task != null) {
- task.addTaskListener(new TaskListener() {
- @Override public void taskFinished(Task _) {
- listener.finished(task.result() == 0);
- }
- });
+ task.addTaskListener((Task t) -> listener.finished(task.result() == 0));
} else {
listener.finished(false);
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java
index 62b1278739e8..822e64d1d4f2 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java
@@ -300,7 +300,7 @@ private static URL[] getJavadocRoots(JavaPlatform platform) {
ClassPath.Entry e = it.next();
result.addAll(Arrays.asList(JavadocForBinaryQuery.findJavadoc(e.getURL()).getRoots()));
}
- return result.toArray(new URL[result.size()]);
+ return result.toArray(new URL[0]);
}
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java
index 7b64df719852..8b2c180ef042 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java
@@ -312,7 +312,7 @@ public String[] getSupportedActions() {
ActionProvider.COMMAND_MOVE,
ActionProvider.COMMAND_DELETE
));
- return actions.toArray(new String[actions.size()]);
+ return actions.toArray(new String[0]);
}
public boolean isActionEnabled(String command, Lookup context) throws IllegalArgumentException {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteOperations.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteOperations.java
index 306b9af0a2fc..443c2e72d011 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteOperations.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/SuiteOperations.java
@@ -167,7 +167,7 @@ public Void call () throws Exception {
}
});
- OpenProjects.getDefault().open(toOpen.toArray(new Project[toOpen.size()]), false);
+ OpenProjects.getDefault().open(toOpen.toArray(new Project[0]), false);
}
boolean isRename = original.getProjectDirectory().getParent().equals(
suite.getProjectDirectory().getParent());
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java
index afd2a60e77d3..9c47d9559c80 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java
@@ -142,7 +142,7 @@ private Image getIcon(boolean opened) {
actions.add(new AddJUnit4Action(testType, project));
}
actions.add(new AddUnitTestDependencyAction(testType, project));
- return actions.toArray(new Action[actions.size()]);
+ return actions.toArray(new Action[0]);
}
@Messages("HINT_missing_junit4=Incomplete test libraries. Use context menu to resolve.")
@@ -326,7 +326,7 @@ private static final class ProjectDependencyNode extends AbstractNode {
result.add(new EditTestDependencyAction(dep, testType, project));
// Remove dependency
result.add(LibrariesChildren.REMOVE_DEPENDENCY_ACTION);
- actions = result.toArray(new Action[result.size()]);
+ actions = result.toArray(new Action[0]);
}
return actions;
}
@@ -379,7 +379,7 @@ private static final class LibraryDependencyNode extends FilterNode {
}
}
result.add(LibrariesChildren.REMOVE_DEPENDENCY_ACTION);
- actions = result.toArray(new Action[result.size()]);
+ actions = result.toArray(new Action[0]);
}
return actions;
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerLibraries.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerLibraries.java
index 29ed32aea3e7..78eac7ac07a8 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerLibraries.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerLibraries.java
@@ -827,7 +827,7 @@ private void addJarButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
newPaths.add (path);
}
- filePaths = newPaths.toArray (new String [newPaths.size ()]);
+ filePaths = newPaths.toArray (new String [0]);
final DefaultListModel model = getProperties().getWrappedJarsListModel();
int[] newSelection = ClassPathUiSupport.addJarFiles(model,emListComp.getSelectedIndices(),
filePaths, base,
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerSources.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerSources.java
index 3975dd6c2452..5eee85a0c127 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerSources.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/CustomizerSources.java
@@ -32,6 +32,9 @@
import org.openide.util.Exceptions;
import org.openide.util.NbBundle;
+import static org.netbeans.modules.apisupport.project.ui.customizer.SingleModuleProperties.JAVAC_RELEASE;
+import static org.netbeans.modules.apisupport.project.ui.customizer.SingleModuleProperties.JAVAC_SOURCE;
+
/**
* Represents Sources panel in Netbeans Module customizer.
*
@@ -51,7 +54,7 @@ public void actionPerformed(ActionEvent e) {
if (srcLevelValueBeingUpdated) {
return;
}
- final String oldLevel = getProperty(SingleModuleProperties.JAVAC_SOURCE);
+ final String oldLevel = getProperty(getJavacLanguageLevelKey());
final String newLevel = (String) srcLevelValue.getSelectedItem();
SpecificationVersion jdk5 = new SpecificationVersion("1.5"); // NOI18N
if (new SpecificationVersion(oldLevel).compareTo(jdk5) < 0 && new SpecificationVersion(newLevel).compareTo(jdk5) >= 0) {
@@ -80,6 +83,7 @@ public void run() {
});
}
+ @Override
protected void refresh() {
if (getProperties().getSuiteDirectoryPath() == null) {
moduleSuite.setVisible(false);
@@ -95,16 +99,20 @@ protected void refresh() {
for (String level : levels) {
srcLevelValue.addItem(level);
}
- srcLevelValue.setSelectedItem(getProperty(SingleModuleProperties.JAVAC_SOURCE));
+ srcLevelValue.setSelectedItem(getProperty(getJavacLanguageLevelKey()));
} finally {
srcLevelValueBeingUpdated = false;
}
ApisupportAntUIUtils.setText(prjFolderValue, getProperties().getProjectDirectory());
}
+ @Override
public void store() {
- setProperty(SingleModuleProperties.JAVAC_SOURCE,
- (String) srcLevelValue.getSelectedItem());
+ setProperty(getJavacLanguageLevelKey(), (String) srcLevelValue.getSelectedItem());
+ }
+
+ private String getJavacLanguageLevelKey() {
+ return containsProperty(JAVAC_RELEASE) ? JAVAC_RELEASE : JAVAC_SOURCE;
}
/** This method is called from within the constructor to
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/NbPropertyPanel.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/NbPropertyPanel.java
index 0ffaad473519..7b7dc612c9cb 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/NbPropertyPanel.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/NbPropertyPanel.java
@@ -65,6 +65,11 @@ String getProperty(String key) {
return props.getProperty(key);
}
+ boolean containsProperty(String key) {
+ String prop = props.getProperty(key);
+ return prop != null && !prop.isEmpty();
+ }
+
void setProperty(String key, String property) {
props.setProperty(key, property);
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModuleProperties.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModuleProperties.java
index 5067387380ab..ed721ec071d0 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModuleProperties.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModuleProperties.java
@@ -110,6 +110,7 @@ public final class SingleModuleProperties extends ModuleProperties {
public static final String IS_AUTOLOAD = "is.autoload"; // NOI18N
public static final String IS_EAGER = "is.eager"; // NOI18N
public static final String JAVAC_SOURCE = "javac.source"; // NOI18N
+ public static final String JAVAC_RELEASE = "javac.release"; // NOI18N
public static final String JAVADOC_TITLE = "javadoc.title"; // NOI18N
public static final String LICENSE_FILE = "license.file"; // NOI18N
public static final String NBM_HOMEPAGE = "nbm.homepage"; // NOI18N
@@ -754,7 +755,7 @@ String[] getAvailableFriends() {
set.add(dep.getModuleEntry().getCodeNameBase());
}
} // else standalone module - leave empty (see the UI spec)
- return set.toArray(new String[set.size()]);
+ return set.toArray(new String[0]);
}
FriendListModel getFriendListModel() {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteCustomizerLibraries.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteCustomizerLibraries.java
index f59a75caecab..dbe7f77c6a23 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteCustomizerLibraries.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteCustomizerLibraries.java
@@ -430,7 +430,7 @@ public void store() {
}
if (oldPlaf) {
- getProperties().setEnabledClusters(enabledClusters.toArray(new String[enabledClusters.size()]));
+ getProperties().setEnabledClusters(enabledClusters.toArray(new String[0]));
} else {
for (ClusterNode e : libChildren.extraNodes()) {
clusterPath.add(e.getClusterInfo());
@@ -447,7 +447,7 @@ public void store() {
}
getProperties().setClusterPath(clusterPath);
}
- getProperties().setDisabledModules(disabledModules.toArray(new String[disabledModules.size()]));
+ getProperties().setDisabledModules(disabledModules.toArray(new String[0]));
}
/** This method is called from within the constructor to
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteProperties.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteProperties.java
index 04693f92c3f2..f60e1711eda8 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteProperties.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteProperties.java
@@ -268,7 +268,7 @@ public static String[] getArrayProperty(PropertyEvaluator evaluator, String p) {
disabledClusters.add(entry.getClusterDirectory().getName());
}
disabledClusters.removeAll(Arrays.asList(enabledClusters));
- separated = disabledClusters.toArray(new String[disabledClusters.size()]);
+ separated = disabledClusters.toArray(new String[0]);
for (int i = 0; i < separated.length - 1; i++) {
separated[i] = separated[i] + ',';
}
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteUtils.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteUtils.java
index c7fd6dec083a..041ba006bbf4 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteUtils.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/customizer/SuiteUtils.java
@@ -105,7 +105,7 @@ public NbModuleProject[] run() throws Exception {
}
}
}
- return result.toArray(new NbModuleProject[result.size()]);
+ return result.toArray(new NbModuleProject[0]);
}
});
} catch (MutexException e) {
@@ -431,7 +431,7 @@ public static String[] getAntProperty(final Collection pieces) {
String piece = it.next() + (it.hasNext() ? ":" : ""); // NOI18N
l.add(piece);
}
- return l.toArray(new String[l.size()]);
+ return l.toArray(new String[0]);
}
/**
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/platform/PlatformComponentFactory.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/platform/PlatformComponentFactory.java
index db69ba7339ac..892e4c6db8c9 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/platform/PlatformComponentFactory.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/platform/PlatformComponentFactory.java
@@ -184,7 +184,7 @@ private static NbPlatform[] getSortedPlatforms(NbPlatform extra) {
if (extra != null) {
_platforms.add(extra);
}
- NbPlatform[] platforms = _platforms.toArray(new NbPlatform[_platforms.size()]);
+ NbPlatform[] platforms = _platforms.toArray(new NbPlatform[0]);
Arrays.sort(platforms, new Comparator() {
public int compare(NbPlatform p1, NbPlatform p2) {
int res = Collator.getInstance().compare(p1.getLabel(), p2.getLabel());
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractBinaryEntry.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractBinaryEntry.java
index 6e36950aa639..cfcdb2761ffb 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractBinaryEntry.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractBinaryEntry.java
@@ -78,7 +78,7 @@ abstract class AbstractBinaryEntry extends AbstractEntry {
deps.add(codename.substring(0, slash));
}
}
- runDependencies = deps.toArray(new String[deps.size()]);
+ runDependencies = deps.toArray(new String[0]);
}
public String getNetBeansOrgPath() {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractEntryWithSources.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractEntryWithSources.java
index b6283f2f6df1..c5f0a85b6704 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractEntryWithSources.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/AbstractEntryWithSources.java
@@ -129,7 +129,7 @@ public String[] getRunDependencies() {
String cnb = XMLUtil.findText(cnbEl);
deps.add(cnb);
}
- return deps.toArray(new String[deps.size()]);
+ return deps.toArray(new String[0]);
}
public String getSpecificationVersion() {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/LocalizedBundleInfo.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/LocalizedBundleInfo.java
index dcd710726178..9421fa5b4a75 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/LocalizedBundleInfo.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/LocalizedBundleInfo.java
@@ -268,7 +268,7 @@ private static String[] splitBySentence(String text) {
sentences.add(text.substring(start, end));
start = end;
}
- return sentences.toArray(new String[sentences.size()]);
+ return sentences.toArray(new String[0]);
}
public void addPropertyChangeListener(PropertyChangeListener pchl) {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java
index 5eb092b6589c..b3c6e05f4468 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java
@@ -250,7 +250,7 @@ public static URL[] getSourceRootsForExternalModule(File binaryRootF) {
roots.addAll(Arrays.asList(bce.getSourceRoots()));
}
}
- return roots.toArray(new URL[roots.size()]);
+ return roots.toArray(new URL[0]);
}
public static URL[] getJavadocRootsForExternalModule(File binaryRootF) {
@@ -263,7 +263,7 @@ public static URL[] getJavadocRootsForExternalModule(File binaryRootF) {
roots.addAll(Arrays.asList(bce.getJavadocRoots()));
}
}
- return roots.toArray(new URL[roots.size()]);
+ return roots.toArray(new URL[0]);
}
private static void registerEntry(ModuleEntry entry, Set files) {
@@ -648,7 +648,7 @@ private static String[] scanDirForFiles(File dir) {
if (files == null) {
List l = new ArrayList(250);
doScanDirForFiles(dir, l, "");
- files = l.toArray(new String[l.size()]);
+ files = l.toArray(new String[0]);
}
return files;
}
@@ -678,7 +678,7 @@ public static ModuleList findOrCreateModuleListFromSuite(
lists.add(findOrCreateModuleListFromSuiteWithoutBinaries(root, nbdestdir, eval));
lists.addAll(findOrCreateModuleListsFromClusterPath(clup, nbdestdir));
// XXX should this also omit excluded modules? or should that be done only in e.g. LayerUtils.getPlatformJarsForSuiteComponentProject?
- return merge(lists.toArray(new ModuleList[lists.size()]), root);
+ return merge(lists.toArray(new ModuleList[0]), root);
} else {
return merge(new ModuleList[]{
findOrCreateModuleListFromSuiteWithoutBinaries(root, nbdestdir, eval),
@@ -776,7 +776,7 @@ private static PropertyEvaluator parseSuiteProperties(File root) throws IOExcept
List providers = new ArrayList();
providers.add(loadPropertiesFile(new File(root, "nbproject" + File.separatorChar + "private" + File.separatorChar + "platform-private.properties"))); // NOI18N
providers.add(loadPropertiesFile(new File(root, "nbproject" + File.separatorChar + "platform.properties"))); // NOI18N
- PropertyEvaluator eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ PropertyEvaluator eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
String buildS = eval.getProperty("user.properties.file"); // NOI18N
if (buildS != null) {
providers.add(loadPropertiesFile(PropertyUtils.resolveFile(root, buildS)));
@@ -786,9 +786,9 @@ private static PropertyEvaluator parseSuiteProperties(File root) throws IOExcept
}
providers.add(loadPropertiesFile(new File(root, "nbproject" + File.separatorChar + "private" + File.separatorChar + "private.properties"))); // NOI18N
providers.add(loadPropertiesFile(new File(root, "nbproject" + File.separatorChar + "project.properties"))); // NOI18N
- eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
providers.add(new DestDirProvider(eval));
- return PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ return PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
}
static File[] findModulesInSuite(File root) throws IOException {
@@ -1071,7 +1071,7 @@ static PropertyEvaluator parseProperties(File basedir, File root, NbModuleType t
if (type == NbModuleType.SUITE_COMPONENT) {
providers.add(loadPropertiesFile(new File(basedir, "nbproject" + File.separatorChar + "private" + File.separatorChar + "suite-private.properties"))); // NOI18N
providers.add(loadPropertiesFile(new File(basedir, "nbproject" + File.separatorChar + "suite.properties"))); // NOI18N
- PropertyEvaluator eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ PropertyEvaluator eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
String suiteS = eval.getProperty("suite.dir"); // NOI18N
if (suiteS != null) {
File suite = PropertyUtils.resolveFile(basedir, suiteS);
@@ -1083,14 +1083,14 @@ static PropertyEvaluator parseProperties(File basedir, File root, NbModuleType t
providers.add(loadPropertiesFile(new File(basedir, "nbproject" + File.separatorChar + "platform.properties"))); // NOI18N
}
if (type != NbModuleType.NETBEANS_ORG) {
- PropertyEvaluator eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ PropertyEvaluator eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
String buildS = eval.getProperty("user.properties.file"); // NOI18N
if (buildS != null) {
providers.add(loadPropertiesFile(PropertyUtils.resolveFile(basedir, buildS)));
} else {
providers.add(PropertyUtils.globalPropertyProvider());
}
- eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ eval = PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
providers.add(new DestDirProvider(eval));
}
// private.properties & project.properties.
@@ -1112,7 +1112,7 @@ static PropertyEvaluator parseProperties(File basedir, File root, NbModuleType t
}
providers.add(PropertyUtils.fixedPropertyProvider(defaults));
defaults.put("cluster", findClusterLocation(basedir, root, type));
- return PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[providers.size()]));
+ return PropertyUtils.sequentialPropertyEvaluator(predefsProvider, providers.toArray(new PropertyProvider[0]));
}
private static PropertyProvider loadPropertiesFile(File f) throws IOException {
diff --git a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/PlatformLayersCacheManager.java b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/PlatformLayersCacheManager.java
index eb3aaf46c6e3..a5a648df9da2 100644
--- a/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/PlatformLayersCacheManager.java
+++ b/apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/PlatformLayersCacheManager.java
@@ -454,7 +454,7 @@ public boolean accept(File dir, String name) {
})));
}
}
- return allJars.toArray(new File[allJars.size()]);
+ return allJars.toArray(new File[0]);
}
private static PLFSCache fillCache(File clusterDir) throws IOException {
diff --git a/apisupport/apisupport.ant/test/unit/src/org/netbeans/modules/apisupport/project/layers/LayerUtilsTest.java b/apisupport/apisupport.ant/test/unit/src/org/netbeans/modules/apisupport/project/layers/LayerUtilsTest.java
index ef8b3c6f3754..ac08b16304db 100644
--- a/apisupport/apisupport.ant/test/unit/src/org/netbeans/modules/apisupport/project/layers/LayerUtilsTest.java
+++ b/apisupport/apisupport.ant/test/unit/src/org/netbeans/modules/apisupport/project/layers/LayerUtilsTest.java
@@ -141,7 +141,7 @@ public boolean accept(File dir, String name) {
}
}));
System.out.println("Loading external cache from " + cacheDir + ", " + files.size() + " files");
- Collections.sort(files, new Comparator() {
+ files.sort(new Comparator() {
public int compare(File f1, File f2) {
return - f1.getName().compareTo(f2.getName());
}
diff --git a/apisupport/apisupport.installer.maven/manifest.mf b/apisupport/apisupport.installer.maven/manifest.mf
index a70ce45f6d7d..dfcb4a450122 100644
--- a/apisupport/apisupport.installer.maven/manifest.mf
+++ b/apisupport/apisupport.installer.maven/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.apisupport.installer.maven
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/installer/maven/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.45
+OpenIDE-Module-Specification-Version: 1.47
diff --git a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java b/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java
index 0773a5ef7d7f..f9562769ebbf 100644
--- a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java
+++ b/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java
@@ -26,6 +26,7 @@
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -171,7 +172,7 @@ void actionPerformed(ActionEvent e) {
URL url = new URL(licenseResource);
is = url.openStream();
if (is != null) {
- licenseFile = File.createTempFile("license", ".txt");
+ licenseFile = Files.createTempFile("license", ".txt").toFile();
licenseFile.getParentFile().mkdirs();
licenseFile.deleteOnExit();
diff --git a/apisupport/apisupport.installer/manifest.mf b/apisupport/apisupport.installer/manifest.mf
index 54e65dd7e24e..fa3cdcddb112 100644
--- a/apisupport/apisupport.installer/manifest.mf
+++ b/apisupport/apisupport.installer/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.apisupport.installer
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/installer/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.46
+OpenIDE-Module-Specification-Version: 1.48
diff --git a/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig b/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig
index 6e3abb570d76..3b88d253cd70 100644
--- a/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig
+++ b/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.45
+#Version 1.46
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java
index c5265e64cf87..f707ceec5633 100644
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java
+++ b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java
@@ -26,6 +26,7 @@
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -175,7 +176,7 @@ public ContextBuildInstaller(Lookup actionContext) {
URL url = new URL(licenseResource);
is = url.openStream();
if (is != null) {
- licenseFile = File.createTempFile("license", ".txt");
+ licenseFile = Files.createTempFile("license", ".txt").toFile();
licenseFile.getParentFile().mkdirs();
licenseFile.deleteOnExit();
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java
index 8a61647fce2d..c41896f1598d 100644
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java
+++ b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java
@@ -134,7 +134,7 @@ public void removeListDataListener(ListDataListener listener) {
private void fireContentsChanged(int index) {
final ListDataListener[] clone;
synchronized (listeners) {
- clone = listeners.toArray(new ListDataListener[listeners.size()]);
+ clone = listeners.toArray(new ListDataListener[0]);
}
final ListDataEvent event = new ListDataEvent(
diff --git a/apisupport/apisupport.kit/manifest.mf b/apisupport/apisupport.kit/manifest.mf
index 921f413ca62c..71f90de6eb74 100644
--- a/apisupport/apisupport.kit/manifest.mf
+++ b/apisupport/apisupport.kit/manifest.mf
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.apisupport.kit
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/kit/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.53
+OpenIDE-Module-Specification-Version: 1.55
OpenIDE-Module-Provides: org.netbeans.modules.apisupport.kit
diff --git a/apisupport/apisupport.project/manifest.mf b/apisupport/apisupport.project/manifest.mf
index f4b1331529cd..8249b93cd79c 100644
--- a/apisupport/apisupport.project/manifest.mf
+++ b/apisupport/apisupport.project/manifest.mf
@@ -4,5 +4,5 @@ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/project/api/Bu
OpenIDE-Module-Requires: javax.script.ScriptEngine.freemarker
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/ui/resources/layer.xml
AutoUpdate-Show-In-Client: false
-OpenIDE-Module-Specification-Version: 1.99
+OpenIDE-Module-Specification-Version: 1.101
diff --git a/apisupport/apisupport.project/nbproject/org-netbeans-modules-apisupport-project.sig b/apisupport/apisupport.project/nbproject/org-netbeans-modules-apisupport-project.sig
index dd0440164a1f..ab345079e7c1 100644
--- a/apisupport/apisupport.project/nbproject/org-netbeans-modules-apisupport-project.sig
+++ b/apisupport/apisupport.project/nbproject/org-netbeans-modules-apisupport-project.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.98
+#Version 1.99
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/LayerHandle.java b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/LayerHandle.java
index 8fe936ab718e..3b81d871e913 100644
--- a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/LayerHandle.java
+++ b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/LayerHandle.java
@@ -263,7 +263,7 @@ private void configure() {
Logger.getLogger(DualLayers.class.getName()).log(Level.INFO, "could not load " + generated, x);
}
}
- setDelegates(layers.toArray(new FileSystem[layers.size()]));
+ setDelegates(layers.toArray(new FileSystem[0]));
}
public @Override void fileDataCreated(FileEvent fe) {
configure();
diff --git a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/ManifestManager.java b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/ManifestManager.java
index d2d7997cf82e..a0a41952a911 100644
--- a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/ManifestManager.java
+++ b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/api/ManifestManager.java
@@ -191,7 +191,7 @@ public static ManifestManager getInstanceFromJAR(File jar, boolean withGenerated
ManifestManager mm2 = getInstanceFromJAR(ext);
List toks = new ArrayList(Arrays.asList(mm.provTokens));
toks.addAll(Arrays.asList(mm2.provTokens));
- mm.provTokens = toks.toArray(new String[toks.size()]);
+ mm.provTokens = toks.toArray(new String[0]);
}
}
}
@@ -553,7 +553,7 @@ private static PackageExport[] parseExportedPackages(final String exportsS) {
if (exports.isEmpty()) {
throw new IllegalArgumentException("Illegal OpenIDE-Module-Public-Packages: " + exportsS); // NOI18N
}
- exportedPackages = exports.toArray(new PackageExport[exports.size()]);
+ exportedPackages = exports.toArray(new PackageExport[0]);
}
return exportedPackages;
}
@@ -574,7 +574,7 @@ private static String[] parseFriends(final String friends) {
if (set.isEmpty()) {
throw new IllegalArgumentException("Empty OpenIDE-Module-Friends: " + friends); // NOI18N
}
- return set.toArray(new String[set.size()]);
+ return set.toArray(new String[0]);
}
public String getCodeNameBase() {
@@ -605,7 +605,7 @@ public String[] getProvidedTokens() {
} else {
List ret = new ArrayList(arr);
ret.add(implied);
- return ret.toArray(new String[ret.size()]);
+ return ret.toArray(new String[0]);
}
}
diff --git a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/BadgingSupport.java b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/BadgingSupport.java
index 747354d2e519..01ed998180cc 100644
--- a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/BadgingSupport.java
+++ b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/BadgingSupport.java
@@ -451,7 +451,7 @@ private static ClassPath classpathForFile(FileObject fo) {
LOG.log(Level.WARNING, "could not find locale variants of {0}", jar);
}
LOG.log(Level.FINE, "from {0} getting {1}", new Object[] {layer, roots});
- return ClassPathSupport.createClassPath(roots.toArray(new URL[roots.size()]));
+ return ClassPathSupport.createClassPath(roots.toArray(new URL[0]));
}
Project p;
try {
diff --git a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/LayerUtils.java b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/LayerUtils.java
index ba5a96a03ae0..5f98965534ab 100644
--- a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/LayerUtils.java
+++ b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/LayerUtils.java
@@ -85,7 +85,7 @@ public static ClassPath findResourceCP(Project project) {
if (roots.isEmpty()) {
LOG.log(Level.WARNING, "no resource path for {0}", project);
}
- return ClassPathSupport.createClassPath(roots.toArray(new FileObject[roots.size()]));
+ return ClassPathSupport.createClassPath(roots.toArray(new FileObject[0]));
}
/**
@@ -140,7 +140,7 @@ static URL[] currentify(URL u, String suffix, ClassPath cp) {
}
}
if (!urls.isEmpty()) {
- return urls.toArray(new URL[urls.size()]);
+ return urls.toArray(new URL[0]);
}
}
return new URL[] {u};
diff --git a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystem.java b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystem.java
index 48a54c05cf35..549d8311502c 100644
--- a/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystem.java
+++ b/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystem.java
@@ -261,7 +261,7 @@ public String[] children(String f) {
}
}
//System.err.println("children <" + f + ">: " + kids);
- return kids.toArray(new String[kids.size()]);
+ return kids.toArray(new String[0]);
}
/** retrieve byte contents of a named resource */
diff --git a/apisupport/apisupport.refactoring/manifest.mf b/apisupport/apisupport.refactoring/manifest.mf
index c4f40309da5f..cf88272d9dec 100644
--- a/apisupport/apisupport.refactoring/manifest.mf
+++ b/apisupport/apisupport.refactoring/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.apisupport.refactoring
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/refactoring/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.60
+OpenIDE-Module-Specification-Version: 1.62
diff --git a/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/DataObjectRegistrationHinter.java b/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/DataObjectRegistrationHinter.java
index c1dffe849655..3f135b6225ef 100644
--- a/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/DataObjectRegistrationHinter.java
+++ b/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/DataObjectRegistrationHinter.java
@@ -167,7 +167,7 @@ public ChangeInfo implement() throws Exception {
}
if (!fixes.isEmpty()) {
- ctx.addHint(Severity.WARNING, ctx.standardAnnotationDescription(), fixes.toArray(new Fix[fixes.size()]));
+ ctx.addHint(Severity.WARNING, ctx.standardAnnotationDescription(), fixes.toArray(new Fix[0]));
}
}
diff --git a/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessages.java b/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessages.java
index 0856eaf04e2c..0102cfb5a659 100644
--- a/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessages.java
+++ b/apisupport/apisupport.refactoring/src/org/netbeans/modules/apisupport/hints/UseNbBundleMessages.java
@@ -263,7 +263,7 @@ public UseMessagesFix(CompilationInfo compilationInfo, TreePath treePath, boolea
Tree enclosing = findEnclosingElement(wc, treePath);
Tree modifiers;
Tree nueModifiers;
- ExpressionTree[] linesA = lines.toArray(new ExpressionTree[lines.size()]);
+ ExpressionTree[] linesA = lines.toArray(new ExpressionTree[0]);
switch (enclosing.getKind()) {
case METHOD:
modifiers = wc.resolveRewriteTarget(((MethodTree) enclosing).getModifiers());
diff --git a/apisupport/apisupport.wizards/manifest.mf b/apisupport/apisupport.wizards/manifest.mf
index 6be8da6766c4..f95f8229d96c 100644
--- a/apisupport/apisupport.wizards/manifest.mf
+++ b/apisupport/apisupport.wizards/manifest.mf
@@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.apisupport.wizards
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/project/ui/wizard/common/Bundle.properties
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/ui/wizard/common/layer.xml
-OpenIDE-Module-Specification-Version: 1.43
+OpenIDE-Module-Specification-Version: 1.45
diff --git a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/CreatedModifiedFiles.java b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/CreatedModifiedFiles.java
index 83da20e64132..3a170a7663e8 100644
--- a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/CreatedModifiedFiles.java
+++ b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/CreatedModifiedFiles.java
@@ -1136,7 +1136,7 @@ public String[] getCreatedPaths() {
for (String file : externalFiles) {
s.add(prefix + file);
}
- return s.toArray(new String[s.size()]);
+ return s.toArray(new String[0]);
}
@Override
diff --git a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/WizardUtils.java b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/WizardUtils.java
index 341c7326c814..9bfff20f563a 100644
--- a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/WizardUtils.java
+++ b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/common/WizardUtils.java
@@ -151,7 +151,7 @@ public static KeyStroke[] stringToKeyStrokes(String keyStrokes) {
}
result.add(keyStroke);
}
- return result.toArray(new KeyStroke[result.size()]);
+ return result.toArray(new KeyStroke[0]);
}
public static String keyStrokesToString(final KeyStroke[] keyStrokes) {
diff --git a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/NewLoaderIterator.java b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/NewLoaderIterator.java
index a25a946fc252..fdb1a4389789 100644
--- a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/NewLoaderIterator.java
+++ b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/NewLoaderIterator.java
@@ -417,7 +417,7 @@ public void run(FileSystem layer) throws IOException {
}
kids.add(DataObject.find(kid));
}
- DataFolder.findFolder(folder).setOrder(kids.toArray(new DataObject[kids.size()]));
+ DataFolder.findFolder(folder).setOrder(kids.toArray(new DataObject[0]));
}
}, Collections.emptySet()));
diff --git a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel0.java b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel0.java
index 6fe09aa6585c..e9eaa685f92e 100644
--- a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel0.java
+++ b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel0.java
@@ -96,7 +96,7 @@ private String[] getPrimaryIdsFromLayer() {
}
primaryIds.remove("Advanced"); // NOI18N
primaryIds.add(0, "Advanced"); // NOI18N
- return primaryIds.toArray(new String[primaryIds.size()]);
+ return primaryIds.toArray(new String[0]);
}
private void addListeners() {
diff --git a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
index 8c1b7d93c774..f653b76f4ae2 100644
--- a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
+++ b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
@@ -119,7 +119,7 @@ public void construct() {
@Override
public void finished() {
- comMode.setModel(new DefaultComboBoxModel(modes != null ? modes.toArray(new String[modes.size()]) : DEFAULT_MODES));
+ comMode.setModel(new DefaultComboBoxModel(modes != null ? modes.toArray(new String[0]) : DEFAULT_MODES));
setComModeSelectedItem();
windowPosChanged(null);
setCursor(currentCursor);
diff --git a/apisupport/maven.apisupport/manifest.mf b/apisupport/maven.apisupport/manifest.mf
index 7f43bd2787f2..5ddfb1a6b17a 100644
--- a/apisupport/maven.apisupport/manifest.mf
+++ b/apisupport/maven.apisupport/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.maven.apisupport/1
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/apisupport/Bundle.properties
AutoUpdate-Show-In-Client: false
-OpenIDE-Module-Specification-Version: 1.82
+OpenIDE-Module-Specification-Version: 1.84
diff --git a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/AccessQueryImpl.java b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/AccessQueryImpl.java
index d516709deab9..5832872f6fc5 100644
--- a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/AccessQueryImpl.java
+++ b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/AccessQueryImpl.java
@@ -30,7 +30,6 @@
import java.util.regex.Pattern;
import org.netbeans.api.annotations.common.SuppressWarnings;
import org.netbeans.modules.maven.api.NbMavenProject;
-import org.codehaus.plexus.util.IOUtil;
import org.netbeans.api.project.Project;
import org.netbeans.spi.java.queries.AccessibilityQueryImplementation;
import org.netbeans.spi.project.ProjectServiceProvider;
@@ -166,17 +165,13 @@ private static List loadPublicPackagesPatterns(Project project) {
} else {
FileObject obj = project.getProjectDirectory().getFileObject(MANIFEST_PATH);
if (obj != null) {
- InputStream in = null;
- try {
- in = obj.getInputStream();
+ try (InputStream in = obj.getInputStream()) {
Manifest man = new Manifest();
man.read(in);
String value = man.getMainAttributes().getValue(ATTR_PUBLIC_PACKAGE);
toRet = prepareManifestPublicPackagesPatterns(value);
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
- } finally {
- IOUtil.close(in);
}
}
}
diff --git a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
index a10d60dca103..e45d75b8121c 100644
--- a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
+++ b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/IDEOutputListenerProvider.java
@@ -74,7 +74,7 @@ private ClassPath createCP(Project prj, HashSet parents) {
}
}
if (list.size() > 0) {
- return ClassPathSupport.createProxyClassPath(list.toArray(new ClassPath[list.size()]));
+ return ClassPathSupport.createProxyClassPath(list.toArray(new ClassPath[0]));
}
return null;
}
diff --git a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
index 57500b4f7b89..f437c1ba3cc8 100644
--- a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
+++ b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
@@ -44,7 +44,6 @@
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.netbeans.api.annotations.common.NonNull;
@@ -367,18 +366,14 @@ private Tuple cacheOrLoad() {
private Manifest getManifest(FileObject root) {
FileObject manifestFo = root.getFileObject("META-INF/MANIFEST.MF");
if (manifestFo != null) {
- InputStream is = null;
- try {
- is = manifestFo.getInputStream();
- return new Manifest(is);
+ try (InputStream is = manifestFo.getInputStream()) {
+ Manifest manifest = new Manifest(is);
+ return manifest;
} catch (IOException ex) {
//Exceptions.printStackTrace(ex);
- } finally {
- IOUtil.close(is);
}
}
return null;
-
}
private static class MavenWhiteListImplementation implements WhiteListImplementation {
diff --git a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NBMNativeMWI.java b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NBMNativeMWI.java
index b736d1e66f15..16b3c8508079 100644
--- a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NBMNativeMWI.java
+++ b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NBMNativeMWI.java
@@ -24,6 +24,8 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
@@ -32,7 +34,6 @@
import org.apache.maven.model.Dependency;
import org.apache.maven.model.PluginManagement;
import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.eclipse.aether.repository.RemoteRepository;
import org.netbeans.modules.apisupport.project.api.EditableManifest;
@@ -103,14 +104,10 @@ public void run() {
if (packageName != null) {
String path = packageName.replace(".", "/") + "/Bundle.properties";
mf.setAttribute("OpenIDE-Module-Localizing-Bundle", path, null);
- BufferedOutputStream bos = null;
- try {
- bos = new BufferedOutputStream(new FileOutputStream(new File(src, "manifest.mf")));
- mf.write(bos);
+ try (OutputStream os = new BufferedOutputStream(new FileOutputStream(new File(src, "manifest.mf")))) {
+ mf.write(os);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
- } finally {
- IOUtil.close(bos);
}
}
@@ -121,20 +118,13 @@ public void run() {
String path = packageName.replace(".", File.separator);
File res = new File(src, path);
res.mkdirs();
- OutputStream bos = null;
- try {
- bos = new BufferedOutputStream(new FileOutputStream(new File(res, "Bundle.properties")));
+ try (OutputStream os = new BufferedOutputStream(new FileOutputStream(new File(res, "Bundle.properties")))) {
Properties p = new Properties();
- p.store(bos, EMPTY_BUNDLE_FILE);
-
+ p.store(os, EMPTY_BUNDLE_FILE);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
- } finally {
- IOUtil.close(bos);
}
-
}
-
}
}
diff --git a/apisupport/timers/manifest.mf b/apisupport/timers/manifest.mf
index d9b28d66c865..7015ddff5895 100644
--- a/apisupport/timers/manifest.mf
+++ b/apisupport/timers/manifest.mf
@@ -3,6 +3,6 @@ OpenIDE-Module: org.netbeans.modules.timers/1
OpenIDE-Module-Layer: org/netbeans/modules/timers/resources/layer.xml
OpenIDE-Module-Install: org/netbeans/modules/timers/Install.class
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/timers/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.54
+OpenIDE-Module-Specification-Version: 1.56
AutoUpdate-Show-In-Client: true
diff --git a/contrib/cordova.platforms.ios/src/org/netbeans/modules/cordova/platforms/ios/IOSConfigurationPanel.java b/contrib/cordova.platforms.ios/src/org/netbeans/modules/cordova/platforms/ios/IOSConfigurationPanel.java
index 587471f0978e..5e1f28c38811 100644
--- a/contrib/cordova.platforms.ios/src/org/netbeans/modules/cordova/platforms/ios/IOSConfigurationPanel.java
+++ b/contrib/cordova.platforms.ios/src/org/netbeans/modules/cordova/platforms/ios/IOSConfigurationPanel.java
@@ -50,7 +50,7 @@ public class IOSConfigurationPanel extends javax.swing.JPanel {
final RequestProcessor RP = new RequestProcessor(IOSConfigurationPanel.class);
private void refreshDeviceCombo(Collection sdKs) {
- final IOSSDK[] sdks = (IOSSDK[]) sdKs.toArray(new IOSSDK[sdKs.size()]);
+ final IOSSDK[] sdks = (IOSSDK[]) sdKs.toArray(new IOSSDK[0]);
sdkCombo.setEnabled(true);
sdkCombo.setRenderer(new SDKRenderer());
sdkCombo.setModel(new DefaultComboBoxModel(sdks));
diff --git a/contrib/form.j2ee/src/org/netbeans/modules/form/j2ee/J2EEPropertyModifier.java b/contrib/form.j2ee/src/org/netbeans/modules/form/j2ee/J2EEPropertyModifier.java
index a68c102d8a62..8bdf3e4c8f9d 100644
--- a/contrib/form.j2ee/src/org/netbeans/modules/form/j2ee/J2EEPropertyModifier.java
+++ b/contrib/form.j2ee/src/org/netbeans/modules/form/j2ee/J2EEPropertyModifier.java
@@ -600,7 +600,7 @@ public String[] getTags() {
tags.addAll(Arrays.asList(superTags));
String none = noneString();
tags.remove(none);
- return tags.toArray(new String[tags.size()]);
+ return tags.toArray(new String[0]);
}
}
diff --git a/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsPlatform.java b/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsPlatform.java
index 4fb26e3deceb..87bdbccacaeb 100644
--- a/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsPlatform.java
+++ b/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsPlatform.java
@@ -194,7 +194,7 @@ public ClassPath getClassPath() {
}
}
- classpath = ClassPathSupport.createClassPath(urls.toArray(new URL[urls.size()]));
+ classpath = ClassPathSupport.createClassPath(urls.toArray(new URL[0]));
return classpath;
}
}
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/GrailsSources.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/GrailsSources.java
index b9f3f2d522e4..da5be8423a06 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/GrailsSources.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/GrailsSources.java
@@ -161,7 +161,7 @@ public SourceGroup[] getSourceGroups(String type) {
addUnknownGroups(KNOWN_FOLDERS_IN_GRAILS_APP, result, "grails-app", null);
addUnknownGroups(KNOWN_OR_IGNORED_FOLDERS_IN_TEST, result, "test", "LBL_SomeTests");
}
- return result.toArray(new SourceGroup[result.size()]);
+ return result.toArray(new SourceGroup[0]);
}
public void addChangeListener(ChangeListener listener) {
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/ProjectClassPathImplementation.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/ProjectClassPathImplementation.java
index 9bf2351a690f..b54f6f38b12e 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/ProjectClassPathImplementation.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/ProjectClassPathImplementation.java
@@ -108,7 +108,7 @@ private List getPath() {
// compile dependencies
List compileDeps = buildConfig.getCompileDependencies();
- addJars(compileDeps.toArray(new File[compileDeps.size()]), result, false);
+ addJars(compileDeps.toArray(new File[0]), result, false);
// FIXME move this to plugin specific support
// http://grails.org/GWT+Plugin
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/SourceRoots.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/SourceRoots.java
index ae2bb54efa1c..1b72ea213f6e 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/SourceRoots.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/classpath/SourceRoots.java
@@ -78,7 +78,7 @@ public FileObject[] getRoots() {
}
}
- return result.toArray(new FileObject[result.size()]);
+ return result.toArray(new FileObject[0]);
}
public List getRootURLs() {
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/commands/GrailsCommandSupport.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/commands/GrailsCommandSupport.java
index a069bf788b3c..a2c51705d7be 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/commands/GrailsCommandSupport.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/commands/GrailsCommandSupport.java
@@ -186,7 +186,7 @@ private InputProcessorFactory createInputProcessorFactory(InputProcessorFactory.
if (real.size() == 1) {
return real.get(0);
}
- return new ProxyInputProcessorFactory(real.toArray(new InputProcessorFactory[real.size()]));
+ return new ProxyInputProcessorFactory(real.toArray(new InputProcessorFactory[0]));
}
public void refreshGrailsCommands() {
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/debug/Utils.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/debug/Utils.java
index e3dc188bcb8c..187885a224b0 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/debug/Utils.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/debug/Utils.java
@@ -85,7 +85,7 @@ static ClassPath createSourcePath(Project project) {
// this is dup of above line in fact
urls.addAll(grailsProject.getTestSourceRoots().getRootURLs());
- return ClassPathSupport.createClassPath(urls.toArray(new URL[urls.size()]));
+ return ClassPathSupport.createClassPath(urls.toArray(new URL[0]));
}
static ClassPath createJDKSourcePath(Project nbproject) {
@@ -106,7 +106,7 @@ private static ClassPath convertToClassPath(File[] roots) {
URL url = Utils.fileToURL(roots[i]);
l.add(url);
}
- URL[] urls = l.toArray(new URL[l.size()]);
+ URL[] urls = l.toArray(new URL[0]);
return ClassPathSupport.createClassPath(urls);
}
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/plugins/GrailsPluginSupport.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/plugins/GrailsPluginSupport.java
index d1ad7a9cbd39..b29e76e6130a 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/plugins/GrailsPluginSupport.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/plugins/GrailsPluginSupport.java
@@ -339,7 +339,7 @@ public Boolean call() {
}
Callable callable = ExecutionSupport.getInstance().createSimpleCommand(
- command, GrailsProjectConfig.forProject(project), args.toArray(new String[args.size()]));
+ command, GrailsProjectConfig.forProject(project), args.toArray(new String[0]));
ExecutionDescriptor descriptor = new ExecutionDescriptor().frontWindow(true)
.postExecution(new RefreshProjectRunnable(project));
diff --git a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/ui/GrailsLogicalViewProvider.java b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/ui/GrailsLogicalViewProvider.java
index e4c1532c4a8c..b71e784a1ac8 100644
--- a/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/ui/GrailsLogicalViewProvider.java
+++ b/contrib/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/ui/GrailsLogicalViewProvider.java
@@ -141,7 +141,7 @@ private Action[] getAdditionalActions() {
actions.add(null);
actions.add(CommonProjectActions.customizeProjectAction());
- return actions.toArray(new Action[actions.size()]);
+ return actions.toArray(new Action[0]);
}
private Action getCommandAction(String commandName, String localizationName) {
diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java
index 5f928acc049b..5b1517cc246c 100644
--- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java
+++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java
@@ -413,9 +413,9 @@ private DeploymentFactory getFactory(String instanceURL) {
if(version!= null && "7".equals(version.getMajorNumber())) {
Class> c = loader.loadClass("org.jboss.as.ee.deployment.spi.factories.DeploymentFactoryImpl");
c.getMethod("register").invoke(null);
- jbossFactory = (DeploymentFactory) c.newInstance();//NOI18N
+ jbossFactory = (DeploymentFactory) c.getDeclaredConstructor().newInstance();//NOI18N
} else {
- jbossFactory = (DeploymentFactory) loader.loadClass("org.jboss.deployment.spi.factories.DeploymentFactoryImpl").newInstance();//NOI18N
+ jbossFactory = (DeploymentFactory) loader.loadClass("org.jboss.deployment.spi.factories.DeploymentFactoryImpl").getDeclaredConstructor().newInstance();//NOI18N
}
diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBTargetModuleID.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBTargetModuleID.java
index 0a94569c69a3..12e7036567ba 100644
--- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBTargetModuleID.java
+++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/JBTargetModuleID.java
@@ -61,7 +61,7 @@ public void addChild(JBTargetModuleID child) {
}
public TargetModuleID[] getChildTargetModuleID() {
- return (TargetModuleID[]) childs.toArray(new TargetModuleID[childs.size()]);
+ return (TargetModuleID[]) childs.toArray(new TargetModuleID[0]);
}
//Retrieve a list of identifiers of the children of this deployed module.
public String getModuleID() {
diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java
index a65dd2ab1828..881261695849 100644
--- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java
+++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java
@@ -26,6 +26,7 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeoutException;
@@ -452,11 +453,11 @@ String getRunFileName(){
boolean needChangeConf = matcherConf != null && matcherConf.matches();
try {
if (needChangeRun || needChangeConf) {
- File startBat = File.createTempFile(RUN_FILE_NAME, ".bat"); // NOI18N
+ File startBat = Files.createTempFile(RUN_FILE_NAME, ".bat").toFile(); // NOI18N
File confBat = null;
if (contentConf != null) {
- confBat = File.createTempFile(CONF_FILE_NAME, ".bat", // NOI18N
- startBat.getParentFile()); // NOI18N
+ confBat = Files.createTempFile(// NOI18N
+ startBat.getParentFile().toPath(), CONF_FILE_NAME, ".bat").toFile(); // NOI18N
}
startBat.deleteOnExit();
contentRun = replaceJavaOpts(contentRun, matcherRun);
diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStopRunnable.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStopRunnable.java
index c4e8ed68e22d..815b1dfcb9d7 100644
--- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStopRunnable.java
+++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStopRunnable.java
@@ -85,7 +85,7 @@ private String[] createEnvironment() {
// the shutdown script should not wait for a key press
envp.add("NOPAUSE=true"); // NOI18N
}
- return (String[]) envp.toArray(new String[envp.size()]);
+ return (String[]) envp.toArray(new String[0]);
}
public void run() {
diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java
index 1f60e1d0919a..ab1b2f4f47f8 100644
--- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java
+++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java
@@ -39,7 +39,7 @@ public JpaSupportImpl(JBJ2eePlatformFactory.J2eePlatformImplImpl platformImpl) {
public JpaProvider getDefaultProvider() {
String defaultProvider = platformImpl.getDefaultJpaProvider();
boolean jpa2 = platformImpl.isJpa2Available();
- return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, jpa2, false, false, false, false);
+ return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, jpa2, false, false, false, false, false);
}
@Override
@@ -48,13 +48,16 @@ public Set getProviders() {
boolean jpa2 = platformImpl.isJpa2Available();
Set providers = new HashSet();
if (platformImpl.containsPersistenceProvider(JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER)) {
- providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER, JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, false, false));
+ providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER,
+ JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, false, false, false, false, false));
}
if (platformImpl.containsPersistenceProvider(JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER)) {
- providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER, JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false));
+ providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER,
+ JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false));
}
if (platformImpl.containsPersistenceProvider(JBJ2eePlatformFactory.KODO_JPA_PROVIDER)) {
- providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.KODO_JPA_PROVIDER, JBJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false));
+ providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.KODO_JPA_PROVIDER,
+ JBJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false));
}
return providers;
}
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java
index c1c14f5b05b6..e32ed1ef8e11 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java
@@ -257,7 +257,7 @@ public static String[] getRegisteredDomainPaths(String serverRoot) {
if (result.isEmpty()) {
result.addAll(getDomainsFromNodeManager(serverRoot));
}
- return result.toArray(new String[result.size()]);
+ return result.toArray(new String[0]);
}
@CheckForNull
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLTrustHandler.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLTrustHandler.java
index 137a5e9d1aef..e30129dd8374 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLTrustHandler.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLTrustHandler.java
@@ -380,7 +380,7 @@ private static X509Certificate[] sortChain(X509Certificate[] certificates) {
}
}
}
- return chainList.toArray(new X509Certificate[chainList.size()]);
+ return chainList.toArray(new X509Certificate[0]);
}
}
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLDeploymentManager.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLDeploymentManager.java
index 2c9b970b86cd..69fda5fb269a 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLDeploymentManager.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLDeploymentManager.java
@@ -622,7 +622,7 @@ public Target[] call(MBeanServerConnection connection, ObjectName service) throw
}
}
}
- return targets.toArray(new Target[targets.size()]);
+ return targets.toArray(new Target[0]);
}
});
} catch (Exception ex) {
@@ -643,7 +643,7 @@ public Target[] execute(DeploymentManager manager) throws ExecutionException {
ret.add(t);
}
}
- return ret.toArray(new Target[ret.size()]);
+ return ret.toArray(new Target[0]);
}
return targets;
}
@@ -745,7 +745,7 @@ public ProgressObject execute(DeploymentManager manager) throws ExecutionExcepti
}
}
return registerProgressObject(new ServerProgressObject(
- manager.redeploy(toRedeploy.toArray(new TargetModuleID[toRedeploy.size()]), (File) null, null)));
+ manager.redeploy(toRedeploy.toArray(new TargetModuleID[0]), (File) null, null)));
} catch (TargetException ex) {
throw new ExecutionException(ex);
} catch (IllegalStateException ex) {
@@ -899,7 +899,7 @@ private static Target[] translateTargets(DeploymentManager manager, Target[] ori
}
}
}
- return deployTargets.toArray(new Target[deployTargets.size()]);
+ return deployTargets.toArray(new Target[0]);
}
private static ProgressObject registerProgressObject(ServerProgressObject po) {
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleID.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleID.java
index 68ca0a0942b8..7c06900106bc 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleID.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleID.java
@@ -83,7 +83,7 @@ public synchronized void addChild(WLTargetModuleID child) {
}
public synchronized TargetModuleID[] getChildTargetModuleID(){
- return (TargetModuleID[]) children.toArray(new TargetModuleID[children.size()]);
+ return (TargetModuleID[]) children.toArray(new TargetModuleID[0]);
}
public synchronized void addUrl(URL url) {
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleIDResolver.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleIDResolver.java
index e4b6ecfc2e95..06f1ba758d0b 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleIDResolver.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/deploy/WLTargetModuleIDResolver.java
@@ -59,7 +59,7 @@ public TargetModuleID[] lookupTargetModuleID(Map targetModuleInfo, Target[] targ
Logger.getLogger(WLTargetModuleIDResolver.class.getName()).log(Level.INFO, null, ex);
}
- return (TargetModuleID[]) result.toArray(new TargetModuleID[result.size()]);
+ return (TargetModuleID[]) result.toArray(new TargetModuleID[0]);
}
private void addCollisions(String contextRoot, String noSlashContextRoot, List result, TargetModuleID[] candidates) {
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxRsStackSupportImpl.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxRsStackSupportImpl.java
index 48a121895c33..59deaf9095c6 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxRsStackSupportImpl.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxRsStackSupportImpl.java
@@ -683,8 +683,7 @@ private boolean addJars( Project project, Collection jars ){
classPathType = ClassPath.COMPILE;
}
try {
- ProjectClassPathModifier.addRoots(urls.toArray( new URL[ urls.size()]),
- sourceRoot, classPathType);
+ ProjectClassPathModifier.addRoots(urls.toArray(new URL[0]), sourceRoot, classPathType);
}
catch(UnsupportedOperationException ex) {
return false;
@@ -715,8 +714,7 @@ private void removeLibraries(Project project, Collection urls) {
String[] classPathTypes = new String[]{ ClassPath.COMPILE , ClassPath.EXECUTE };
for (String type : classPathTypes) {
try {
- ProjectClassPathModifier.removeRoots(urls.toArray(
- new URL[ urls.size()]), sourceRoot, type);
+ ProjectClassPathModifier.removeRoots(urls.toArray(new URL[0]), sourceRoot, type);
}
catch(UnsupportedOperationException ex) {
Logger.getLogger( JaxRsStackSupportImpl.class.getName() ).
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxWsPoliciesSupportImpl.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxWsPoliciesSupportImpl.java
index e316d753cbc1..3f0d66538f40 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxWsPoliciesSupportImpl.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JaxWsPoliciesSupportImpl.java
@@ -149,7 +149,7 @@ public void extendsProjectClasspath(Project project, Collection fqns) {
}
List urls = new LinkedList(archive2Url.values());
try {
- ProjectClassPathModifier.addRoots(urls.toArray(new URL[urls.size()]), sourceRoot, ClassPath.COMPILE);
+ ProjectClassPathModifier.addRoots(urls.toArray(new URL[0]), sourceRoot, ClassPath.COMPILE);
} catch (IOException ex) {
Logger.getLogger(getClass().getName()).log(Level.INFO, "Couldn't extends compile classpath with required jars " + "for WL policy support", ex); // NOI18N
}
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java
index 20e7f36c17e7..0e31bae10c67 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java
@@ -39,7 +39,7 @@ public JpaSupportImpl(WLJ2eePlatformFactory.J2eePlatformImplImpl platformImpl) {
public JpaProvider getDefaultProvider() {
String defaultProvider = platformImpl.getDefaultJpaProvider();
return JpaProviderFactory.createJpaProvider(defaultProvider, true, true,
- platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false);
+ platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false, false, false, false);
}
@Override
@@ -47,11 +47,11 @@ public Set getProviders() {
String defaultProvider = platformImpl.getDefaultJpaProvider();
Set providers = new HashSet();
providers.add(JpaProviderFactory.createJpaProvider(WLJ2eePlatformFactory.OPENJPA_JPA_PROVIDER,
- WLJ2eePlatformFactory.OPENJPA_JPA_PROVIDER.equals(defaultProvider), true, false, false, false));
+ WLJ2eePlatformFactory.OPENJPA_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false));
providers.add(JpaProviderFactory.createJpaProvider(
WLJ2eePlatformFactory.ECLIPSELINK_JPA_PROVIDER,
WLJ2eePlatformFactory.ECLIPSELINK_JPA_PROVIDER.equals(defaultProvider),
- true, platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false));
+ true, platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false, false, false, false));
return providers;
}
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java
index 2f9a1db254ff..a7f3c5aaeb31 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java
@@ -730,7 +730,7 @@ public LibraryImplementation[] getLibraries(Set librari
// issues like #188753
serverImpl.addAll(Arrays.asList(getLibraries()));
- return serverImpl.toArray(new LibraryImplementation[serverImpl.size()]);
+ return serverImpl.toArray(new LibraryImplementation[0]);
}
public void notifyLibrariesChange() {
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/JdbcRetriever.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/JdbcRetriever.java
index fb2ada2f9732..5a1af6d58360 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/JdbcRetriever.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/JdbcRetriever.java
@@ -246,7 +246,7 @@ private void loadDeployedDataSource(String path, List list,
jdbcConfig.getInputStream()), handler);
List jndiNames = handler.getJndiNames();
list.add( new JDBCDataBean( handler.getName(),
- jndiNames.toArray(new String[jndiNames.size()]), deplName));
+ jndiNames.toArray(new String[0]), deplName));
} catch (ParserConfigurationException e) {
LOGGER.log(Level.INFO, null, e);
} catch (SAXException e) {
diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/WLModuleNode.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/WLModuleNode.java
index ed07cd0f247e..ea03e56629c9 100644
--- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/WLModuleNode.java
+++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/nodes/WLModuleNode.java
@@ -100,7 +100,7 @@ public Action[] getActions(boolean context) {
actions.add(SystemAction.get(OpenModuleUrlAction.class));
actions.add(null);
actions.add(SystemAction.get(UndeployModuleAction.class));
- return actions.toArray(new Action[actions.size()]);
+ return actions.toArray(new Action[0]);
}
@Override
diff --git a/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/client/ClientView.java b/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/client/ClientView.java
index a8d786708594..8bf44957432f 100644
--- a/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/client/ClientView.java
+++ b/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/client/ClientView.java
@@ -126,11 +126,11 @@ public class ClientView extends SectionView {
nodes.add(advancedConfigNode);
}
- bindingChildren.add(nodes.toArray(new Node[nodes.size()]));
+ bindingChildren.add(nodes.toArray(new Node[0]));
addSection(bindingCont, false);
bindingNodes.add(bindingNodeContainer);
}
- rootChildren.add(bindingNodes.toArray(new Node[bindingNodes.size()]));
+ rootChildren.add(bindingNodes.toArray(new Node[0]));
} else {
if (bindings.size() > 0) {
Binding binding = (Binding) bindings.toArray()[0];
@@ -165,7 +165,7 @@ public class ClientView extends SectionView {
addSection(advancedConfigPanel);
nodes.add(advancedConfigNode);
}
- rootChildren.add(nodes.toArray(new Node[nodes.size()]));
+ rootChildren.add(nodes.toArray(new Node[0]));
}
}
setRoot(root);
diff --git a/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/service/ServiceView.java b/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/service/ServiceView.java
index a8a0e6e7e2ce..729db70c5a35 100644
--- a/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/service/ServiceView.java
+++ b/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/ui/service/ServiceView.java
@@ -98,7 +98,7 @@ public class ServiceView extends SectionView {
addSection(bindingCont, false);
ArrayList nodes = initOperationView(bindingCont, binding, serviceOnly);
- bindingChildren.add(nodes.toArray(new Node[nodes.size()]));
+ bindingChildren.add(nodes.toArray(new Node[0]));
bindingNodes[i++] = bindingNodeContainer;
}
@@ -111,7 +111,7 @@ public class ServiceView extends SectionView {
}
ArrayList nodes = initOperationView(null, b, serviceOnly);
- rootChildren.add(nodes.toArray(new Node[nodes.size()]));
+ rootChildren.add(nodes.toArray(new Node[0]));
}
}
@@ -168,7 +168,7 @@ private ArrayList initOperationView(SectionContainer bindingCont, Binding
SectionPanel bfPanel = new SectionPanel(this, bfNode, bf, false);
opCont.addSection(bfPanel, false);
}
- opChildren.add(subNodes.toArray(new Node[subNodes.size()]));
+ opChildren.add(subNodes.toArray(new Node[0]));
nodes.add(opNodeContainer);
}
}
diff --git a/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/util/Util.java b/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/util/Util.java
index 18b7e4f09da2..00a863d39cbd 100644
--- a/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/util/Util.java
+++ b/contrib/websvc.wsitconf/src/org/netbeans/modules/websvc/wsitconf/util/Util.java
@@ -143,7 +143,7 @@ public static SourceGroup[] getJavaSourceGroups(Project project) {
result.add(sourceGroups[i]);
}
}
- return result.toArray(new SourceGroup[result.size()]);
+ return result.toArray(new SourceGroup[0]);
}
private static Set getTestSourceGroups(SourceGroup[] sourceGroups) {
diff --git a/contrib/websvc.wsitconf/test/unit/src/org/netbeans/modules/websvc/wsitconf/util/TestUtil.java b/contrib/websvc.wsitconf/test/unit/src/org/netbeans/modules/websvc/wsitconf/util/TestUtil.java
index 327eba384238..e3b87814a6cd 100644
--- a/contrib/websvc.wsitconf/test/unit/src/org/netbeans/modules/websvc/wsitconf/util/TestUtil.java
+++ b/contrib/websvc.wsitconf/test/unit/src/org/netbeans/modules/websvc/wsitconf/util/TestUtil.java
@@ -29,6 +29,7 @@
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.URI;
+import java.nio.file.Files;
import javax.swing.text.Document;
import org.netbeans.modules.xml.wsdl.model.WSDLModel;
import org.openide.filesystems.FileObject;
@@ -99,7 +100,7 @@ public static void dumpToFile(Document doc, File f) throws Exception {
}
public static File dumpToTempFile(Document doc) throws Exception {
- File f = File.createTempFile("xsm", "xsd");
+ File f = Files.createTempFile("xsm", "xsd").toFile();
dumpToFile(doc, f);
return f;
}
diff --git a/cpplite/cpplite.debugger/manifest.mf b/cpplite/cpplite.debugger/manifest.mf
index f5ba1b39caf9..dceff650eab9 100644
--- a/cpplite/cpplite.debugger/manifest.mf
+++ b/cpplite/cpplite.debugger/manifest.mf
@@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.cpplite.debugger
OpenIDE-Module-Layer: org/netbeans/modules/cpplite/debugger/resources/mf-layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cpplite/debugger/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.15
+OpenIDE-Module-Specification-Version: 1.17
diff --git a/cpplite/cpplite.debugger/nbproject/org-netbeans-modules-cpplite-debugger.sig b/cpplite/cpplite.debugger/nbproject/org-netbeans-modules-cpplite-debugger.sig
index 070f662e6b10..b7410d2a1c76 100644
--- a/cpplite/cpplite.debugger/nbproject/org-netbeans-modules-cpplite-debugger.sig
+++ b/cpplite/cpplite.debugger/nbproject/org-netbeans-modules-cpplite-debugger.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.14
+#Version 1.15
CLSS public java.lang.Object
cons public init()
diff --git a/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/CPPLiteBreakpoint.java b/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/CPPLiteBreakpoint.java
index f4e6eb0d1ab9..6e382ded0160 100644
--- a/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/CPPLiteBreakpoint.java
+++ b/cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/breakpoints/CPPLiteBreakpoint.java
@@ -303,7 +303,7 @@ public DebuggerEngine[] getEngines() {
if (antEngines == null) {
return null;
} else {
- return antEngines.toArray(new DebuggerEngine[antEngines.size()]);
+ return antEngines.toArray(new DebuggerEngine[0]);
}
}
diff --git a/cpplite/cpplite.editor/manifest.mf b/cpplite/cpplite.editor/manifest.mf
index 280d65f6417e..708c207e824d 100644
--- a/cpplite/cpplite.editor/manifest.mf
+++ b/cpplite/cpplite.editor/manifest.mf
@@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.cpplite.editor
OpenIDE-Module-Layer: org/netbeans/modules/cpplite/editor/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cpplite/editor/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.14
+OpenIDE-Module-Specification-Version: 1.16
diff --git a/cpplite/cpplite.editor/nbproject/org-netbeans-modules-cpplite-editor.sig b/cpplite/cpplite.editor/nbproject/org-netbeans-modules-cpplite-editor.sig
index dfdd0405204c..f9a8deb1a815 100644
--- a/cpplite/cpplite.editor/nbproject/org-netbeans-modules-cpplite-editor.sig
+++ b/cpplite/cpplite.editor/nbproject/org-netbeans-modules-cpplite-editor.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.13
+#Version 1.14
CLSS public java.lang.Object
cons public init()
diff --git a/cpplite/cpplite.kit/manifest.mf b/cpplite/cpplite.kit/manifest.mf
index 372eda5a9c3d..cea2d0344ac2 100644
--- a/cpplite/cpplite.kit/manifest.mf
+++ b/cpplite/cpplite.kit/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: true
OpenIDE-Module: org.netbeans.modules.cpplite.kit
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cpplite/kit/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.14
+OpenIDE-Module-Specification-Version: 1.16
diff --git a/cpplite/cpplite.project/manifest.mf b/cpplite/cpplite.project/manifest.mf
index a5cae820b3c9..b444bd2fe41e 100644
--- a/cpplite/cpplite.project/manifest.mf
+++ b/cpplite/cpplite.project/manifest.mf
@@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.cpplite.project
OpenIDE-Module-Layer: org/netbeans/modules/cpplite/project/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cpplite/project/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.14
+OpenIDE-Module-Specification-Version: 1.16
diff --git a/enterprise/api.web.webmodule/manifest.mf b/enterprise/api.web.webmodule/manifest.mf
index 0d05fcd7f229..71d15edd5143 100644
--- a/enterprise/api.web.webmodule/manifest.mf
+++ b/enterprise/api.web.webmodule/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.api.web.webmodule
-OpenIDE-Module-Specification-Version: 1.61
+OpenIDE-Module-Specification-Version: 1.63
OpenIDE-Module-Layer: org/netbeans/modules/web/webmodule/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/webmodule/Bundle.properties
diff --git a/enterprise/api.web.webmodule/nbproject/org-netbeans-api-web-webmodule.sig b/enterprise/api.web.webmodule/nbproject/org-netbeans-api-web-webmodule.sig
index 6c385805d7f8..5efd26bc39c6 100644
--- a/enterprise/api.web.webmodule/nbproject/org-netbeans-api-web-webmodule.sig
+++ b/enterprise/api.web.webmodule/nbproject/org-netbeans-api-web-webmodule.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.60
+#Version 1.61
CLSS public abstract interface !annotation java.lang.Deprecated
anno 0 java.lang.annotation.Documented()
diff --git a/enterprise/cloud.amazon/manifest.mf b/enterprise/cloud.amazon/manifest.mf
index 081d96635556..915f38913b56 100644
--- a/enterprise/cloud.amazon/manifest.mf
+++ b/enterprise/cloud.amazon/manifest.mf
@@ -4,5 +4,5 @@ OpenIDE-Module: org.netbeans.modules.cloud.amazon/0
OpenIDE-Module-Provides: org.netbeans.modules.serverplugins.javaee
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cloud/amazon/Bundle.properties
OpenIDE-Module-Layer: org/netbeans/modules/cloud/amazon/resources/layer.xml
-OpenIDE-Module-Specification-Version: 1.35
+OpenIDE-Module-Specification-Version: 1.37
diff --git a/enterprise/cloud.amazon/src/org/netbeans/modules/cloud/amazon/ui/serverplugin/AmazonJ2EEServerWizardComponent.java b/enterprise/cloud.amazon/src/org/netbeans/modules/cloud/amazon/ui/serverplugin/AmazonJ2EEServerWizardComponent.java
index e8dc1da8a98f..74cef478ae01 100644
--- a/enterprise/cloud.amazon/src/org/netbeans/modules/cloud/amazon/ui/serverplugin/AmazonJ2EEServerWizardComponent.java
+++ b/enterprise/cloud.amazon/src/org/netbeans/modules/cloud/amazon/ui/serverplugin/AmazonJ2EEServerWizardComponent.java
@@ -271,7 +271,7 @@ private void initComponents() {
private void initAccounts() {
List l = AmazonInstanceManager.getDefault().getInstances();
- DefaultComboBoxModel model = new DefaultComboBoxModel(l.toArray(new AmazonInstance[l.size()]));
+ DefaultComboBoxModel model = new DefaultComboBoxModel(l.toArray(new AmazonInstance[0]));
accountComboBox.setModel(model);
accountComboBox.setRenderer(new ListCellRenderer() {
@Override
@@ -346,7 +346,7 @@ private void reloadTemplates() {
if (templateNames != null && templateNames.size() > 0) {
templateNames = new ArrayList(templateNames);
templateNames.add(0, "");
- templateComboBox.setModel(new DefaultComboBoxModel(templateNames.toArray(new String[templateNames.size()])));
+ templateComboBox.setModel(new DefaultComboBoxModel(templateNames.toArray(new String[0])));
templateComboBox.setSelectedIndex(0);
templateComboBox.setEnabled(true);
templateLabel.setEnabled(true);
@@ -372,7 +372,7 @@ public Void call() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
- appNameComboBox.setModel(new DefaultComboBoxModel(apps.toArray(new String[apps.size()])));
+ appNameComboBox.setModel(new DefaultComboBoxModel(apps.toArray(new String[0])));
appNameComboBox.setSelectedIndex(0);
}
});
@@ -445,7 +445,7 @@ public Void call() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
- containerComboBox.setModel(new DefaultComboBoxModel(containers.toArray(new String[containers.size()])));
+ containerComboBox.setModel(new DefaultComboBoxModel(containers.toArray(new String[0])));
}
});
return null;
diff --git a/enterprise/cloud.common/manifest.mf b/enterprise/cloud.common/manifest.mf
index 53161897b780..e51c5462d868 100644
--- a/enterprise/cloud.common/manifest.mf
+++ b/enterprise/cloud.common/manifest.mf
@@ -2,4 +2,4 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.cloud.common
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cloud/common/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.34
+OpenIDE-Module-Specification-Version: 1.36
diff --git a/enterprise/cloud.common/nbproject/org-netbeans-modules-cloud-common.sig b/enterprise/cloud.common/nbproject/org-netbeans-modules-cloud-common.sig
index 38d2ee645686..fb26293eb89f 100644
--- a/enterprise/cloud.common/nbproject/org-netbeans-modules-cloud-common.sig
+++ b/enterprise/cloud.common/nbproject/org-netbeans-modules-cloud-common.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.33
+#Version 1.34
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/enterprise/cloud.oracle/manifest.mf b/enterprise/cloud.oracle/manifest.mf
index 9436b7456714..eb908421be8b 100644
--- a/enterprise/cloud.oracle/manifest.mf
+++ b/enterprise/cloud.oracle/manifest.mf
@@ -4,6 +4,6 @@ OpenIDE-Module: org.netbeans.modules.cloud.oracle
OpenIDE-Module-Layer: org/netbeans/modules/cloud/oracle/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cloud/oracle/Bundle.properties
OpenIDE-Module-Provides: org.netbeans.modules.serverplugins.javaee
-OpenIDE-Module-Specification-Version: 1.9
+OpenIDE-Module-Specification-Version: 1.11
OpenIDE-Module-Display-Category: Cloud
diff --git a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/BrokenProfileNode.java b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/BrokenProfileNode.java
index d9c18de1ff36..5a579598694a 100644
--- a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/BrokenProfileNode.java
+++ b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/BrokenProfileNode.java
@@ -55,7 +55,7 @@ public Action[] getActions(boolean context) {
result.add(commonAction);
}
}
- return result.toArray(new Action[result.size()]);
+ return result.toArray(new Action[0]);
}
@Override
diff --git a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/RunFileADMAction.java b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/RunFileADMAction.java
index ba5f9391ec27..85f98b4643e3 100644
--- a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/RunFileADMAction.java
+++ b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/RunFileADMAction.java
@@ -50,7 +50,7 @@
@ActionReferences(value = {
@ActionReference(position = 251, path = "Loaders/text/x-maven-pom+xml/Actions"),
- @ActionReference(position = 1800, path = "Projects/org-netbeans-modules-maven/Actions")
+ @ActionReference(position = 1850, path = "Projects/org-netbeans-modules-maven/Actions")
})
@NbBundle.Messages({
diff --git a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/VulnerabilityWorker.java b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/VulnerabilityWorker.java
index b00f42363d6e..68adc66efa5f 100644
--- a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/VulnerabilityWorker.java
+++ b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/VulnerabilityWorker.java
@@ -43,12 +43,14 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level;
import java.util.logging.Logger;
+import java.util.stream.Collectors;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
@@ -71,8 +73,8 @@
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
+import org.openide.util.Pair;
import org.openide.util.RequestProcessor;
-import org.openide.util.RequestProcessor.Task;
/**
*
@@ -131,6 +133,192 @@ public class VulnerabilityWorker implements ErrorProvider{
// @GuardedBy(class)
private static VulnerabilityWorker instance;
+ private static String nonNull(String s) {
+ return s == null ? "" : s;
+ }
+
+ /**
+ * Holds mapping from vulnerable dependencies to the source. This is invalidated and
+ * recomputed after each source change from the same dependency result.
+ * This is computed for dependencies found in vulnerability items.
+ */
+ final static class SourceMapping {
+ /**
+ * For each reported Depdendency, its closest parent (including self) with source
+ * information.
+ */
+ final Map nodesWithSource = new HashMap<>();
+
+ /**
+ * Source locations for the dependencies. Note the SourceLocation may be implied,
+ * so that it points to a different Dependnecy.
+ */
+ final Map locations = new HashMap<>();
+
+ /**
+ * Set of files with reported locations. Usually just one.
+ */
+ final Set files = new HashSet<>();
+ }
+
+
+ /**
+ * Records all vulnerabilities for a certain group-artifact-version. Collects all
+ * locations (paths) in the dependency tree where the GAV appears.
+ */
+ final static class VulnerabilityItem {
+ /**
+ * GAV coordinates of the reported artifact
+ */
+ final String gav;
+ /**
+ * List of vulnerabilities found for this artifact GAV
+ */
+ final List reports;
+
+ /**
+ * All paths to the artifact through the dependency graph. Each List is a path
+ * from the project root to the identified dependency.
+ */
+ final Set> paths = new LinkedHashSet<>();
+
+ public VulnerabilityItem(String gav, List reports) {
+ this.gav = gav;
+ this.reports = reports;
+ }
+ }
+
+ private static String getDependencyId(Dependency d) {
+ if (d.getProject() != null) {
+ return d.getProject().getProjectId();
+ } else if (d.getArtifact() != null) {
+ return createGAV(d.getArtifact());
+ } else {
+ return d.toString();
+ }
+ }
+
+ static Pair findSource(DependencyResult dependencyResult, Dependency dependency) {
+ SourceLocation sourcePath = null;
+ Dependency sd = dependency;
+ for (; sd != null; sd = sd.getParent()) {
+ try {
+ sourcePath = dependencyResult.getDeclarationRange(dependency, null);
+ if (sourcePath != null) {
+ break;
+ }
+ } catch (IOException ex) {
+ LOG.log(Level.WARNING, "Could not load dependency source", ex);
+ }
+ }
+ return Pair.of(sd, sourcePath);
+ }
+
+ static class SourceMappingBuilder {
+ private final DependencyResult dependencyResult;
+ private final Map itemIndex;
+ private SourceMapping result = new SourceMapping();
+
+ public SourceMappingBuilder(DependencyResult dependencyResult, Map itemIndex) {
+ this.dependencyResult = dependencyResult;
+ this.itemIndex = itemIndex;
+ }
+
+ public SourceMapping build() {
+ for (VulnerabilityItem item : itemIndex.values()) {
+ for (List path : item.paths) {
+ Dependency node = path.get(path.size() - 1);
+ if (result.nodesWithSource.containsKey(node)) {
+ continue;
+ }
+ Pair s = findSource(dependencyResult, node);
+ result.nodesWithSource.put(node, s.first());
+ if (s.first() == null || s.second() == null) {
+ continue;
+ }
+ SourceLocation l = s.second();
+ result.nodesWithSource.put(node, s.first());
+ if (l != null) {
+ result.locations.putIfAbsent(s.first(), l);
+ result.files.add(l.getFile());
+ }
+ }
+ }
+ return result;
+ }
+ }
+
+
+ /**
+ * Builds the vulnerability indices from the vulnerability report and project dependencies. The outcome is "itemIdex" and
+ * "sourceMapping" which are then copied to {@link CacheItem}.
+ */
+ static class CacheDataBuilder {
+ private final DependencyResult dependencyResult;
+ private final VulnerabilityReport report;
+
+ private Map itemIndex = new HashMap<>();
+ private SourceMapping sourceMapping;
+ private Set uniqueDeps = new HashSet<>();
+
+ public CacheDataBuilder(DependencyResult dependencyResult, VulnerabilityReport report) {
+ this.dependencyResult = dependencyResult;
+ this.report = report;
+ }
+
+ private void initVulnerabilityIndex() {
+ this.itemIndex = new HashMap<>();
+ for (ApplicationDependencyVulnerabilitySummary s: report.items) {
+ VulnerabilityItem item = new VulnerabilityItem(s.getGav(), s.getVulnerabilities());
+ itemIndex.put(s.getGav(), item);
+ }
+ }
+
+ private void buildDependencyMap(Dependency dependency, List path, Set pathToRoot) {
+ String gav = getDependencyId(dependency);
+ if (gav == null || !pathToRoot.add(gav)) {
+ return;
+ }
+ uniqueDeps.add(gav);
+
+ pathToRoot.add(gav);
+ try {
+ VulnerabilityItem item = itemIndex.get(gav);
+ if (item != null) {
+ List p = new ArrayList<>(path);
+ p.add(dependency);
+ item.paths.add(p);
+ }
+
+ if (dependency != dependencyResult.getRoot()) {
+ path.add(dependency);
+ }
+ dependency.getChildren().forEach((childDependency) -> {
+ buildDependencyMap(childDependency, path, pathToRoot);
+ });
+ if (!path.isEmpty()) {
+ Dependency x = path.remove(path.size() - 1);
+ assert x == dependency;
+ }
+ } finally {
+ pathToRoot.remove(gav);
+ }
+ }
+
+ Map build() {
+ initVulnerabilityIndex();
+ SourceLocation rootLocation = null;
+ try {
+ rootLocation = dependencyResult.getDeclarationRange(dependencyResult.getRoot(), null);
+ } catch (IOException ex) {
+ LOG.log(Level.WARNING, "Could not load dependency source", ex);
+ }
+ buildDependencyMap(this.dependencyResult.getRoot(), new ArrayList<>(), new HashSet<>());
+ sourceMapping = new SourceMappingBuilder(dependencyResult, itemIndex).build();
+ return itemIndex;
+ }
+ }
+
/**
* Cached information + watcher over the project file data. Will watch for dependency change event,
* that is fired e.g. after project reload, and will REPLACE ITSELF in the cache + fire
@@ -141,17 +329,24 @@ static class CacheItem {
private final DependencyResult dependencyResult;
private final VulnerabilityReport report;
+ // @GuardedBy(this) -- initialization only
+ private Map itemIndex;
+
+ // @GuardedBy(this) -- initialization only
+ private SourceMapping sourceMapping;
/**
- * Maps GAV -> dependency.
+ * Number of dependencies
*/
- private Map dependencyMap;
-
+ // @GuardedBy(this) -- initialization only
+ private int uniqueDependencies;
+
// @GuardedBy(this)
private ChangeListener depChange;
+ private ChangeListener sourceChange;
// @GuardedBy(this)
private RequestProcessor.Task pendingRefresh;
-
+
public CacheItem(Project project, DependencyResult dependency, VulnerabilityReport report) {
this.project = project;
this.dependencyResult = dependency;
@@ -169,52 +364,76 @@ public VulnerabilityAuditSummary getAudit() {
public List getVulnerabilities() {
return report.items;
}
-
- public Map getDependencyMap() {
- if (dependencyMap == null) {
- dependencyMap = new HashMap<>();
- buildDependecyMap(dependencyResult.getRoot(), dependencyMap);
- }
- return dependencyMap;
- }
- private void buildDependecyMap(Dependency dependency, Map result) {
- String gav = createGAV(dependency.getArtifact());
- if (gav != null && result.putIfAbsent(gav, dependency) == null) {
- dependency.getChildren().forEach((childDependency) -> {
- buildDependecyMap(childDependency, result);
- });
+ private synchronized void initialize() {
+ if (itemIndex != null) {
+ return;
}
+ startListening();
+ CacheDataBuilder b = new CacheDataBuilder(dependencyResult, report);
+ Map items = b.build();
+ this.itemIndex = b.itemIndex;
+ this.sourceMapping = b.sourceMapping;
+ this.uniqueDependencies = b.uniqueDeps.size();
}
public Set getProblematicFiles() {
if (getAudit().getIsSuccess()) {
return Collections.EMPTY_SET;
}
- Set result = new HashSet<>();
- for (ApplicationDependencyVulnerabilitySummary v: getVulnerabilities()){
- List vulnerabilities = v.getVulnerabilities();
- if (!vulnerabilities.isEmpty()) {
- Dependency dep = getDependencyMap().get(v.getGav());
- if (dep != null) {
- try {
- SourceLocation declarationRange = this.dependencyResult.getDeclarationRange(dep, null);
- if (declarationRange == null) {
- declarationRange = this.dependencyResult.getDeclarationRange(dep, DependencyResult.PART_CONTAINER);
- }
- if(declarationRange != null && declarationRange.getFile() != null) {
- result.add(declarationRange.getFile());
- }
- } catch (IOException ex) {
- // expected, ignore.
- }
- }
+ initialize();
+ return sourceMapping.files;
+ }
+
+ VulnerabilityItem findVulnerability(String gav) {
+ initialize();
+ return itemIndex.get(gav);
+ }
+
+ void refreshSourceMapping(RequestProcessor.Task t) {
+ SourceMapping old;
+ SourceMapping m = new SourceMappingBuilder(dependencyResult, itemIndex).build();
+ Set files = new HashSet<>();
+ synchronized (this) {
+ // should block on this until t[0] is assigned
+ if (pendingRefresh != t) {
+ return;
}
+ old = this.sourceMapping;
+ sourceMapping = m;
}
- return result;
+ if (old != null) {
+ files.addAll(old.files);
+ }
+ Diagnostic.ReporterControl reporter = Diagnostic.findReporterControl(Lookup.getDefault(), project.getProjectDirectory());
+ files.addAll(m.files);
+ reporter.diagnosticChanged(files, null);
}
void refreshDependencies(RequestProcessor.Task t) {
+ boolean model;
+ synchronized (cache) {
+ CacheItem registered = cache.get(project);
+ if (registered != this) {
+ return;
+ }
+ }
+ synchronized (this) {
+ // should block on this until t[0] is assigned
+ if (pendingRefresh != t) {
+ return;
+ }
+ model = modelChanged || itemIndex == null;
+ modelChanged = false;
+ }
+ if (model) {
+ refreshProjectDependencies(t);
+ } else {
+ refreshSourceMapping(t);
+ }
+ }
+
+ void refreshProjectDependencies(RequestProcessor.Task t) {
DependencyResult dr = ProjectDependencies.findDependencies(project, ProjectDependencies.newQuery(Scopes.RUNTIME));
LOG.log(Level.FINER, "{0} - dependencies refreshed", this);
synchronized (this) {
@@ -222,12 +441,13 @@ void refreshDependencies(RequestProcessor.Task t) {
if (pendingRefresh != t) {
return;
}
+ modelChanged = false;
}
CacheItem novy = new CacheItem( project, dr, report);
if (LOG.isLoggable(Level.FINER)) {
LOG.log(Level.FINER, "{0} - trying to replace for {1}", new Object[] { this, novy });
}
- if (replaceCacheItem(this, novy)) {
+ if (replaceCacheItem(project, this, novy)) {
novy.startListening();
Diagnostic.ReporterControl reporter = Diagnostic.findReporterControl(Lookup.getDefault(), project.getProjectDirectory());
Set allFiles = new HashSet<>();
@@ -236,16 +456,31 @@ void refreshDependencies(RequestProcessor.Task t) {
if (LOG.isLoggable(Level.FINER)) {
LOG.log(Level.FINER, "{0} - refreshing files: {1}", new Object[] { this, allFiles });
}
- reporter.diagnosticChanged(novy.getProblematicFiles(), null);
+ reporter.diagnosticChanged(allFiles, null);
}
}
+ /**
+ * True, if the project model changed; false, if only source has changed.
+ */
+ private boolean modelChanged;
+
+ void scheduleSourceRefresh(ChangeEvent e) {
+ // PENDING: enable when Maven and gradle dependency implementation stabilizaes on reading the
+ // actual source.
+ // scheduleRefresh(false);
+ }
+
void scheduleDependencyRefresh(ChangeEvent e) {
+ scheduleRefresh(true);
+ }
+
+ private void scheduleRefresh(boolean modelChanged) {
synchronized (this) {
if (pendingRefresh != null) {
pendingRefresh.cancel();
}
-
+ modelChanged |= modelChanged;
RequestProcessor.Task[] task = new RequestProcessor.Task[1];
if (LOG.isLoggable(Level.FINER)) {
LOG.log(Level.FINER, "{0} - scheduling refresh for {1}", new Object[] { this, project });
@@ -261,15 +496,12 @@ void scheduleDependencyRefresh(ChangeEvent e) {
}
}
- SourceLocation getDependencyRange(Dependency d) throws IOException {
- return getDependencyRange(d, null);
- }
-
void startListening() {
synchronized (this) {
if (depChange == null) {
dependencyResult.addChangeListener(depChange = this::scheduleDependencyRefresh);
LOG.log(Level.FINER, "{0} - start listen for dependencies", this);
+ dependencyResult.addSourceChangeListener(sourceChange = this::scheduleSourceRefresh);
}
}
}
@@ -280,13 +512,38 @@ void stopListening() {
dependencyResult.removeChangeListener(depChange);
// intentionally does not clean depChange, to make a subsequent startListening no-op.
LOG.log(Level.FINER, "{0} - stop listen for dependencies", this);
+ dependencyResult.removeSourceChangeListener(sourceChange);
}
}
}
- SourceLocation getDependencyRange(Dependency d, String part) throws IOException {
- startListening();
- return dependencyResult.getDeclarationRange(d, part);
+ Diagnostic createDiagnostic(Dependency owner, Dependency dependency, List path, Vulnerability vulnerability, SourceLocation declarationRange) {
+ String ownerGav = owner == null ? null : getDependencyId(owner);
+ String message =
+ ownerGav == null ?
+ Bundle.MSG_Diagnostic(
+ formatCvssScore(vulnerability.getCvssV2Score()),
+ formatCvssScore(vulnerability.getCvssV3Score()),
+ getDependencyId(dependency)) :
+ Bundle.MSG_Diagnostic_Included(
+ formatCvssScore(vulnerability.getCvssV2Score()),
+ formatCvssScore(vulnerability.getCvssV3Score()),
+ getDependencyId(dependency),
+ ownerGav);
+ SourceLocation fDeclarationRange = declarationRange;
+ Diagnostic.Builder builder = Diagnostic.Builder.create(() -> fDeclarationRange.getStartOffset(), () -> fDeclarationRange.getEndOffset(), message);
+ builder.setSeverity(Diagnostic.Severity.Warning);
+ try {
+ builder.setCodeDescription(new URL(GOV_DETAIL_URL + vulnerability.getId()));
+ } catch (MalformedURLException ex) {
+ // perhaps should not happen at all
+ LOG.log(Level.INFO, "Could not link to vulnerability: {0}", vulnerability.getId());
+ }
+
+ // TODO: when Diagnostic supports (some) ID, change to report the unique id separately, now it is embedded into the diagnostic code.
+ String pathString = path.stream().map(d -> getDependencyId(d)).collect(Collectors.joining("/"));
+ builder.setCode(vulnerability.getId() + "~~" + pathString);
+ return builder.build();
}
public List getDiagnosticsForFile(FileObject file) {
@@ -297,69 +554,68 @@ public List getDiagnosticsForFile(FileObject file) {
return null;
}
+ initialize();
+
List result = new ArrayList<>();
- for (ApplicationDependencyVulnerabilitySummary v: getVulnerabilities()){
- List vulnerabilities = v.getVulnerabilities();
- if (!vulnerabilities.isEmpty()) {
- startListening();
- Dependency dependency = getDependencyMap().get(v.getGav());
- SourceLocation declarationRange = null;
+ SourceLocation containerLocation = null;
+
+ for (VulnerabilityItem item : this.itemIndex.values()) {
+ boolean unreported = true;
+ Set anchors = new HashSet<>();
+ for (List path : item.paths) {
+ Dependency dependency = path.get(path.size() - 1);
- if (dependency != null) {
- try {
- declarationRange = getDependencyRange(dependency);
- } catch (IOException ex) {
- Exceptions.printStackTrace(ex);
- }
- }
- // display the vulnerabilities that were never mapped on the dependency container's line.
- // also display the vulnerabilities that we KNOW about, but do can not map them back to the project file, i.e.
- // plugin-introduced dependencies (gradle).
- if (declarationRange == null && (dependency != null || !report.mappedVulnerabilities.contains(v.getGav()))) {
- try {
- if (LOG.isLoggable(Level.FINER)) {
- LOG.log(Level.FINER, "{0} getDiagnostics called for {1}", new Object[] { this, file });
- }
+ SourceLocation declarationRange = null;
- declarationRange = getDependencyRange(dependency, DependencyResult.PART_CONTAINER);
- if (declarationRange != null) {
- // discard end location, since it could span a whole section
- declarationRange = new SourceLocation(declarationRange.getFile(),
- declarationRange.getStartOffset(), declarationRange.getStartOffset(), null);
- }
- } catch (IOException ex) {
- // ignore
- }
+ String ownerGav = null;
+ Dependency withSource = sourceMapping.nodesWithSource.get(dependency);
+ if (withSource != null) {
+ declarationRange = sourceMapping.locations.get(withSource); // XXX, neprepisovat nullem
+ }
+ if (declarationRange == null) {
+ // will deal with unampped vulnerabilities later.
+ continue;
+ }
+ Dependency owner = withSource;
+ if (withSource != dependency) {
+ // the dependency result may not report implied sources, so fallback
+ // to the closest parent artifact
+ ownerGav = getDependencyId(withSource);
}
- if (declarationRange != null && declarationRange.hasPosition() && declarationRange.getFile().equals(file)) {
- final SourceLocation fDeclarationRange = declarationRange;
- String ownerGav = null;
- if (fDeclarationRange.getImpliedBy() instanceof Dependency) {
- Dependency owner = (Dependency)fDeclarationRange.getImpliedBy();
- ownerGav = createGAV(owner.getArtifact());
- }
- for(Vulnerability vulnerability: vulnerabilities) {
- String message =
- ownerGav == null ?
- Bundle.MSG_Diagnostic(
- formatCvssScore(vulnerability.getCvssV2Score()),
- formatCvssScore(vulnerability.getCvssV3Score()),
- createGAV(dependency.getArtifact())) :
- Bundle.MSG_Diagnostic_Included(
- formatCvssScore(vulnerability.getCvssV2Score()),
- formatCvssScore(vulnerability.getCvssV3Score()),
- createGAV(dependency.getArtifact()),
- ownerGav);
- Diagnostic.Builder builder = Diagnostic.Builder.create(() -> fDeclarationRange.getStartOffset(), () -> fDeclarationRange.getEndOffset(), message);
- builder.setSeverity(Diagnostic.Severity.Warning).setCode(vulnerability.getId());
+ if (declarationRange.getImpliedBy() instanceof Dependency) {
+ owner = (Dependency)declarationRange.getImpliedBy();
+ ownerGav = getDependencyId(owner);
+ }
+ if (!anchors.add(owner)) {
+ // do not report additional "foo" included from "bar", if already reported.
+ continue;
+ }
+ for (Vulnerability vulnerability : item.reports) {
+ unreported = false;
+ result.add(createDiagnostic(owner, dependency, path, vulnerability, declarationRange));
+ }
+ }
+ if (unreported && !item.paths.isEmpty()) {
+ // if the vulnerability item was matched initially and now it is not found, or mapped to a source,
+ // the user may have removed it from the project without running the analysis again - it should not be reported, it will eventually reappear
+ // after next analysis.
+ // But if it is not in the original map for some reason, report on the container location
+ if (!report.getMappedVulnerabilities().contains(item.gav)) {
+ if (containerLocation == null) {
try {
- builder.setCodeDescription(new URL(GOV_DETAIL_URL + vulnerability.getId()));
- } catch (MalformedURLException ex) {
- // perhaps should not happen at all
- LOG.log(Level.INFO, "Could not link to vulnerability: {0}", vulnerability.getId());
+ containerLocation = dependencyResult.getDeclarationRange(dependencyResult.getRoot(), DependencyResult.PART_CONTAINER);
+ } catch (IOException ex) {
+ LOG.log(Level.WARNING, "Could not load container location", ex);
}
- result.add(builder.build());
+ if (containerLocation == null) {
+ containerLocation = new SourceLocation(project.getProjectDirectory(), 0, 0, null);
+ }
+ }
+ for (Vulnerability vulnerability : item.reports) {
+ List path = item.paths.iterator().next();
+ Dependency dependency = path.get(path.size() - 1);
+ result.add(createDiagnostic(null, dependency, path, vulnerability, containerLocation));
}
}
}
@@ -375,18 +631,25 @@ private String formatCvssScore(Float value) {
}
}
- private static boolean replaceCacheItem(CacheItem old, CacheItem novy) {
+ private static boolean replaceCacheItem(Project p, CacheItem novy) {
+ return replaceCacheItem(p, null, novy);
+ }
+
+ private static boolean replaceCacheItem(Project p, CacheItem old, CacheItem novy) {
+ CacheItem registered;
synchronized (cache) {
- CacheItem registered = cache.get(old.project);
- if (old != null && registered != old) {
- old.stopListening();
- return false;
+ registered = cache.get(p);
+ if (old != null) {
+ if (old != registered) {
+ old.stopListening();
+ return false;
+ }
+ }
+ if (registered != null) {
+ registered.stopListening();
}
cache.put(novy.project, novy);
}
- if (old != null) {
- old.stopListening();
- }
return true;
}
@@ -549,7 +812,7 @@ private AuditResult doFindVulnerability(Project project, String compartmentId, S
if (cacheItem != null) {
synchronized (cache) {
- cache.put(project, cacheItem);
+ replaceCacheItem(project, cacheItem);
}
Set problematicFiles = new HashSet<>();
@@ -572,8 +835,17 @@ private AuditResult doFindVulnerability(Project project, String compartmentId, S
reporter.diagnosticChanged(problematicFiles, null);
List arts = new ArrayList<>();
+ Set gavs = new HashSet<>();
for (ApplicationDependencyVulnerabilitySummary s : cacheItem.getVulnerabilities()) {
- Dependency d = cacheItem.getDependencyMap().get(s.getGav());
+ if (!gavs.add(s.getGav())) {
+ continue;
+ }
+ VulnerabilityItem i = cacheItem.findVulnerability(s.getGav());
+ if (i == null || i.paths.isEmpty()) {
+ continue;
+ }
+ List p = i.paths.iterator().next();
+ Dependency d = p.get(p.size() - 1);
if (d == null) {
continue;
}
@@ -583,7 +855,7 @@ private AuditResult doFindVulnerability(Project project, String compartmentId, S
}
}
AuditResult res = new AuditResult(project, projectDisplayName, cacheItem.report.summary.getId(),
- cacheItem.getDependencyMap().size(), cacheItem.getAudit().getVulnerableArtifactsCount(),
+ cacheItem.uniqueDependencies, cacheItem.getAudit().getVulnerableArtifactsCount(),
arts);
return res;
} else {
@@ -630,9 +902,14 @@ private static String createGAV(ArtifactSpec artifact) {
}
// use a random constant that could be sufficient to hold gav text (micronaut-core has max 86)
StringBuilder sb = new StringBuilder(120);
- sb.append(artifact.getGroupId()).append(':');
- sb.append(artifact.getArtifactId()).append(':');
- sb.append(artifact.getVersionSpec());
+ sb.append(String.format("%s:%s:%s",
+ nonNull(artifact.getGroupId()),
+ nonNull(artifact.getArtifactId()),
+ nonNull(artifact.getVersionSpec()))
+ );
+ if (artifact.getClassifier() != null) {
+ sb.append(':').append(artifact.getClassifier());
+ }
return sb.toString();
}
@@ -691,8 +968,8 @@ private CacheItem fetchVulnerabilityItems(Project project, ApplicationDependency
for (ApplicationDependencyVulnerabilitySummary v : items) {
List vulnerabilities = v.getVulnerabilities();
if (!vulnerabilities.isEmpty()) {
- Dependency dependency = cache.getDependencyMap().get(v.getGav());
- if (dependency != null) {
+ VulnerabilityItem item = cache.findVulnerability(v.getGav());
+ if (item != null && !item.paths.isEmpty()) {
mapped.add(v.getGav());
}
}
diff --git a/enterprise/el.lexer/manifest.mf b/enterprise/el.lexer/manifest.mf
index eeaf40a73e10..a4b61f7b83bd 100644
--- a/enterprise/el.lexer/manifest.mf
+++ b/enterprise/el.lexer/manifest.mf
@@ -1,5 +1,5 @@
OpenIDE-Module: org.netbeans.modules.el.lexer/1
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/el/lexer/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.50
+OpenIDE-Module-Specification-Version: 1.52
OpenIDE-Module-Layer: org/netbeans/modules/el/lexer/resources/layer.xml
diff --git a/enterprise/el.lexer/nbproject/org-netbeans-modules-el-lexer.sig b/enterprise/el.lexer/nbproject/org-netbeans-modules-el-lexer.sig
index 32828340de0d..374a91db9853 100644
--- a/enterprise/el.lexer/nbproject/org-netbeans-modules-el-lexer.sig
+++ b/enterprise/el.lexer/nbproject/org-netbeans-modules-el-lexer.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.49
+#Version 1.50
CLSS public abstract interface java.io.Serializable
diff --git a/enterprise/glassfish.common/manifest.mf b/enterprise/glassfish.common/manifest.mf
index 91e410ed3efa..e09ba0561912 100644
--- a/enterprise/glassfish.common/manifest.mf
+++ b/enterprise/glassfish.common/manifest.mf
@@ -4,6 +4,6 @@ OpenIDE-Module: org.netbeans.modules.glassfish.common/0
OpenIDE-Module-Install: org/netbeans/modules/glassfish/common/Installer.class
OpenIDE-Module-Layer: org/netbeans/modules/glassfish/common/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/common/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.97
+OpenIDE-Module-Specification-Version: 1.99
OpenIDE-Module-Provides: org.netbeans.modules.glassfish.common
diff --git a/enterprise/glassfish.common/nbproject/org-netbeans-modules-glassfish-common.sig b/enterprise/glassfish.common/nbproject/org-netbeans-modules-glassfish-common.sig
index cfd95b62e4e6..c6f29780deb8 100644
--- a/enterprise/glassfish.common/nbproject/org-netbeans-modules-glassfish-common.sig
+++ b/enterprise/glassfish.common/nbproject/org-netbeans-modules-glassfish-common.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.96
+#Version 1.97
CLSS public abstract java.awt.Component
cons protected init()
@@ -1636,6 +1636,8 @@ fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLAS
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_6_2_5
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_0
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_1
+fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_10
+fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_11
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_2
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_3
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_4
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties
index 228f2fd82f40..7087914838b5 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties
@@ -178,6 +178,10 @@ STR_708_SERVER_NAME=GlassFish Server 7.0.8
STR_709_SERVER_NAME=GlassFish Server 7.0.9
STR_7010_SERVER_NAME=GlassFish Server 7.0.10
STR_7011_SERVER_NAME=GlassFish Server 7.0.11
+STR_7012_SERVER_NAME=GlassFish Server 7.0.12
+STR_7013_SERVER_NAME=GlassFish Server 7.0.13
+STR_7014_SERVER_NAME=GlassFish Server 7.0.14
+STR_800_SERVER_NAME=GlassFish Server 8.0.0
# CommonServerSupport.java
MSG_FLAKEY_NETWORK=Network communication problem Could not establish \
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/CreateDomain.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/CreateDomain.java
index 515819477762..b4fe2daa3885 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/CreateDomain.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/CreateDomain.java
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.nio.file.Files;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -272,7 +273,7 @@ private static File createTempPasswordFile(String password, String masterPasswor
PrintWriter p = null;
File retVal = null;
try {
- retVal = File.createTempFile("admin", null);//NOI18N
+ retVal = Files.createTempFile("admin", null).toFile();//NOI18N
retVal.deleteOnExit();
output = new FileOutputStream(retVal);
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstance.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstance.java
index a1a4df3d46b3..cbf856d708ff 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstance.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstance.java
@@ -1648,7 +1648,7 @@ private void updateFactories() {
}
if (!proxies.isEmpty()) {
- full = new ProxyLookup(proxies.toArray(new Lookup[proxies.size()]));
+ full = new ProxyLookup(proxies.toArray(Lookup[]::new));
}
}
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java
index bca68933b0d9..081be2bca9f8 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java
@@ -69,6 +69,7 @@ public final class GlassfishInstanceProvider implements ServerInstanceProvider,
public static final String JAKARTAEE9_DEPLOYER_FRAGMENT = "deployer:gfv6ee9";
public static final String JAKARTAEE91_DEPLOYER_FRAGMENT = "deployer:gfv610ee9";
public static final String JAKARTAEE10_DEPLOYER_FRAGMENT = "deployer:gfv700ee10";
+ public static final String JAKARTAEE11_DEPLOYER_FRAGMENT = "deployer:gfv800ee11";
public static final String EE6WC_DEPLOYER_FRAGMENT = "deployer:gfv3ee6wc"; // NOI18N
public static final String PRELUDE_DEPLOYER_FRAGMENT = "deployer:gfv3"; // NOI18N
private static String EE6_INSTANCES_PATH = "/GlassFishEE6/Instances"; // NOI18N
@@ -78,6 +79,7 @@ public final class GlassfishInstanceProvider implements ServerInstanceProvider,
private static String JAKARTAEE9_INSTANCES_PATH = "/GlassFishJakartaEE9/Instances"; // NOI18N
private static String JAKARTAEE91_INSTANCES_PATH = "/GlassFishJakartaEE91/Instances"; // NOI18N
private static String JAKARTAEE10_INSTANCES_PATH = "/GlassFishJakartaEE10/Instances"; // NOI18N
+ private static String JAKARTAEE11_INSTANCES_PATH = "/GlassFishJakartaEE11/Instances"; // NOI18N
private static String EE6WC_INSTANCES_PATH = "/GlassFishEE6WC/Instances"; // NOI18N
public static String PRELUDE_DEFAULT_NAME = "GlassFish_v3_Prelude"; //NOI18N
@@ -102,11 +104,13 @@ public static GlassfishInstanceProvider getProvider() {
new String[]{EE6_DEPLOYER_FRAGMENT, EE6WC_DEPLOYER_FRAGMENT,
EE7_DEPLOYER_FRAGMENT, EE8_DEPLOYER_FRAGMENT,
JAKARTAEE8_DEPLOYER_FRAGMENT, JAKARTAEE9_DEPLOYER_FRAGMENT,
- JAKARTAEE91_DEPLOYER_FRAGMENT, JAKARTAEE10_DEPLOYER_FRAGMENT},
+ JAKARTAEE91_DEPLOYER_FRAGMENT, JAKARTAEE10_DEPLOYER_FRAGMENT,
+ JAKARTAEE11_DEPLOYER_FRAGMENT},
new String[]{EE6_INSTANCES_PATH, EE6WC_INSTANCES_PATH,
EE7_INSTANCES_PATH, EE8_INSTANCES_PATH,
JAKARTAEE8_INSTANCES_PATH, JAKARTAEE9_INSTANCES_PATH,
- JAKARTAEE91_INSTANCES_PATH, JAKARTAEE10_INSTANCES_PATH},
+ JAKARTAEE91_INSTANCES_PATH, JAKARTAEE10_INSTANCES_PATH,
+ JAKARTAEE11_INSTANCES_PATH},
null,
true,
new String[]{"--nopassword"}, // NOI18N
@@ -535,7 +539,7 @@ String[] getNoPasswordCreatDomainCommand(String startScript, String jarLocation,
retVal.addAll(noPasswordOptions);
}
retVal.add(domain);
- return retVal.toArray(new String[retVal.size()]);
+ return retVal.toArray(String[]::new);
}
public CommandFactory getCommandFactory() {
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
index ac283ad3d5a6..5737b8d993c2 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
@@ -411,6 +411,50 @@ public enum ServerDetails {
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.11/glassfish-7.0.11.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.11/glassfish-7.0.11.zip", // NOI18N
"http://www.eclipse.org/legal/epl-2.0" //NOI18N
+ ),
+
+ /**
+ * details for an instance of GlassFish Server 7.0.12
+ */
+ GLASSFISH_SERVER_7_0_12(NbBundle.getMessage(ServerDetails.class, "STR_7012_SERVER_NAME", new Object[]{}), // NOI18N
+ GlassfishInstanceProvider.JAKARTAEE10_DEPLOYER_FRAGMENT,
+ GlassFishVersion.GF_7_0_12,
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.12/glassfish-7.0.12.zip", // NOI18N
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.12/glassfish-7.0.12.zip", // NOI18N
+ "http://www.eclipse.org/legal/epl-2.0" //NOI18N
+ ),
+
+ /**
+ * details for an instance of GlassFish Server 7.0.13
+ */
+ GLASSFISH_SERVER_7_0_13(NbBundle.getMessage(ServerDetails.class, "STR_7013_SERVER_NAME", new Object[]{}), // NOI18N
+ GlassfishInstanceProvider.JAKARTAEE10_DEPLOYER_FRAGMENT,
+ GlassFishVersion.GF_7_0_13,
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.13/glassfish-7.0.13.zip", // NOI18N
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.13/glassfish-7.0.13.zip", // NOI18N
+ "http://www.eclipse.org/legal/epl-2.0" //NOI18N
+ ),
+
+ /**
+ * details for an instance of GlassFish Server 7.0.14
+ */
+ GLASSFISH_SERVER_7_0_14(NbBundle.getMessage(ServerDetails.class, "STR_7014_SERVER_NAME", new Object[]{}), // NOI18N
+ GlassfishInstanceProvider.JAKARTAEE10_DEPLOYER_FRAGMENT,
+ GlassFishVersion.GF_7_0_14,
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.14/glassfish-7.0.14.zip", // NOI18N
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.14/glassfish-7.0.14.zip", // NOI18N
+ "http://www.eclipse.org/legal/epl-2.0" //NOI18N
+ ),
+
+ /**
+ * details for an instance of GlassFish Server 8.0.0
+ */
+ GLASSFISH_SERVER_8_0_0(NbBundle.getMessage(ServerDetails.class, "STR_800_SERVER_NAME", new Object[]{}), // NOI18N
+ GlassfishInstanceProvider.JAKARTAEE11_DEPLOYER_FRAGMENT,
+ GlassFishVersion.GF_8_0_0,
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M4/glassfish-8.0.0-M4.zip", // NOI18N
+ "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M4/glassfish-8.0.0-M4.zip", // NOI18N
+ "http://www.eclipse.org/legal/epl-2.0" //NOI18N
);
/**
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/StartTask.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/StartTask.java
index 01b22287ec63..2a12787c6819 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/StartTask.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/StartTask.java
@@ -168,7 +168,7 @@ public void operationStateChanged(TaskState newState,
}
}
});
- this.stateListener = listeners.toArray(new TaskStateListener[listeners.size()]);
+ this.stateListener = listeners.toArray(TaskStateListener[]::new);
this.support = support;
this.recognizers = recognizers;
this.jvmArgs = (jvmArgs != null) ? Arrays.asList(removeEscapes(jvmArgs)) : null;
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/nodes/Hk2ItemNode.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/nodes/Hk2ItemNode.java
index be7e66c539b8..c16318f595dc 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/nodes/Hk2ItemNode.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/nodes/Hk2ItemNode.java
@@ -303,7 +303,7 @@ public Action[] getActions(boolean context) {
if (decorator.canEditDetails()) {
actions.add(SystemAction.get(EditDetailsAction.class));
}
- return actions.toArray(new Action[actions.size()]);
+ return actions.toArray(Action[]::new);
}
////////////////////////////////////////////////////////////////////////////
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java
index bc1cc25d9cf1..5c906f0f9a8e 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java
@@ -84,7 +84,10 @@ private static int autoregisterGlassFishInstance(String clusterDirValue, String
String deployer = "deployer:gfv3ee6";
String defaultDisplayNamePrefix = "GlassFish Server ";
GlassFishVersion version = ServerUtils.getServerVersion(glassfishRoot);
- if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
+ if (GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) {
+ deployer = "deployer:gfv800ee11";
+ config = "GlassFishJakartaEE11/Instances";
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
deployer = "deployer:gfv700ee10";
config = "GlassFishJakartaEE10/Instances";
} else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ui/BasePanel.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ui/BasePanel.java
index a6ff97acba81..1d3599199fb3 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ui/BasePanel.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ui/BasePanel.java
@@ -231,7 +231,7 @@ public void run() {
}
}
if (l.size() > 0) {
- table.setModel(new AttributedPropertyTableModel(l.toArray(new String[l.size()][]), specComp, pushPrefix));
+ table.setModel(new AttributedPropertyTableModel(l.toArray(String[][]::new), specComp, pushPrefix));
} else {
// this data is from a post beta build...
pattern = Pattern.compile(".*\\." + name + "\\." + specComp[0] + "\\..*");
@@ -252,7 +252,7 @@ public void run() {
}
}
if (l.size() > 0) {
- table.setModel(new NameValueTableModel(l.toArray(new String[l.size()][]), specComp, pushPrefix));
+ table.setModel(new NameValueTableModel(l.toArray(String[][]::new), specComp, pushPrefix));
}
}
}
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties
index 1c5d8de127bc..bb5d8172963b 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties
@@ -179,6 +179,12 @@ STR_708_SERVER_NAME=GlassFish Server 7.0.8
STR_709_SERVER_NAME=GlassFish Server 7.0.9
STR_7010_SERVER_NAME=GlassFish Server 7.0.10
STR_7011_SERVER_NAME=GlassFish Server 7.0.11
+STR_7012_SERVER_NAME=GlassFish Server 7.0.12
+STR_7013_SERVER_NAME=GlassFish Server 7.0.13
+STR_7014_SERVER_NAME=GlassFish Server 7.0.14
+
+STR_V8_FAMILY_NAME=GlassFish Server
+STR_800_SERVER_NAME=GlassFish Server 8.0.0
LBL_SELECT_BITS=Select
LBL_ChooseOne=Choose server to download:
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java
index 9a433efcccfe..e095842f864a 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java
@@ -75,7 +75,14 @@ public static GlassfishWizardProvider createJakartaEe91() {
public static GlassfishWizardProvider createJakartaEe10() {
return new GlassfishWizardProvider(
org.openide.util.NbBundle.getMessage(GlassfishWizardProvider.class,
- "STR_V7_FAMILY_NAME", new Object[]{}) // NOI18N
+ "STR_V7_FAMILY_NAME", new Object[]{}) // NOI18N
+ );
+ }
+
+ public static GlassfishWizardProvider createJakartaEe11() {
+ return new GlassfishWizardProvider(
+ org.openide.util.NbBundle.getMessage(GlassfishWizardProvider.class,
+ "STR_V8_FAMILY_NAME", new Object[]{}) // NOI18N
);
}
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java
index 3a17762b28e7..e81b108df9f2 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java
@@ -112,6 +112,12 @@ public static ServerUtilities getJakartaEe10Utilities() {
return null == gip ? null : new ServerUtilities(gip,
GlassfishWizardProvider.createJakartaEe10());
}
+
+ public static ServerUtilities getJakartaEe11Utilities() {
+ GlassfishInstanceProvider gip = GlassfishInstanceProvider.getProvider();
+ return null == gip ? null : new ServerUtilities(gip,
+ GlassfishWizardProvider.createJakartaEe11());
+ }
// public static ServerUtilities getEe6WCUtilities() {
// GlassfishInstanceProvider gip = GlassfishInstanceProvider.getProvider();
diff --git a/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java b/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java
index 0be18423d0c4..37e1a77d83ad 100644
--- a/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java
+++ b/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java
@@ -28,6 +28,38 @@
*/
public class AutomaticRegistrationTest {
+ @Test
+ public void testRegistrationGF8() {
+ GlassFishVersion version = GlassFishVersion.GF_8_0_0;
+ if (GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) {
+ assertTrue("Success!", true);
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6)) {
+ fail("GF_6");
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) {
+ fail("GF_5_1_0");
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5)) {
+ fail("GF_5");
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_3_1)) {
+ fail("GF_3_1");
+ }
+ }
+
+ @Test
+ public void testRegistrationGF7() {
+ GlassFishVersion version = GlassFishVersion.GF_7_0_11;
+ if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
+ assertTrue("Success!", true);
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6)) {
+ fail("GF_6");
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) {
+ fail("GF_5_1_0");
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5)) {
+ fail("GF_5");
+ } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_3_1)) {
+ fail("GF_3_1");
+ }
+ }
+
@Test
public void testRegistrationGF625() {
GlassFishVersion version = GlassFishVersion.GF_6_2_5;
diff --git a/enterprise/glassfish.eecommon/nbproject/org-netbeans-modules-glassfish-eecommon.sig b/enterprise/glassfish.eecommon/nbproject/org-netbeans-modules-glassfish-eecommon.sig
index 3f8581542beb..363d7ed1e7aa 100644
--- a/enterprise/glassfish.eecommon/nbproject/org-netbeans-modules-glassfish-eecommon.sig
+++ b/enterprise/glassfish.eecommon/nbproject/org-netbeans-modules-glassfish-eecommon.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.59.0
+#Version 1.60.0
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/enterprise/glassfish.eecommon/nbproject/project.properties b/enterprise/glassfish.eecommon/nbproject/project.properties
index a9e548516f74..85211376ab37 100644
--- a/enterprise/glassfish.eecommon/nbproject/project.properties
+++ b/enterprise/glassfish.eecommon/nbproject/project.properties
@@ -18,7 +18,7 @@ is.autoload=true
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
-spec.version.base=1.60.0
+spec.version.base=1.62.0
test.config.stableBTD.includes=**/*Test.class
test.config.stableBTD.excludes=\
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java
index 7d00be2af894..ba9ff195d427 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/DomainEditor.java
@@ -242,7 +242,7 @@ public String[] getHttpProxyOptions(){
Document domainDoc = getDomainDocument();
NodeList javaConfigNodeList = domainDoc.getElementsByTagName("java-config");
if (javaConfigNodeList == null || javaConfigNodeList.getLength() == 0) {
- return httpProxyOptions.toArray(new String[httpProxyOptions.size()]);
+ return httpProxyOptions.toArray(String[]::new);
}
NodeList jvmOptionNodeList = domainDoc.getElementsByTagName(CONST_JVM_OPTIONS);
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java
index cb66083ad4f3..eed7b79be86c 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java
@@ -81,6 +81,13 @@ public final class AppClientVersion extends J2EEBaseVersion {
"10.0", 10000, // NOI18N
"10.0", 10000 // NOI18N
);
+
+ /** Represents application-client version 11.0
+ */
+ public static final AppClientVersion APP_CLIENT_11_0 = new AppClientVersion(
+ "11.0", 11000, // NOI18N
+ "11.0", 11000 // NOI18N
+ );
/** -----------------------------------------------------------------------
* Implementation
*/
@@ -122,6 +129,8 @@ public static AppClientVersion getAppClientVersion(String version) {
result = APP_CLIENT_9_0;
} else if(APP_CLIENT_10_0.toString().equals(version)) {
result = APP_CLIENT_10_0;
+ } else if(APP_CLIENT_11_0.toString().equals(version)) {
+ result = APP_CLIENT_11_0;
}
return result;
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java
index 382dc79a118d..61a37d8f3725 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java
@@ -81,6 +81,13 @@ public final class ApplicationVersion extends J2EEBaseVersion {
"10.0", 10000, // NOI18N
"10.0", 10000 // NOI18N
);
+
+ /** Represents application version 11.0
+ */
+ public static final ApplicationVersion APPLICATION_11_0 = new ApplicationVersion(
+ "11.0", 11000, // NOI18N
+ "11.0", 11000 // NOI18N
+ );
/** -----------------------------------------------------------------------
* Implementation
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java
index 0f279f1c5f99..53a8d2676fd9 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java
@@ -81,6 +81,14 @@ public final class EjbJarVersion extends J2EEBaseVersion {
"4.0", 4000, // NOI18N
"9.0", 9000 // NOI18N
);
+
+ /**
+ * Represents ejbjar version 4.0.1
+ */
+ public static final EjbJarVersion EJBJAR_4_0_1 = new EjbJarVersion(
+ "4.0.1", 4010, // NOI18N
+ "10.0", 10000 // NOI18N
+ );
/** -----------------------------------------------------------------------
* Implementation
*/
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java
index 9208f7eb3bfb..6a5230180e5b 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java
@@ -70,7 +70,7 @@
import org.openide.util.RequestProcessor;
/**
- * Basic Java EE server configuration API support for V2, V3 and V4 plugins.
+ * Basic Java/Jakarta EE server configuration API support for V2-V8 plugins.
*
* @author Peter Williams, Tomas Kraus
*/
@@ -85,7 +85,7 @@ public abstract class GlassfishConfiguration implements
////////////////////////////////////////////////////////////////////////////
/** GlassFish Java EE common module Logger. */
- private static final Logger LOGGER = Logger.getLogger("glassfish-eecommon");
+ private static final Logger LOGGER = Logger.getLogger(GlassfishConfiguration.class.getName());
/** GlassFish resource file suffix is {@code .xml}. */
private static final String RESOURCE_FILES_SUFFIX = ".xml";
@@ -136,19 +136,7 @@ private static int[] versionToResourceFilesIndexes(
if (version == null) {
return new int[]{0,1};
}
- // glassfish-resources.xml for v7
- if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
- return new int[]{0};
- }
- // glassfish-resources.xml for v6
- if (GlassFishVersion.ge(version, GlassFishVersion.GF_6) || GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
- return new int[]{0};
- }
- // glassfish-resources.xml for v5
- if (GlassFishVersion.ge(version, GlassFishVersion.GF_5) || GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) {
- return new int[]{0};
- }
- // glassfish-resources.xml for v4
+ // glassfish-resources.xml for v4 and onwards
if (GlassFishVersion.ge(version, GlassFishVersion.GF_4)) {
return new int[]{0};
}
@@ -515,7 +503,8 @@ void internalSetAppServerVersion(ASDDVersion asVersion) {
"gfv510ee8",
"gfv6ee9",
"gfv610ee9",
- "gfv700ee10"
+ "gfv700ee10",
+ "gfv800ee11"
};
protected ASDDVersion getTargetAppServerVersion() {
@@ -567,7 +556,13 @@ static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolde
boolean geGF5 = false;
boolean geGF6 = false;
boolean geGF7 = false;
+ boolean geGF8 = false;
if(schemaFolder.exists()){
+ if(new File(schemaFolder, "jakartaee11.xsd").exists() &&
+ new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){
+ geGF8 = true;
+ return ASDDVersion.GLASSFISH_8;
+ }
if(new File(schemaFolder, "jakartaee10.xsd").exists() &&
new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){
geGF7 = true;
@@ -584,7 +579,7 @@ static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolde
return ASDDVersion.GLASSFISH_5_1;
}
}
- if (!geGF5 && !geGF6 && !geGF7 && dtdFolder.exists()) {
+ if (!geGF5 && !geGF6 && !geGF7 && !geGF8 && dtdFolder.exists()) {
if (new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()) {
return ASDDVersion.SUN_APPSERVER_10_1;
}
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java
index 26855cab1b32..dcd0dd32683b 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java
@@ -202,6 +202,12 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa
result = ASDDVersion.SUN_APPSERVER_10_0;
} else if (ServletVersion.SERVLET_4_0.equals(servletVersion)) {
result = ASDDVersion.GLASSFISH_5_1;
+ } else if (ServletVersion.SERVLET_5_0.equals(servletVersion)) {
+ result = ASDDVersion.GLASSFISH_6;
+ } else if (ServletVersion.SERVLET_6_0.equals(servletVersion)) {
+ result = ASDDVersion.GLASSFISH_7;
+ } else if (ServletVersion.SERVLET_6_1.equals(servletVersion)) {
+ result = ASDDVersion.GLASSFISH_8;
}
return result;
}
@@ -236,6 +242,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa
result = ASDDVersion.GLASSFISH_6;
} else if (ServletVersion.SERVLET_6_0.equals(servletVersion)) {
result = ASDDVersion.GLASSFISH_7;
+ } else if (ServletVersion.SERVLET_6_1.equals(servletVersion)) {
+ result = ASDDVersion.GLASSFISH_8;
}
return result;
}
@@ -275,6 +283,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa
result = ASDDVersion.GLASSFISH_5_1;
} else if (EjbJarVersion.EJBJAR_4_0.equals(ejbJarVersion)) {
result = ASDDVersion.GLASSFISH_7;
+ } else if (EjbJarVersion.EJBJAR_4_0_1.equals(ejbJarVersion)) {
+ result = ASDDVersion.GLASSFISH_8;
}
return result;
}
@@ -314,6 +324,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa
result = ASDDVersion.GLASSFISH_6;
} else if (ApplicationVersion.APPLICATION_10_0.equals(applicationVersion)) {
result = ASDDVersion.GLASSFISH_7;
+ } else if (ApplicationVersion.APPLICATION_11_0.equals(applicationVersion)) {
+ result = ASDDVersion.GLASSFISH_8;
}
return result;
}
@@ -353,6 +365,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa
result = ASDDVersion.GLASSFISH_6;
} else if (AppClientVersion.APP_CLIENT_10_0.equals(appClientVersion)) {
result = ASDDVersion.GLASSFISH_7;
+ } else if (AppClientVersion.APP_CLIENT_11_0.equals(appClientVersion)) {
+ result = ASDDVersion.GLASSFISH_8;
}
return result;
}
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java
index e9b3ce87c064..e4db268c9fdf 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java
@@ -81,6 +81,13 @@ public final class ServletVersion extends J2EEBaseVersion {
"6.0", 6000, // NOI18N
"10.0", 10000 // NOI18N
);
+
+ /** Represents servlet version 6.1
+ */
+ public static final ServletVersion SERVLET_6_1 = new ServletVersion(
+ "6.1", 6100, // NOI18N
+ "11.0", 11000 // NOI18N
+ );
/** -----------------------------------------------------------------------
* Implementation
diff --git a/enterprise/glassfish.javaee/manifest.mf b/enterprise/glassfish.javaee/manifest.mf
index 04d77feac547..7ef8943b0656 100644
--- a/enterprise/glassfish.javaee/manifest.mf
+++ b/enterprise/glassfish.javaee/manifest.mf
@@ -4,5 +4,5 @@ OpenIDE-Module: org.netbeans.modules.glassfish.javaee/0
OpenIDE-Module-Layer: org/netbeans/modules/glassfish/javaee/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/javaee/Bundle.properties
OpenIDE-Module-Provides: org.netbeans.modules.serverplugins.javaee
-OpenIDE-Module-Specification-Version: 1.64
+OpenIDE-Module-Specification-Version: 1.66
diff --git a/enterprise/glassfish.javaee/nbproject/org-netbeans-modules-glassfish-javaee.sig b/enterprise/glassfish.javaee/nbproject/org-netbeans-modules-glassfish-javaee.sig
index c47fbfb241fe..5e4f6fb5c573 100644
--- a/enterprise/glassfish.javaee/nbproject/org-netbeans-modules-glassfish-javaee.sig
+++ b/enterprise/glassfish.javaee/nbproject/org-netbeans-modules-glassfish-javaee.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.63
+#Version 1.64
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java
index 05b729f23c50..0e4c91c26bd7 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java
@@ -107,7 +107,10 @@ public ModuleConfiguration create(final @NonNull J2eeModule module,
? instance.getVersion() : null;
try {
Hk2DeploymentManager evaluatedDm = null;
- if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
+ if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) {
+ evaluatedDm = (Hk2DeploymentManager) Hk2DeploymentFactory.createJakartaEe11()
+ .getDisconnectedDeploymentManager(instanceUrl);
+ } else if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
evaluatedDm = (Hk2DeploymentManager) Hk2DeploymentFactory.createJakartaEe10()
.getDisconnectedDeploymentManager(instanceUrl);
} else if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
@@ -136,6 +139,10 @@ public ModuleConfiguration create(final @NonNull J2eeModule module,
? hk2dm
: evaluatedDm;
if (version != null
+ && GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) {
+ retVal = new ModuleConfigurationImpl(
+ module, new Hk2Configuration(module, version), dm);
+ } else if (version != null
&& GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
retVal = new ModuleConfigurationImpl(
module, new Hk2Configuration(module, version), dm);
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties
index 0733a43ca8cd..bbb293440dce 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties
@@ -50,6 +50,7 @@ LBL_V6ServerLibraries=GlassFish Server 6 Libraries
LBL_V610ServerLibraries=GlassFish Server 6.1 Libraries
LBL_V620ServerLibraries=GlassFish Server 6.2 Libraries
LBL_V700ServerLibraries=GlassFish Server 7.0.0 Libraries
+LBL_V800ServerLibraries=GlassFish Server 8.0.0 Libraries
MSG_V1ServerPlatform=Unsupported GlassFish Server 1 Platform
MSG_V2ServerPlatform=Unsupported GlassFish Server 2 Platform
@@ -61,6 +62,7 @@ MSG_V6ServerPlatform=GlassFish Server 6 Platform
MSG_V610ServerPlatform=GlassFish Server 6.1 Platform
MSG_V620ServerPlatform=GlassFish Server 6.2 Platform
MSG_V700ServerPlatform=GlassFish Server 7.0.0 Platform
+MSG_V800ServerPlatform=GlassFish Server 8.0.0 Platform
LBL_V3RunTimeDDCatalog=GlassFish Server 3 Catalog
DESC_V3RunTimeDDCatalog=List of all the runtime descriptors DTDs for GlassFish Server 3
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java
index ccb48cfe06b2..1b1b6e5214d2 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java
@@ -42,6 +42,7 @@ public class Hk2DeploymentFactory implements DeploymentFactory {
private static Hk2DeploymentFactory jakartaee9Instance;
private static Hk2DeploymentFactory jakartaee91Instance;
private static Hk2DeploymentFactory jakartaee10Instance;
+ private static Hk2DeploymentFactory jakartaee11Instance;
private String[] uriFragments;
private String version;
private String displayName;
@@ -168,6 +169,22 @@ public static synchronized DeploymentFactory createJakartaEe10() {
}
return jakartaee10Instance;
}
+
+ /**
+ *
+ * @return
+ */
+ public static synchronized DeploymentFactory createJakartaEe11() {
+ // FIXME -- these strings should come from some constant place
+ if (jakartaee11Instance == null) {
+ ServerUtilities tmp = ServerUtilities.getJakartaEe11Utilities();
+ jakartaee11Instance = new Hk2DeploymentFactory(new String[]{"deployer:gfv800ee11:", "deployer:gfv8"}, "0.9", // NOI18N
+ NbBundle.getMessage(Hk2DeploymentFactory.class, "TXT_FactoryDisplayName")); // NOI18N
+ DeploymentFactoryManager.getInstance().registerDeploymentFactory(jakartaee11Instance);
+ jakartaee11Instance.setServerUtilities(tmp);
+ }
+ return jakartaee11Instance;
+ }
/**
*
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentManager.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentManager.java
index e95b669d97d6..a77d6c3568ee 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentManager.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentManager.java
@@ -426,7 +426,7 @@ public boolean isLocaleSupported(java.util.Locale locale) {
}
}
}
- return moduleList.size() > 0 ? moduleList.toArray(new TargetModuleID[moduleList.size()]) :
+ return moduleList.size() > 0 ? moduleList.toArray(TargetModuleID[]::new) :
new TargetModuleID[0];
}
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java
index 8034e694a478..7f40ea6230e8 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java
@@ -67,6 +67,9 @@ public class Hk2JavaEEPlatformFactory extends J2eePlatformFactory {
/** GlassFish V7 JakartaEE platform lookup key. */
private static final String V7_LOOKUP_KEY = "J2EE/DeploymentPlugins/gfv700ee10/Lookup";
+
+ /** GlassFish V8 JakartaEE platform lookup key. */
+ private static final String V8_LOOKUP_KEY = "J2EE/DeploymentPlugins/gfv800ee11/Lookup";
/** GlassFish JavaEE platform factory singleton object. */
private static volatile Hk2JavaEEPlatformFactory instance;
@@ -94,15 +97,18 @@ public static Hk2JavaEEPlatformFactory getFactory() {
}
/**
- * Get GlassFish JavaEE platform name from bundle properties for given
- * GlassFish server version.
+ * Get GlassFish Java/Jakarta EE platform name from bundle properties
+ * for given GlassFish server version.
*
* @param version GlassFish server version used to pick up display name.
* @return GlassFish JavaEE platform name related to given server version.
*/
private static String getDisplayName(final GlassFishVersion version) {
final int ord = version.ordinal();
- if(ord >= GlassFishVersion.GF_7_0_0.ordinal()) {
+ if(ord >= GlassFishVersion.GF_8_0_0.ordinal()) {
+ return NbBundle.getMessage(
+ Hk2JavaEEPlatformFactory.class, "MSG_V800ServerPlatform");
+ } else if(ord >= GlassFishVersion.GF_7_0_0.ordinal()) {
return NbBundle.getMessage(
Hk2JavaEEPlatformFactory.class, "MSG_V700ServerPlatform");
} else if(ord >= GlassFishVersion.GF_6_2_0.ordinal()) {
@@ -137,15 +143,18 @@ private static String getDisplayName(final GlassFishVersion version) {
}
/**
- * Get GlassFish JavaEE library name from bundle properties for given
- * GlassFish server version.
+ * Get GlassFish Java/Jakarta EE library name from bundle properties
+ * for given GlassFish server version.
*
* @param version GlassFish server version used to pick up display name.
* @return GlassFish JavaEE library name related to given server version.
*/
private static String getLibraryName(final GlassFishVersion version) {
final int ord = version.ordinal();
- if (ord >= GlassFishVersion.GF_7_0_0.ordinal()) {
+ if (ord >= GlassFishVersion.GF_8_0_0.ordinal()) {
+ return NbBundle.getMessage(
+ Hk2JavaEEPlatformFactory.class, "LBL_V800ServerLibraries");
+ } else if (ord >= GlassFishVersion.GF_7_0_0.ordinal()) {
return NbBundle.getMessage(
Hk2JavaEEPlatformFactory.class, "LBL_V700ServerLibraries");
} else if (ord >= GlassFishVersion.GF_6_2_0.ordinal()) {
@@ -180,7 +189,7 @@ private static String getLibraryName(final GlassFishVersion version) {
}
/**
- * Get GlassFish JavaEE platform lookup key for given GlassFish
+ * Get GlassFish Java/Jakarta EE platform lookup key for given GlassFish
* server version.
*
* @param version GlassFish server version used to pick up lookup key.
@@ -188,7 +197,9 @@ private static String getLibraryName(final GlassFishVersion version) {
*/
private static String getLookupKey(final GlassFishVersion version) {
final int ord = version.ordinal();
- if (ord >= GlassFishVersion.GF_7_0_0.ordinal()){
+ if (ord >= GlassFishVersion.GF_8_0_0.ordinal()){
+ return V8_LOOKUP_KEY;
+ } else if (ord >= GlassFishVersion.GF_7_0_0.ordinal()){
return V7_LOOKUP_KEY;
} else if (ord >= GlassFishVersion.GF_6_1_0.ordinal()){
return V610_LOOKUP_KEY;
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java
index 015988fe6dae..8004397d7096 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java
@@ -210,6 +210,10 @@ public static Profile[] nbJavaEEProfiles(
break;
case v10_0_0: profiles[index++] = Profile.JAKARTA_EE_10_FULL;
break;
+ case v11_0_0_web: profiles[index++] = Profile.JAKARTA_EE_11_WEB;
+ break;
+ case v11_0_0: profiles[index++] = Profile.JAKARTA_EE_11_FULL;
+ break;
}
} else {
profiles = new Profile[0];
@@ -509,7 +513,7 @@ public File[] getToolClasspathEntries(String toolName) {
cPath.add(f);
}
}
- return cPath.toArray(new File[cPath.size()]);
+ return cPath.toArray(File[]::new);
}
if (TOOL_WSCOMPILE.equals(toolName)) {
@@ -522,7 +526,7 @@ public File[] getToolClasspathEntries(String toolName) {
cPath.add(f);
}
}
- return cPath.toArray(new File[cPath.size()]);
+ return cPath.toArray(File[]::new);
}
File domainDir;
@@ -1026,7 +1030,7 @@ private boolean addJars(final Project project, Collection jars ){
else {
classPathType = ClassPath.COMPILE;
}
- ProjectClassPathModifier.addRoots(urls.toArray( new URL[ urls.size()]),
+ ProjectClassPathModifier.addRoots(urls.toArray(URL[]::new),
sourceRoot, classPathType );
}
catch (UnsupportedOperationException | IOException ex) {
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxRpcStack.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxRpcStack.java
index 69d5a1bf29e0..4cab01a93c21 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxRpcStack.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxRpcStack.java
@@ -107,7 +107,7 @@ public URL[] getLibraries() {
}
}
}
- return cPath.toArray(new URL[cPath.size()]);
+ return cPath.toArray(URL[]::new);
}
}
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java
index f5f2048d4626..b07ff5ac8c7b 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java
@@ -73,33 +73,21 @@ public JaxWs get() {
@Override
public WSStackVersion getVersion() {
Set supportedProfiles = platform.getSupportedProfiles();
- if (supportedProfiles.contains(Profile.JAKARTA_EE_10_FULL)
- || supportedProfiles.contains(Profile.JAKARTA_EE_10_WEB)
- || supportedProfiles.contains(Profile.JAKARTA_EE_9_1_FULL)
- || supportedProfiles.contains(Profile.JAKARTA_EE_9_1_WEB)
- || supportedProfiles.contains(Profile.JAKARTA_EE_9_FULL)
- || supportedProfiles.contains(Profile.JAKARTA_EE_9_WEB)
- || supportedProfiles.contains(Profile.JAKARTA_EE_8_FULL)
- || supportedProfiles.contains(Profile.JAKARTA_EE_8_WEB)
- || supportedProfiles.contains(Profile.JAVA_EE_8_FULL)
- || supportedProfiles.contains(Profile.JAVA_EE_8_WEB)
- || supportedProfiles.contains(Profile.JAVA_EE_7_FULL)
- || supportedProfiles.contains(Profile.JAVA_EE_7_WEB)
- || supportedProfiles.contains(Profile.JAVA_EE_6_FULL)
- || supportedProfiles.contains(Profile.JAVA_EE_6_WEB)) {
- // gfv3ee6 GF id
- if (isMetroInstalled()) {
- return WSStackVersion.valueOf(2, 2, 0, 0);
- }
- return WSStackVersion.valueOf(2, 1, 4, 1);
- }
- else {
- // gfv3 GF id
- if (isMetroInstalled()) {
+
+ for (Profile profile : supportedProfiles) {
+ if (profile.isAtLeast(Profile.JAVA_EE_6_WEB)) {
+ // gfv3ee6 GF id
+ if (isMetroInstalled()) {
+ return WSStackVersion.valueOf(2, 2, 0, 0);
+ }
return WSStackVersion.valueOf(2, 1, 4, 1);
}
- return WSStackVersion.valueOf(2, 1, 3, 0);
}
+ // gfv3 GF id
+ if (isMetroInstalled()) {
+ return WSStackVersion.valueOf(2, 1, 4, 1);
+ }
+ return WSStackVersion.valueOf(2, 1, 3, 0);
}
@Override
@@ -193,7 +181,7 @@ public URL[] getLibraries() {
}
}
}
- return cPath.toArray(new URL[cPath.size()]);
+ return cPath.toArray(URL[]::new);
}
}
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java
index cf0e55097954..9b0699d1e442 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java
@@ -51,16 +51,18 @@ private static class JpaSupportVector {
* @param jpa_2_2 JPA 2.2 supported.
* @param jpa_3_0 JPA 3.0 supported.
* @param jpa_3_1 JPA 3.1 supported.
+ * @param jpa_3_2 JPA 3.2 supported.
*/
JpaSupportVector(boolean jpa_1_0, boolean jpa_2_0,
boolean jpa_2_1, boolean jpa_2_2,
- boolean jpa_3_0, boolean jpa_3_1) {
+ boolean jpa_3_0, boolean jpa_3_1, boolean jpa_3_2) {
_1_0 = jpa_1_0;
_2_0 = jpa_2_0;
_2_1 = jpa_2_1;
_2_2 = jpa_2_2;
_3_0 = jpa_3_0;
_3_1 = jpa_3_1;
+ _3_2 = jpa_3_2;
}
/** JPA 1.0 supported. */
@@ -80,6 +82,9 @@ private static class JpaSupportVector {
/** JPA 3.1 supported. */
boolean _3_1;
+
+ /** JPA 3.2 supported. */
+ boolean _3_2;
}
////////////////////////////////////////////////////////////////////////////
@@ -95,14 +100,15 @@ private static class JpaSupportVector {
/**
* GlassFish JPA support matrix:
*
GlassFish
JPA 1.0
JPA 2.0
JPA 2.1
- *
JPA 2.2
JPA 3.0
JPA 3.1
- *
V1
YES
NO
NO
NO
NO
NO
- *
V2
YES
NO
NO
NO
NO
NO
- *
V3
YES
YES
NO
NO
NO
NO
- *
V4
YES
YES
YES
NO
NO
NO
- *
V5
YES
YES
YES
YES
NO
NO
- *
V6
NO
NO
NO
NO
YES
NO
- *
V7
NO
NO
NO
NO
YES
YES
+ *
JPA 2.2
JPA 3.0
JPA 3.1
JPA 3.2
+ *
V1
YES
NO
NO
NO
NO
NO
NO
+ *
V2
YES
NO
NO
NO
NO
NO
NO
+ *
V3
YES
YES
NO
NO
NO
NO
NO
+ *
V4
YES
YES
YES
NO
NO
NO
NO
+ *
V5
YES
YES
YES
YES
NO
NO
NO
+ *
V6
NO
NO
NO
NO
YES
NO
NO
+ *
V7
NO
NO
NO
NO
YES
YES
NO
+ *
V8
NO
NO
NO
NO
YES
YES
YES
*
*/
private static final JpaSupportVector jpaSupport[]
@@ -117,7 +123,8 @@ private static class JpaSupportVector {
GlassFishVersion.lt(version, GlassFishVersion.GF_6) && GlassFishVersion.ge(version, GlassFishVersion.GF_4),
GlassFishVersion.lt(version, GlassFishVersion.GF_6) && GlassFishVersion.ge(version, GlassFishVersion.GF_5),
GlassFishVersion.lt(version, GlassFishVersion.GF_7_0_0) && GlassFishVersion.ge(version, GlassFishVersion.GF_6),
- GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)
+ GlassFishVersion.lt(version, GlassFishVersion.GF_8_0_0) && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0),
+ GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)
);
}
}
@@ -196,7 +203,8 @@ public JpaProvider getDefaultProvider() {
instanceJpaSupport._2_1,
instanceJpaSupport._2_2,
instanceJpaSupport._3_0,
- instanceJpaSupport._3_1);
+ instanceJpaSupport._3_1,
+ instanceJpaSupport._3_2);
}
}
return defaultProvider;
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java
index cddb782fcd35..8fb55ba79adf 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java
@@ -103,6 +103,12 @@ public static Hk2OptionalFactory createJakartaEe10() {
return null == t ? null : new Hk2OptionalFactory(Hk2DeploymentFactory.createJakartaEe10(),
t, true);
}
+
+ public static Hk2OptionalFactory createJakartaEe11() {
+ ServerUtilities t = ServerUtilities.getJakartaEe11Utilities();
+ return null == t ? null : new Hk2OptionalFactory(Hk2DeploymentFactory.createJakartaEe11(),
+ t, true);
+ }
@Override
public StartServer getStartServer(DeploymentManager dm) {
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java
index ae15f4e28b14..3e77dc5538b5 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java
@@ -183,6 +183,7 @@ private static boolean ensureEclipseLinkSupport(String installRoot) {
libraryList.add(ServerUtilities.fileToUrl(f));
}
}
+ // TODO: add support for JPA 3.x
File j2eeDoc = InstalledFileLocator.getDefault().locate(
"docs/" + PERSISTENCE_JAVADOC,
@@ -241,7 +242,8 @@ private static boolean ensureCometSupport(String installRoot) {
{"jackson-asl", "jackson-core-asl", "jersey-bundle", "jersey-gf-bundle", "jersey-multipart", "jettison", "mimepull", "jsr311-api"}; //NOI18N
private static final String[] JAXRS_LIBRARIES_31 =
- {"jackson-core-asl", "jackson-jaxrs", "jackson-mapper-asl", "jersey-client", "jersey-core", JERSEY_GF_SERVER, "jersey-json", "jersey-multipart", "jettison", "mimepull"}; //NOI18N
+ {"jackson-core-asl", "jackson-jaxrs", "jackson-mapper-asl", "jersey-client",
+ "jersey-core", JERSEY_GF_SERVER, "jersey-json", "jersey-multipart", "jettison", "mimepull"}; //NOI18N
private static final String JAVA_EE_6_LIB = "Java-EE-GlassFish-v3"; // NOI18N
private static final String JAVA_EE_5_LIB = "Java-EE-GlassFish-v3-Prelude"; // NOI18N
@@ -250,6 +252,7 @@ private static boolean ensureCometSupport(String installRoot) {
private static final String JAKARTA_EE_8_JAVADOC = "jakartaee8-doc-api.jar"; // NOI18N
private static final String JAKARTA_EE_9_JAVADOC = "jakartaee9-doc-api.jar"; // NOI18N
private static final String JAKARTA_EE_10_JAVADOC = "jakartaee10-doc-api.jar"; // NOI18N
+ private static final String JAKARTA_EE_11_JAVADOC = "jakartaee11-doc-api.jar"; // NOI18N
private static boolean ensureGlassFishApiSupport(GlassFishServer server) {
String installRoot = server.getServerRoot();
@@ -263,7 +266,11 @@ private static boolean ensureGlassFishApiSupport(GlassFishServer server) {
}
File j2eeDoc;
- if (GlassFishVersion.ge(server.getVersion(), GlassFishVersion.GF_7_0_0)) {
+ if (GlassFishVersion.ge(server.getVersion(), GlassFishVersion.GF_8_0_0)) {
+ j2eeDoc = InstalledFileLocator.getDefault().locate(
+ "docs/" + JAKARTA_EE_11_JAVADOC,
+ Hk2LibraryProvider.JAVAEE_DOC_CODE_BASE, false);
+ } else if (GlassFishVersion.ge(server.getVersion(), GlassFishVersion.GF_7_0_0)) {
j2eeDoc = InstalledFileLocator.getDefault().locate(
"docs/" + JAKARTA_EE_10_JAVADOC,
Hk2LibraryProvider.JAVAEE_DOC_CODE_BASE, false);
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
index 5ae0f41df8e6..a4542df2c588 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java
@@ -23,6 +23,7 @@
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
@@ -44,6 +45,7 @@
import org.netbeans.modules.xml.catalog.spi.CatalogListener;
import org.netbeans.modules.xml.catalog.spi.CatalogReader;
import org.netbeans.spi.server.ServerInstanceProvider;
+import org.openide.util.Utilities;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -57,10 +59,11 @@
* @author Ludo
*/
-public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogReader, CatalogDescriptor2,org.xml.sax.EntityResolver {
-
- private static final String XML_XSD="http://www.w3.org/2001/xml.xsd"; // NOI18N
- private static final String XML_XSD_DEF="In due course, we should install the relevant ISO 2- and 3-letter codes as the enumerated possible values . . ."; // NOI18N
+public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogReader, CatalogDescriptor2, org.xml.sax.EntityResolver {
+
+ private static final Logger LOGGER = Logger.getLogger("glassfish-javaee");
+ private static final String XML_XSD = "http://www.w3.org/2001/xml.xsd"; // NOI18N
+ private static final String XML_XSD_DEF = "In due course, we should install the relevant ISO 2- and 3-letter codes as the enumerated possible values . . ."; // NOI18N
private static final String TypeToURLMap[] = {
"-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" , "sun-application_1_3-0.dtd" ,
"-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" , "sun-application_1_4-0.dtd" , ///[THIS IS DEPRECATED]
@@ -83,7 +86,7 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
"-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN" , "sun-web-app_2_3-0.dtd" ,
"-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" , "sun-web-app_2_4-0.dtd" , ///[THIS IS DEPRECATED]
"-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN" , "sun-web-app_2_4-0.dtd" ,
- "-//Sun Microsystems, Inc.//DTD Sun ONE Web Server 6.1 Servlet 2.3//EN" , "sun-web-app_2_3-1.dtd" ,
+ "-//Sun Microsystems, Inc.//DTD Sun ONE Web Server 6.1 Servlet 2.3//EN" , "sun-web-app_2_3-1.dtd" ,
"-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" , "sun-web-app_2_4-1.dtd" ,
"-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" , "sun-web-app_2_5-0.dtd" ,
"-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client Container 1.0//EN" , "sun-application-client-container_1_0.dtd" ,
@@ -100,7 +103,7 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
"-//Sun Microsystems Inc.//DTD GlassFish Communications Server 1.5 Domain//EN" ,"sun-domain_1_4.dtd",
"-//Sun Microsystems Inc.//DTD GlassFish Communications Server 2.0 Domain//EN" ,"sun-domain_1_5.dtd",
"-//Sun Microsystems, Inc.//DTD Application Server 9.0 SIP Servlet 1.1//EN" , "sun-sip-app_1_1-0.dtd",
-
+
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" , "application_1_3.dtd",
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" , "application_1_2.dtd",
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" , "ejb-jar_2_0.dtd",
@@ -114,7 +117,7 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" , "web-jsptaglibrary_1_2.dtd",
"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" , "web-jsptaglibrary_1_1.dtd",
};
-
+
private static final String JavaEE6TypeToURLMap[] = {
"-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Java EE Application 6.0//EN" , "sun-application_6_0-0.dtd",
"-//GlassFish.org//DTD GlassFish Application Server 3.1 Java EE Application 6.0//EN" , "glassfish-application_6_0-1.dtd",
@@ -130,7 +133,7 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
/*******NetBeans 3.6 is NOT ready yet to support schemas for code completion... What a pity!: */
private static final String SchemaToURLMap[] = {
-
+
"SCHEMA:http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" , "ejb-jar_2_1",
"SCHEMA:http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" , "ejb-jar_3_0",
"SCHEMA:http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" , "ejb-jar_3_1",
@@ -150,6 +153,8 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
"SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_9.xsd" , "application_9",
"SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application-client_10.xsd" , "application-client_10",
"SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_10.xsd" , "application_10",
+ "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application-client_11.xsd" , "application-client_11",
+ "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_11.xsd" , "application_11",
"SCHEMA:http://java.sun.com/xml/ns/j2ee/jax-rpc-ri-config.xsd" , "jax-rpc-ri-config",
"SCHEMA:http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" , "connector_1_5",
"SCHEMA:http://java.sun.com/xml/ns/javaee/connector_1_6.xsd" , "connector_1_6",
@@ -178,13 +183,15 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
"SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd" , "orm_2_2",
"SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_0.xsd" , "orm_3_0",
"SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_1.xsd" , "orm_3_1",
+ "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_2.xsd" , "orm_3_2",
"SCHEMA:http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" , "persistence_1_0",
"SCHEMA:http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" , "persistence_2_0",
"SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" , "persistence_2_1",
"SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd" , "persistence_2_2",
"SCHEMA:https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd" , "persistence_3_0",
+ "SCHEMA:https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd" , "persistence_3_2",
};
-
+
private static final String JavaEE6SchemaToURLMap[] = {
"SCHEMA:http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" , "ejb-jar_3_1",
@@ -204,8 +211,7 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
"SCHEMA:http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd", "jdbc-data-source",
};
- private static Map ddCatalogMap = new HashMap<>();
-// private static RunTimeDDCatalog preludeDDCatalog;
+ private static final Map ddCatalogMap = new HashMap<>();
private static RunTimeDDCatalog javaEE6DDCatalog;
private File platformRootDir=null;
@@ -216,18 +222,28 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead
/** Creates a new instance of RunTimeDDCatalog */
public RunTimeDDCatalog() {
}
-
+
public void setInstanceProvider(ServerInstanceProvider ip) {
if (ddCatalogMap.get(ip) == null) {
ddCatalogMap.put(ip, this);
}
}
- /** Factory method providing catalog for XML completion of DD */
+ /**
+ * Factory method providing catalog for XML completion of DD
+ *
+ * @param ip
+ * @return
+ */
public static RunTimeDDCatalog getRunTimeDDCatalog(ServerInstanceProvider ip){
return ddCatalogMap.get(ip);
}
- /** Factory method providing catalog for XML completion of DD */
+ /**
+ * Factory method providing catalog for XML completion of DD
+ *
+ * @return
+ */
+ @SuppressWarnings("AccessingNonPublicFieldOfAnotherObject")
public static synchronized RunTimeDDCatalog getEE6RunTimeDDCatalog(){
if (javaEE6DDCatalog==null) {
javaEE6DDCatalog = new RunTimeDDCatalog();
@@ -250,35 +266,37 @@ public Iterator getPublicIDs() {
if (!platformRootDir.exists()) {
return null;
}
-
- String installRoot = platformRootDir.getAbsolutePath();
+
+ String installRoot = platformRootDir.getAbsolutePath();
if (installRoot == null) {
return null;
}
-
+
List list = new ArrayList<>();
- for (int i=0;i catalogListeners = new ArrayList<>(1);
-
+
+ private final List catalogListeners = new ArrayList<>(1);
+
/**
* Optional operation allowing to listen at catalog for changes.
- * @throws UnsupportedOpertaionException if not supported by the implementation.
+ *
+ * @param listener
*/
@Override
- public void addCatalogListener(CatalogListener l) {
- if (null == l)
+ public void addCatalogListener(CatalogListener listener) {
+ if (null == listener)
return;
- if (catalogListeners.contains(l))
+ if (catalogListeners.contains(listener))
return;
- catalogListeners.add(l);
+ catalogListeners.add(listener);
}
-
+
/**
* Optional operation couled with addCatalogListener.
- * @throws UnsupportedOpertaionException if not supported by the implementation.
+ *
+ * @param listener
*/
@Override
- public void removeCatalogListener(CatalogListener l) {
- if (null == l)
+ public void removeCatalogListener(CatalogListener listener) {
+ if (null == listener)
return;
- catalogListeners.remove(l);
+ catalogListeners.remove(listener);
}
-
+
public void fireCatalogListeners() {
for (CatalogListener l : catalogListeners) {
l.notifyInvalidate();
}
}
-
- /** Registers new listener. */
+
+ /**
+ * Registers new listener.
+ *
+ * @param propertyChangeListener
+ */
@Override
- public void addPropertyChangeListener(PropertyChangeListener l) {
+ public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) {
}
-
+
+ /**
+ * Unregister the listener.
+ *
+ * @param propertyChangeListener
+ */
+ @Override
+ public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) {
+ }
+
/**
* @return I18N display name
*/
@@ -416,7 +451,7 @@ public void addPropertyChangeListener(PropertyChangeListener l) {
public String getDisplayName() {
return NbBundle.getMessage(RunTimeDDCatalog.class, displayNameKey);
}
-
+
/**
* Return visuaized state of given catalog.
* @param type of icon defined by JavaBeans specs
@@ -426,7 +461,7 @@ public String getDisplayName() {
public String getIconResource(int type) {
return "org/netbeans/modules/glassfish/javaee/resources/ServerInstanceIcon.png"; // NOI18N
}
-
+
/**
* @return I18N short description
*/
@@ -434,12 +469,7 @@ public String getIconResource(int type) {
public String getShortDescription() {
return NbBundle.getMessage(RunTimeDDCatalog.class, shortDescriptionKey);
}
-
- /** Unregister the listener. */
- @Override
- public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
- }
-
+
public static final String J2EE_NS = "http://java.sun.com/xml/ns/j2ee"; // NOI18N
public static final String JAVAEE_NS = "http://java.sun.com/xml/ns/javaee"; // NOI18N
public static final String NEW_JAVAEE_NS = "http://xmlns.jcp.org/xml/ns/javaee"; // NOI18N
@@ -448,80 +478,82 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
public static final String IBM_J2EE_NS = "http://www.ibm.com/webservices/xsd"; // NOI18N
private static final String XMLNS_ATTR="xmlns"; //NOI18N
- // public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws org.xml.sax.SAXException, java.io.IOException {
- // return null;
- // }
+
private static final String EJB_JAR_TAG="ejb-jar"; //NOI18N
private static final String EJBJAR_2_1_XSD="ejb-jar_2_1.xsd"; // NOI18N
private static final String EJBJAR_2_1 = J2EE_NS+"/"+EJBJAR_2_1_XSD; // NOI18N
public static final String EJBJAR_2_1_ID = "SCHEMA:"+EJBJAR_2_1; // NOI18N
-
+
private static final String EJBJAR_3_0_XSD="ejb-jar_3_0.xsd"; // NOI18N
private static final String EJBJAR_3_0 = JAVAEE_NS+"/"+EJBJAR_3_0_XSD; // NOI18N
public static final String EJBJAR_3_0_ID = "SCHEMA:"+EJBJAR_3_0; // NOI18N
-
+
private static final String EJBJAR_3_1_XSD="ejb-jar_3_1.xsd"; // NOI18N
private static final String EJBJAR_3_1 = JAVAEE_NS+"/"+EJBJAR_3_1_XSD; // NOI18N
public static final String EJBJAR_3_1_ID = "SCHEMA:"+EJBJAR_3_1; // NOI18N
-
+
private static final String EJBJAR_3_2_XSD="ejb-jar_3_2.xsd"; // NOI18N
private static final String EJBJAR_3_2 = NEW_JAVAEE_NS+"/"+EJBJAR_3_2_XSD; // NOI18N
public static final String EJBJAR_3_2_ID = "SCHEMA:"+EJBJAR_3_2; // NOI18N
-
+
private static final String EJBJAR_4_0_XSD="ejb-jar_4_0.xsd"; // NOI18N
private static final String EJBJAR_4_0 = JAKARTAEE_NS+"/"+EJBJAR_4_0_XSD; // NOI18N
public static final String EJBJAR_4_0_ID = "SCHEMA:"+EJBJAR_4_0; // NOI18N
-
+
private static final String APP_TAG="application"; //NOI18N
private static final String APP_1_4_XSD="application_1_4.xsd"; // NOI18N
private static final String APP_1_4= J2EE_NS+"/"+APP_1_4_XSD; // NOI18N
public static final String APP_1_4_ID = "SCHEMA:"+APP_1_4; // NOI18N
-
+
private static final String APP_5_XSD="application_5.xsd"; // NOI18N
private static final String APP_5= JAVAEE_NS+"/"+APP_5_XSD; // NOI18N
public static final String APP_5_ID = "SCHEMA:"+APP_5; // NOI18N
-
+
private static final String APP_6_XSD="application_6.xsd"; // NOI18N
private static final String APP_6= JAVAEE_NS+"/"+APP_6_XSD; // NOI18N
public static final String APP_6_ID = "SCHEMA:"+APP_6; // NOI18N
-
+
private static final String APP_7_XSD="application_7.xsd"; // NOI18N
private static final String APP_7= NEW_JAVAEE_NS+"/"+APP_7_XSD; // NOI18N
public static final String APP_7_ID = "SCHEMA:"+APP_7; // NOI18N
-
+
private static final String APP_8_XSD="application_8.xsd"; // NOI18N
private static final String APP_8= NEW_JAVAEE_NS+"/"+APP_8_XSD; // NOI18N
public static final String APP_8_ID = "SCHEMA:"+APP_8; // NOI18N
-
+
private static final String APP_9_XSD="application_9.xsd"; // NOI18N
private static final String APP_9= JAKARTAEE_NS+"/"+APP_9_XSD; // NOI18N
public static final String APP_9_ID = "SCHEMA:"+APP_9; // NOI18N
-
+
private static final String APP_10_XSD="application_10.xsd"; // NOI18N
private static final String APP_10= JAKARTAEE_NS+"/"+APP_10_XSD; // NOI18N
public static final String APP_10_ID = "SCHEMA:"+APP_10; // NOI18N
-
+
+ private static final String APP_11_XSD="application_11.xsd"; // NOI18N
+ private static final String APP_11= JAKARTAEE_NS+"/"+APP_11_XSD; // NOI18N
+ public static final String APP_11_ID = "SCHEMA:"+APP_11; // NOI18N
+
private static final String APPCLIENT_TAG="application-client"; //NOI18N
private static final String APPCLIENT_1_4_XSD="application-client_1_4.xsd"; // NOI18N
private static final String APPCLIENT_1_4= J2EE_NS+"/"+APPCLIENT_1_4_XSD; // NOI18N
public static final String APPCLIENT_1_4_ID = "SCHEMA:"+APPCLIENT_1_4; // NOI18N
-
+
private static final String APPCLIENT_5_XSD="application-client_5.xsd"; // NOI18N
private static final String APPCLIENT_5= JAVAEE_NS+"/"+APPCLIENT_5_XSD; // NOI18N
public static final String APPCLIENT_5_ID = "SCHEMA:"+APPCLIENT_5; // NOI18N
-
+
private static final String APPCLIENT_6_XSD="application-client_6.xsd"; // NOI18N
private static final String APPCLIENT_6= JAVAEE_NS+"/"+APPCLIENT_6_XSD; // NOI18N
public static final String APPCLIENT_6_ID = "SCHEMA:"+APPCLIENT_6; // NOI18N
-
+
private static final String APPCLIENT_7_XSD="application-client_7.xsd"; // NOI18N
private static final String APPCLIENT_7= NEW_JAVAEE_NS+"/"+APPCLIENT_7_XSD; // NOI18N
public static final String APPCLIENT_7_ID = "SCHEMA:"+APPCLIENT_7; // NOI18N
-
+
private static final String APPCLIENT_8_XSD="application-client_8.xsd"; // NOI18N
private static final String APPCLIENT_8= NEW_JAVAEE_NS+"/"+APPCLIENT_8_XSD; // NOI18N
public static final String APPCLIENT_8_ID = "SCHEMA:"+APPCLIENT_8; // NOI18N
-
+
private static final String APPCLIENT_9_XSD="application-client_9.xsd"; // NOI18N
private static final String APPCLIENT_9= JAKARTAEE_NS+"/"+APPCLIENT_9_XSD; // NOI18N
public static final String APPCLIENT_9_ID = "SCHEMA:"+APPCLIENT_9; // NOI18N
@@ -530,6 +562,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
private static final String APPCLIENT_10= JAKARTAEE_NS+"/"+APPCLIENT_10_XSD; // NOI18N
public static final String APPCLIENT_10_ID = "SCHEMA:"+APPCLIENT_10; // NOI18N
+ private static final String APPCLIENT_11_XSD="application-client_11.xsd"; // NOI18N
+ private static final String APPCLIENT_11= JAKARTAEE_NS+"/"+APPCLIENT_11_XSD; // NOI18N
+ public static final String APPCLIENT_11_ID = "SCHEMA:"+APPCLIENT_11; // NOI18N
+
private static final String WEBSERVICES_TAG="webservices"; //NOI18N
private static final String WEBSERVICES_1_1_XSD="j2ee_web_services_1_1.xsd"; // NOI18N
private static final String WEBSERVICES_1_1= IBM_J2EE_NS+"/"+WEBSERVICES_1_1_XSD; // NOI18N
@@ -542,15 +578,15 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
private static final String WEBSERVICES_1_2_XSD="javaee_web_services_1_2.xsd"; // NOI18N
private static final String WEBSERVICES_1_2= JAVAEE_NS+"/"+WEBSERVICES_1_2_XSD; // NOI18N
public static final String WEBSERVICES_1_2_ID = "SCHEMA:"+WEBSERVICES_1_2; // NOI18N
-
+
private static final String WEBSERVICES_1_3_XSD="javaee_web_services_1_3.xsd"; // NOI18N
private static final String WEBSERVICES_1_3= JAVAEE_NS+"/"+WEBSERVICES_1_3_XSD; // NOI18N
public static final String WEBSERVICES_1_3_ID = "SCHEMA:"+WEBSERVICES_1_3; // NOI18N
-
+
private static final String WEBSERVICES_1_4_XSD="javaee_web_services_1_4.xsd"; // NOI18N
private static final String WEBSERVICES_1_4= NEW_JAVAEE_NS+"/"+WEBSERVICES_1_4_XSD; // NOI18N
public static final String WEBSERVICES_1_4_ID = "SCHEMA:"+WEBSERVICES_1_4; // NOI18N
-
+
private static final String WEBSERVICES_2_0_XSD="jakartaee_web_services_2_0.xsd"; // NOI18N
private static final String WEBSERVICES_2_0= JAKARTAEE_NS+"/"+WEBSERVICES_2_0_XSD; // NOI18N
public static final String WEBSERVICES_2_0_ID = "SCHEMA:"+WEBSERVICES_2_0; // NOI18N
@@ -558,15 +594,15 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
private static final String WEBSERVICES_CLIENT_1_2_XSD="javaee_web_services_client_1_2.xsd"; // NOI18N
private static final String WEBSERVICES_CLIENT_1_2= JAVAEE_NS+"/"+WEBSERVICES_CLIENT_1_2_XSD; // NOI18N
public static final String WEBSERVICES_CLIENT_1_2_ID = "SCHEMA:"+WEBSERVICES_CLIENT_1_2; // NOI18N
-
+
private static final String WEBSERVICES_CLIENT_1_3_XSD="javaee_web_services_client_1_3.xsd"; // NOI18N
private static final String WEBSERVICES_CLIENT_1_3= JAVAEE_NS+"/"+WEBSERVICES_CLIENT_1_3_XSD; // NOI18N
public static final String WEBSERVICES_CLIENT_1_3_ID = "SCHEMA:"+WEBSERVICES_CLIENT_1_3; // NOI18N
-
+
private static final String WEBSERVICES_CLIENT_1_4_XSD="javaee_web_services_client_1_4.xsd"; // NOI18N
private static final String WEBSERVICES_CLIENT_1_4= NEW_JAVAEE_NS+"/"+WEBSERVICES_CLIENT_1_4_XSD; // NOI18N
public static final String WEBSERVICES_CLIENT_1_4_ID = "SCHEMA:"+WEBSERVICES_CLIENT_1_4; // NOI18N
-
+
private static final String WEBSERVICES_CLIENT_2_0_XSD="jakartaee_web_services_client_2_0.xsd"; // NOI18N
private static final String WEBSERVICES_CLIENT_2_0= JAKARTAEE_NS+"/"+WEBSERVICES_CLIENT_2_0_XSD; // NOI18N
public static final String WEBSERVICES_CLIENT_2_0_ID = "SCHEMA:"+WEBSERVICES_CLIENT_2_0; // NOI18N
@@ -579,47 +615,47 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
private static final String WEBAPP_3_0_XSD="web-app_3_0.xsd"; // NOI18N
private static final String WEBAPP_3_0 = JAVAEE_NS+"/"+WEBAPP_3_0_XSD; // NOI18N
public static final String WEBAPP_3_0_ID = "SCHEMA:"+WEBAPP_3_0; // NOI18N
-
+
private static final String WEBCOMMON_3_0_XSD="web-common_3_0.xsd"; // NOI18N
private static final String WEBCOMMON_3_0 = JAVAEE_NS+"/"+WEBCOMMON_3_0_XSD; // NOI18N
public static final String WEBCOMMON_3_0_ID = "SCHEMA:"+WEBCOMMON_3_0; // NOI18N
-
+
private static final String WEBFRAGMENT_3_0_XSD="web-fragment_3_0.xsd"; // NOI18N
private static final String WEBFRAGMENT_3_0 = JAVAEE_NS+"/"+WEBFRAGMENT_3_0_XSD; // NOI18N
public static final String WEBFRAGMENT_3_0_ID = "SCHEMA:"+WEBFRAGMENT_3_0; // NOI18N
-
+
private static final String WEBAPP_3_1_XSD="web-app_3_1.xsd"; // NOI18N
private static final String WEBAPP_3_1 = NEW_JAVAEE_NS+"/"+WEBAPP_3_1_XSD; // NOI18N
public static final String WEBAPP_3_1_ID = "SCHEMA:"+WEBAPP_3_1; // NOI18N
-
+
private static final String WEBCOMMON_3_1_XSD="web-common_3_1.xsd"; // NOI18N
private static final String WEBCOMMON_3_1 = NEW_JAVAEE_NS+"/"+WEBCOMMON_3_1_XSD; // NOI18N
public static final String WEBCOMMON_3_1_ID = "SCHEMA:"+WEBCOMMON_3_1; // NOI18N
-
+
private static final String WEBFRAGMENT_3_1_XSD="web-fragment_3_1.xsd"; // NOI18N
private static final String WEBFRAGMENT_3_1 = NEW_JAVAEE_NS+"/"+WEBFRAGMENT_3_1_XSD; // NOI18N
public static final String WEBFRAGMENT_3_1_ID = "SCHEMA:"+WEBFRAGMENT_3_1; // NOI18N
-
+
private static final String WEBAPP_4_0_XSD="web-app_4_0.xsd"; // NOI18N
private static final String WEBAPP_4_0 = NEW_JAVAEE_NS+"/"+WEBAPP_4_0_XSD; // NOI18N
public static final String WEBAPP_4_0_ID = "SCHEMA:"+WEBAPP_4_0; // NOI18N
-
+
private static final String WEBCOMMON_4_0_XSD="web-common_4_0.xsd"; // NOI18N
private static final String WEBCOMMON_4_0 = NEW_JAVAEE_NS+"/"+WEBCOMMON_4_0_XSD; // NOI18N
public static final String WEBCOMMON_4_0_ID = "SCHEMA:"+WEBCOMMON_4_0; // NOI18N
-
+
private static final String WEBFRAGMENT_4_0_XSD="web-fragment_4_0.xsd"; // NOI18N
private static final String WEBFRAGMENT_4_0 = NEW_JAVAEE_NS+"/"+WEBFRAGMENT_4_0_XSD; // NOI18N
public static final String WEBFRAGMENT_4_0_ID = "SCHEMA:"+WEBFRAGMENT_4_0; // NOI18N
-
+
private static final String WEBAPP_5_0_XSD="web-app_5_0.xsd"; // NOI18N
private static final String WEBAPP_5_0 = JAKARTAEE_NS+"/"+WEBAPP_5_0_XSD; // NOI18N
public static final String WEBAPP_5_0_ID = "SCHEMA:"+WEBAPP_5_0; // NOI18N
-
+
private static final String WEBCOMMON_5_0_XSD="web-common_5_0.xsd"; // NOI18N
private static final String WEBCOMMON_5_0 = JAKARTAEE_NS+"/"+WEBCOMMON_5_0_XSD; // NOI18N
public static final String WEBCOMMON_5_0_ID = "SCHEMA:"+WEBCOMMON_5_0; // NOI18N
-
+
private static final String WEBFRAGMENT_5_0_XSD="web-fragment_5_0.xsd"; // NOI18N
private static final String WEBFRAGMENT_5_0 = JAKARTAEE_NS+"/"+WEBFRAGMENT_5_0_XSD; // NOI18N
public static final String WEBFRAGMENT_5_0_ID = "SCHEMA:"+WEBFRAGMENT_5_0; // NOI18N
@@ -627,51 +663,65 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
private static final String WEBAPP_6_0_XSD="web-app_6_0.xsd"; // NOI18N
private static final String WEBAPP_6_0 = JAKARTAEE_NS+"/"+WEBAPP_6_0_XSD; // NOI18N
public static final String WEBAPP_6_0_ID = "SCHEMA:"+WEBAPP_6_0; // NOI18N
-
+
private static final String WEBCOMMON_6_0_XSD="web-common_6_0.xsd"; // NOI18N
private static final String WEBCOMMON_6_0 = JAKARTAEE_NS+"/"+WEBCOMMON_6_0_XSD; // NOI18N
public static final String WEBCOMMON_6_0_ID = "SCHEMA:"+WEBCOMMON_6_0; // NOI18N
-
+
private static final String WEBFRAGMENT_6_0_XSD="web-fragment_6_0.xsd"; // NOI18N
private static final String WEBFRAGMENT_6_0 = JAKARTAEE_NS+"/"+WEBFRAGMENT_6_0_XSD; // NOI18N
public static final String WEBFRAGMENT_6_0_ID = "SCHEMA:"+WEBFRAGMENT_6_0; // NOI18N
+ private static final String WEBAPP_6_1_XSD="web-app_6_1.xsd"; // NOI18N
+ private static final String WEBAPP_6_1 = JAKARTAEE_NS+"/"+WEBAPP_6_1_XSD; // NOI18N
+ public static final String WEBAPP_6_1_ID = "SCHEMA:"+WEBAPP_6_1; // NOI18N
+
+ private static final String WEBCOMMON_6_1_XSD="web-common_6_1.xsd"; // NOI18N
+ private static final String WEBCOMMON_6_1 = JAKARTAEE_NS+"/"+WEBCOMMON_6_1_XSD; // NOI18N
+ public static final String WEBCOMMON_6_1_ID = "SCHEMA:"+WEBCOMMON_6_1; // NOI18N
+
+ private static final String WEBFRAGMENT_6_1_XSD="web-fragment_6_1.xsd"; // NOI18N
+ private static final String WEBFRAGMENT_6_1 = JAKARTAEE_NS+"/"+WEBFRAGMENT_6_1_XSD; // NOI18N
+ public static final String WEBFRAGMENT_6_1_ID = "SCHEMA:"+WEBFRAGMENT_6_1; // NOI18N
+
public static final String PERSISTENCE_NS = "http://java.sun.com/xml/ns/persistence"; // NOI18N
public static final String NEW_PERSISTENCE_NS = "http://xmlns.jcp.org/xml/ns/persistence"; // NOI18N
public static final String JAKARTA_PERSISTENCE_NS = "https://jakarta.ee/xml/ns/persistence"; // NOI18N
-
+
private static final String PERSISTENCE_TAG="persistence"; //NOI18N
-
private static final String PERSISTENCE_XSD="persistence_1_0.xsd"; // NOI18N
private static final String PERSISTENCE = PERSISTENCE_NS+"/"+PERSISTENCE_XSD; // NOI18N
- public static final String PERSISTENCE_ID = "SCHEMA:"+PERSISTENCE; // NOI18N
-
+ public static final String PERSISTENCE_ID = "SCHEMA:"+PERSISTENCE; // NOI18N
+
private static final String PERSISTENCE_2_0_XSD="persistence_2_0.xsd"; // NOI18N
private static final String PERSISTENCE_2_0 = PERSISTENCE_NS+"/"+PERSISTENCE_2_0_XSD; // NOI18N
- public static final String PERSISTENCE_2_0_ID = "SCHEMA:"+PERSISTENCE_2_0; // NOI18N
-
+ public static final String PERSISTENCE_2_0_ID = "SCHEMA:"+PERSISTENCE_2_0; // NOI18N
+
private static final String PERSISTENCE_2_1_XSD="persistence_2_1.xsd"; // NOI18N
private static final String PERSISTENCE_2_1 = NEW_PERSISTENCE_NS+"/"+PERSISTENCE_2_1_XSD; // NOI18N
- public static final String PERSISTENCE_2_1_ID = "SCHEMA:"+PERSISTENCE_2_1; // NOI18N
-
+ public static final String PERSISTENCE_2_1_ID = "SCHEMA:"+PERSISTENCE_2_1; // NOI18N
+
private static final String PERSISTENCE_2_2_XSD="persistence_2_2.xsd"; // NOI18N
private static final String PERSISTENCE_2_2 = NEW_PERSISTENCE_NS+"/"+PERSISTENCE_2_2_XSD; // NOI18N
- public static final String PERSISTENCE_2_2_ID = "SCHEMA:"+PERSISTENCE_2_2; // NOI18N
-
+ public static final String PERSISTENCE_2_2_ID = "SCHEMA:"+PERSISTENCE_2_2; // NOI18N
+
private static final String PERSISTENCE_3_0_XSD="persistence_3_0.xsd"; // NOI18N
private static final String PERSISTENCE_3_0 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_0_XSD; // NOI18N
- public static final String PERSISTENCE_3_0_ID = "SCHEMA:"+PERSISTENCE_3_0; // NOI18N
-
+ public static final String PERSISTENCE_3_0_ID = "SCHEMA:"+PERSISTENCE_3_0; // NOI18N
+
private static final String PERSISTENCE_3_1_XSD="persistence_3_0.xsd"; // NOI18N
private static final String PERSISTENCE_3_1 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_1_XSD; // NOI18N
- public static final String PERSISTENCE_3_1_ID = "SCHEMA:"+PERSISTENCE_3_1; // NOI18N
-
+ public static final String PERSISTENCE_3_1_ID = "SCHEMA:"+PERSISTENCE_3_1; // NOI18N
+
+ private static final String PERSISTENCE_3_2_XSD="persistence_3_2.xsd"; // NOI18N
+ private static final String PERSISTENCE_3_2 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_2_XSD; // NOI18N
+ public static final String PERSISTENCE_3_2_ID = "SCHEMA:"+PERSISTENCE_3_2; // NOI18N
+
public static final String PERSISTENCEORM_NS = "http://java.sun.com/xml/ns/persistence/orm"; // NOI18N
public static final String NEW_PERSISTENCEORM_NS = "http://xmlns.jcp.org/xml/ns/persistence/orm"; // NOI18N
public static final String JAKARTA_PERSISTENCEORM_NS = "https://jakarta.ee/xml/ns/persistence/orm"; // NOI18N
-
+
private static final String PERSISTENCEORM_TAG="entity-mappings"; //NOI18N
-
private static final String PERSISTENCEORM_XSD="orm_1_0.xsd"; // NOI18N
private static final String PERSISTENCEORM = PERSISTENCE_NS+"/"+PERSISTENCEORM_XSD; // NOI18N yes not ORM NS!!!
public static final String PERSISTENCEORM_ID = "SCHEMA:"+PERSISTENCEORM; // NOI18N
@@ -679,29 +729,71 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
private static final String PERSISTENCEORM_2_0_XSD="orm_2_0.xsd"; // NOI18N
private static final String PERSISTENCEORM_2_0 = PERSISTENCE_NS+"/"+PERSISTENCEORM_2_0_XSD; // NOI18N yes not ORM NS!!!
public static final String PERSISTENCEORM_2_0_ID = "SCHEMA:"+PERSISTENCEORM_2_0; // NOI18N
-
+
private static final String PERSISTENCEORM_2_1_XSD="orm_2_1.xsd"; // NOI18N
private static final String PERSISTENCEORM_2_1 = NEW_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_2_1_XSD; // NOI18N yes not ORM NS!!!
public static final String PERSISTENCEORM_2_1_ID = "SCHEMA:"+PERSISTENCEORM_2_1; // NOI18N
-
+
private static final String PERSISTENCEORM_2_2_XSD="orm_2_2.xsd"; // NOI18N
private static final String PERSISTENCEORM_2_2 = NEW_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_2_2_XSD; // NOI18N yes not ORM NS!!!
public static final String PERSISTENCEORM_2_2_ID = "SCHEMA:"+PERSISTENCEORM_2_2; // NOI18N
-
+
private static final String PERSISTENCEORM_3_0_XSD="orm_3_0.xsd"; // NOI18N
private static final String PERSISTENCEORM_3_0 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_0_XSD; // NOI18N yes not ORM NS!!!
public static final String PERSISTENCEORM_3_0_ID = "SCHEMA:"+PERSISTENCEORM_3_0; // NOI18N
-
+
private static final String PERSISTENCEORM_3_1_XSD="orm_3_1.xsd"; // NOI18N
private static final String PERSISTENCEORM_3_1 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_1_XSD; // NOI18N yes not ORM NS!!!
public static final String PERSISTENCEORM_3_1_ID = "SCHEMA:"+PERSISTENCEORM_3_1; // NOI18N
-
+
+ private static final String PERSISTENCEORM_3_2_XSD="orm_3_2.xsd"; // NOI18N
+ private static final String PERSISTENCEORM_3_2 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_2_XSD; // NOI18N yes not ORM NS!!!
+ public static final String PERSISTENCEORM_3_2_ID = "SCHEMA:"+PERSISTENCEORM_3_2; // NOI18N
+
+ private static final String[] SUPPORTED_SCHEMAS = new String[]{
+ // ejb
+ EJBJAR_2_1_XSD, EJBJAR_3_0_XSD, EJBJAR_3_1_XSD, EJBJAR_3_2_XSD, EJBJAR_4_0_XSD,
+ // application & application-client
+ APP_1_4_XSD, APPCLIENT_1_4_XSD, APP_5_XSD, APPCLIENT_5_XSD,
+ APP_6_XSD, APPCLIENT_6_XSD, APP_7_XSD, APPCLIENT_7_XSD,
+ APP_8_XSD, APPCLIENT_8_XSD, APP_9_XSD, APPCLIENT_9_XSD,
+ APP_10_XSD, APPCLIENT_10_XSD, APP_11_XSD, APPCLIENT_11_XSD,
+ //web-app, web-common & web-fragment
+ WEBAPP_2_5_XSD,
+ WEBAPP_3_0_XSD, WEBFRAGMENT_3_0_XSD, WEBCOMMON_3_0_XSD,
+ WEBAPP_3_1_XSD, WEBFRAGMENT_3_1_XSD, WEBCOMMON_3_1_XSD,
+ WEBAPP_4_0_XSD, WEBFRAGMENT_4_0_XSD, WEBCOMMON_4_0_XSD,
+ WEBAPP_5_0_XSD, WEBFRAGMENT_5_0_XSD, WEBCOMMON_5_0_XSD,
+ WEBAPP_6_0_XSD, WEBFRAGMENT_6_0_XSD, WEBCOMMON_6_0_XSD,
+ WEBAPP_6_1_XSD, WEBFRAGMENT_6_1_XSD, WEBCOMMON_6_1_XSD,
+ //persistence & orm
+ PERSISTENCE_XSD, PERSISTENCEORM_XSD,
+ PERSISTENCE_2_0_XSD, PERSISTENCEORM_2_0_XSD,
+ PERSISTENCE_2_1_XSD, PERSISTENCEORM_2_1_XSD,
+ PERSISTENCE_2_2_XSD, PERSISTENCEORM_2_2_XSD,
+ PERSISTENCE_3_0_XSD, PERSISTENCEORM_3_0_XSD,
+ PERSISTENCE_3_1_XSD, PERSISTENCEORM_3_1_XSD,
+ PERSISTENCE_3_2_XSD, PERSISTENCEORM_3_2_XSD,
+ //webservice & webservice-client
+ WEBSERVICES_1_1_XSD, WEBSERVICES_CLIENT_1_1_XSD,
+ WEBSERVICES_1_2_XSD, WEBSERVICES_CLIENT_1_2_XSD,
+ WEBSERVICES_1_3_XSD, WEBSERVICES_CLIENT_1_3_XSD,
+ WEBSERVICES_1_4_XSD, WEBSERVICES_CLIENT_1_4_XSD,
+ WEBSERVICES_2_0_XSD, WEBSERVICES_CLIENT_2_0_XSD,
+ // weblogic
+ "weblogic-web-app.xsd", "weblogic-ejb-jar.xsd", //NOI18N
+ "weblogic-application.xsd", "weblogic-application-client.xsd", //NOI18N
+ "weblogic-connector.xsd", "weblogic-javaee.xsd", //NOI18N
+ "weblogic-jms.xsd", "weblogic-webservices.xsd", //NOI18N
+ "jdbc-data-source.xsd"
+ };
+
public String getFullURLFromSystemId(String systemId){
return null;
-
+
}
-
- private static String SCHEMASLOCATION=null;
+
+ private static File SCHEMASLOCATION=null;
/**
* Resolves schema definition file for deployment descriptor (spec.2_4)
* @param publicId publicId for resolved entity (null in our case)
@@ -710,7 +802,7 @@ public String getFullURLFromSystemId(String systemId){
*/
@Override
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
-
+
if (SCHEMASLOCATION == null) {
if (platformRootDir == null) {
return null;
@@ -718,171 +810,41 @@ public InputSource resolveEntity(String publicId, String systemId) throws SAXExc
if (!platformRootDir.exists()) {
return null;
}
-
- String installRoot = platformRootDir.getAbsolutePath(); //System.getProperty("com.sun.aas.installRoot");
- if (installRoot==null)
+
+ String installRoot = platformRootDir.getAbsolutePath(); //System.getProperty("com.sun.aas.installRoot");
+ if (installRoot == null) {
return null;
+ }
File f = new File(installRoot);
- if (f.exists()==false)
+ if (!f.exists()) {
return null;
- File file = new File(installRoot+"/lib/schemas/");
- SCHEMASLOCATION = "";
- try{
- SCHEMASLOCATION= file.toURI().toURL().toExternalForm();
- }catch(Exception e){
- Logger.getLogger("glassfish-javaee").log(Level.INFO, file.getAbsolutePath(), e); // NOI18N
- }
- }
-
- if (systemId != null) {
- // ejb
- if ( systemId.endsWith(EJBJAR_2_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+EJBJAR_2_1_XSD);
- } else if ( systemId.endsWith(EJBJAR_3_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+EJBJAR_3_0_XSD);
- } else if ( systemId.endsWith(EJBJAR_3_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+EJBJAR_3_1_XSD);
- } else if ( systemId.endsWith(EJBJAR_3_2_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+EJBJAR_3_2_XSD);
- } else if ( systemId.endsWith(EJBJAR_4_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+EJBJAR_4_0_XSD);
- }
- // application & application-client
- else if ( systemId.endsWith(APP_1_4_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_1_4_XSD);
- } else if ( systemId.endsWith(APPCLIENT_1_4_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_1_4_XSD);
- } else if ( systemId.endsWith(APP_5_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_5_XSD);
- } else if ( systemId.endsWith(APPCLIENT_5_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_5_XSD);
- } else if ( systemId.endsWith(APP_6_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_6_XSD);
- } else if ( systemId.endsWith(APPCLIENT_6_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_6_XSD);
- } else if ( systemId.endsWith(APP_7_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_7_XSD);
- } else if ( systemId.endsWith(APPCLIENT_7_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_7_XSD);
- } else if ( systemId.endsWith(APP_8_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_8_XSD);
- } else if ( systemId.endsWith(APPCLIENT_8_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_8_XSD);
- } else if ( systemId.endsWith(APP_9_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_9_XSD);
- } else if ( systemId.endsWith(APPCLIENT_9_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_9_XSD);
- } else if ( systemId.endsWith(APP_10_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_10_XSD);
- } else if ( systemId.endsWith(APPCLIENT_10_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_10_XSD);
}
- //web-app, web-common & web-fragment
- else if ( systemId.endsWith(WEBAPP_2_5_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_2_5_XSD);
- } else if ( systemId.endsWith(WEBAPP_3_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_3_0_XSD);
- } else if ( systemId.endsWith(WEBFRAGMENT_3_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_3_0_XSD);
- } else if ( systemId.endsWith(WEBCOMMON_3_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_3_0_XSD);
- } else if ( systemId.endsWith(WEBAPP_3_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_3_1_XSD);
- } else if ( systemId.endsWith(WEBFRAGMENT_3_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_3_1_XSD);
- } else if ( systemId.endsWith(WEBCOMMON_3_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_3_1_XSD);
- } else if ( systemId.endsWith(WEBAPP_4_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_4_0_XSD);
- } else if ( systemId.endsWith(WEBFRAGMENT_4_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_4_0_XSD);
- } else if ( systemId.endsWith(WEBCOMMON_4_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_4_0_XSD);
- } else if ( systemId.endsWith(WEBAPP_5_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_5_0_XSD);
- } else if ( systemId.endsWith(WEBFRAGMENT_5_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_5_0_XSD);
- } else if ( systemId.endsWith(WEBCOMMON_5_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_5_0_XSD);
- } else if ( systemId.endsWith(WEBAPP_6_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_6_0_XSD);
- } else if ( systemId.endsWith(WEBFRAGMENT_6_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_6_0_XSD);
- } else if ( systemId.endsWith(WEBCOMMON_6_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_6_0_XSD);
- }
- //persistence & orm
- else if ( systemId.endsWith(PERSISTENCEORM_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_XSD);
- } else if ( systemId.endsWith(PERSISTENCE_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_XSD);
- } else if ( systemId.endsWith(PERSISTENCEORM_2_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_2_0_XSD);
- } else if ( systemId.endsWith(PERSISTENCE_2_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_2_0_XSD);
- } else if ( systemId.endsWith(PERSISTENCEORM_2_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_2_1_XSD);
- } else if ( systemId.endsWith(PERSISTENCE_2_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_2_1_XSD);
- } else if ( systemId.endsWith(PERSISTENCEORM_2_2_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_2_2_XSD);
- } else if ( systemId.endsWith(PERSISTENCE_2_2_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_2_2_XSD);
- } else if ( systemId.endsWith(PERSISTENCEORM_3_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_3_0_XSD);
- } else if ( systemId.endsWith(PERSISTENCEORM_3_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_3_1_XSD);
- } else if ( systemId.endsWith(PERSISTENCE_3_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_3_0_XSD);
+ File f2 = new File(installRoot, "/lib/schemas/");
+ if (!f2.exists()) {
+ return null;
}
- //webservice & webservice-client
- else if ( systemId.endsWith(WEBSERVICES_1_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_1_1_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_1_2_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_1_2_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_1_3_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_1_3_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_1_4_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_1_4_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_2_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_2_0_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_CLIENT_1_1_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_CLIENT_1_1_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_CLIENT_1_2_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_CLIENT_1_2_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_CLIENT_1_3_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_CLIENT_1_3_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_CLIENT_1_4_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_CLIENT_1_4_XSD);
- } else if ( systemId.endsWith(WEBSERVICES_CLIENT_2_0_XSD)) {
- return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBSERVICES_CLIENT_2_0_XSD);
+ SCHEMASLOCATION = f2;
+ }
+
+ if (systemId != null) {
+ for(String schema : SUPPORTED_SCHEMAS) {
+ if (systemId.endsWith(schema)) {
+ File schemaFile = new File(SCHEMASLOCATION, schema);
+ if(! schemaFile.exists()) {
+ return null;
+ } else {
+ return new org.xml.sax.InputSource(Utilities.toURI(schemaFile).toURL().toExternalForm());
+ }
+ }
}
- // weblogic
- else if ( systemId.endsWith("weblogic-web-app.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-web-app.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-ejb-jar.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-ejb-jar.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-application.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-application.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-application-client.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-application-client.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-connector.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-connector.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-javaee.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-javaee.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-jms.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-jms.xsd"); //NOI18N
- } else if ( systemId.endsWith("weblogic-webservices.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"weblogic-webservices.xsd"); //NOI18N
- } else if ( systemId.endsWith("jdbc-data-source.xsd")) { //NOI18N
- return new org.xml.sax.InputSource(SCHEMASLOCATION+"jdbc-data-source.xsd"); //NOI18N
- } else if (XML_XSD.equals(systemId)) {
+ if (XML_XSD.equals(systemId)) {
return new org.xml.sax.InputSource(new java.io.StringReader(XML_XSD_DEF));
}
}
+
return null;
}
-
+
@Override
public Enumeration enabled(GrammarEnvironment ctx) {
if (ctx.getFileObject() == null) return null;
@@ -895,16 +857,16 @@ public Enumeration enabled(GrammarEnvironment ctx) {
Element element = (Element) next;
String tag = element.getTagName();
String xmlns = element.getAttribute(XMLNS_ATTR);
- if ( xmlns != null && ( EJB_JAR_TAG.equals(tag) || APP_TAG.equals(tag)
- || WEBAPP_TAG.equals(tag) || APPCLIENT_TAG.equals(tag)
- || PERSISTENCEORM_TAG.equals(tag) || PERSISTENCE_TAG.equals(tag)
- || WEBSERVICES_TAG.equals(tag) ) ) { // NOI18N
-
- if ( J2EE_NS.equals(xmlns)
- || JAVAEE_NS.equals(xmlns)
- || NEW_JAVAEE_NS.equals(xmlns)
- || JAKARTAEE_NS.equals(xmlns) ) { // NOI18N
- Vector v = new Vector();
+ if (xmlns != null && (EJB_JAR_TAG.equals(tag) || APP_TAG.equals(tag)
+ || WEBAPP_TAG.equals(tag) || APPCLIENT_TAG.equals(tag)
+ || PERSISTENCEORM_TAG.equals(tag) || PERSISTENCE_TAG.equals(tag)
+ || WEBSERVICES_TAG.equals(tag))) { // NOI18N
+
+ if (J2EE_NS.equals(xmlns)
+ || JAVAEE_NS.equals(xmlns)
+ || NEW_JAVAEE_NS.equals(xmlns)
+ || JAKARTAEE_NS.equals(xmlns)) { // NOI18N
+ Vector v = new Vector<>();
v.add(next);
return v.elements();
// return org.openide.util.Enumerations.singleton(next);
@@ -914,12 +876,12 @@ public Enumeration enabled(GrammarEnvironment ctx) {
}
return null;
}
-
+
@Override
public FeatureDescriptor getDescriptor() {
return new FeatureDescriptor();
}
-
+
/** Returns pseudo DTD for code completion
*/
@Override
@@ -931,16 +893,16 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
//System.out.println(is.getSystemId());
//System.out.println(is);
if (catalog != null) {
-
+
EntityResolver resolver = catalog.getEntityResolver();
if (resolver != null) {
try {
-
+
if (ctx.getFileObject() == null) {
return null;
}
- InputSource inputSource = null;
-
+ InputSource inputSource = null;
+
String mimeType = ctx.getFileObject().getMIMEType();
if (mimeType == null){
return null;
@@ -961,6 +923,12 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
case "text/x-dd-ejbjar2.1": // NOI18N
inputSource = resolver.resolveEntity(EJBJAR_2_1_ID, "");
break;
+ case "text/x-dd-application11.0": // NOI18N
+ inputSource = resolver.resolveEntity(APP_11_ID, "");
+ break;
+ case "text/x-dd-application10.0": // NOI18N
+ inputSource = resolver.resolveEntity(APP_10_ID, "");
+ break;
case "text/x-dd-application9.0": // NOI18N
inputSource = resolver.resolveEntity(APP_9_ID, "");
break;
@@ -979,6 +947,12 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
case "text/x-dd-application1.4": // NOI18N
inputSource = resolver.resolveEntity(APP_1_4_ID, "");
break;
+ case "text/x-dd-client11.0": // NOI18N
+ inputSource = resolver.resolveEntity(APPCLIENT_11_ID, "");
+ break;
+ case "text/x-dd-client10.0": // NOI18N
+ inputSource = resolver.resolveEntity(APPCLIENT_10_ID, "");
+ break;
case "text/x-dd-client9.0": // NOI18N
inputSource = resolver.resolveEntity(APPCLIENT_9_ID, "");
break;
@@ -997,6 +971,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
case "text/x-dd-client1.4": // NOI18N
inputSource = resolver.resolveEntity(APPCLIENT_1_4_ID, "");
break;
+ case "text/x-dd-servlet6.1": // NOI18N
+ inputSource = resolver.resolveEntity(WEBAPP_6_1_ID, "");
+ break;
case "text/x-dd-servlet6.0": // NOI18N
inputSource = resolver.resolveEntity(WEBAPP_6_0_ID, "");
break;
@@ -1015,6 +992,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
case "text/x-dd-servlet2.5": // NOI18N
inputSource = resolver.resolveEntity(WEBAPP_2_5_ID, "");
break;
+ case "text/x-dd-servlet-fragment6.1": // NOI18N
+ inputSource = resolver.resolveEntity(WEBFRAGMENT_6_1_ID, "");
+ break;
case "text/x-dd-servlet-fragment6.0": // NOI18N
inputSource = resolver.resolveEntity(WEBFRAGMENT_6_0_ID, "");
break;
@@ -1030,6 +1010,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
case "text/x-dd-servlet-fragment3.0": // NOI18N
inputSource = resolver.resolveEntity(WEBFRAGMENT_3_0_ID, "");
break;
+ case "text/x-persistence3.2": // NOI18N
+ inputSource = resolver.resolveEntity(PERSISTENCE_3_2_ID, "");
+ break;
case "text/x-persistence3.1": // NOI18N
inputSource = resolver.resolveEntity(PERSISTENCE_3_1_ID, "");
break;
@@ -1048,6 +1031,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
case "text/x-persistence1.0": // NOI18N
inputSource = resolver.resolveEntity(PERSISTENCE_ID, "");
break;
+ case "text/x-orm3.2": // NOI18N
+ inputSource = resolver.resolveEntity(PERSISTENCEORM_3_2_ID, "");
+ break;
case "text/x-orm3.1": // NOI18N
inputSource = resolver.resolveEntity(PERSISTENCEORM_3_1_ID, "");
break;
@@ -1073,7 +1059,7 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
if (inputSource != null) {
return DTDUtil.parseDTD(true, inputSource);
}
-
+
if (is.getSystemId().endsWith("webservices.xml") ) { // NOI18N
// System.out.println("webservices tag");
inputSource = resolver.resolveEntity(WEBSERVICES_1_1_ID, "");
@@ -1081,11 +1067,11 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
return DTDUtil.parseDTD(true, inputSource);
}
}
-
+
} catch(SAXException e) {
} catch(java.io.IOException e) {
//System.out.println("eeee");
- e.printStackTrace();
+ LOGGER.log(Level.WARNING, null, e);
}
}
}
@@ -1094,6 +1080,8 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) {
/**
* Get registered URI for the given name or null if not registered.
+ *
+ * @param name
* @return null if not registered
*/
@Override
@@ -1105,34 +1093,37 @@ public String resolveURI(String name) {
if (!platformRootDir.exists()) {
return null;
}
- String installRoot = platformRootDir.getAbsolutePath();
- String prefix ="";
- File file = new File(installRoot+"/lib/schemas/");
- try{
- prefix= file.toURI().toURL().toExternalForm();
- }catch(Exception e){
- Logger.getLogger("glassfish-javaee").log(Level.INFO, file.getAbsolutePath(), e); // NOI18N
+ String installRoot = platformRootDir.getAbsolutePath();
+ String prefix = "";
+ File file = new File(installRoot + "/lib/schemas/");
+ try {
+ prefix = Utilities.toURI(file).toURL().toExternalForm();
+ } catch (RuntimeException | MalformedURLException e) {
+ LOGGER.log(Level.INFO, file.getAbsolutePath(), e); // NOI18N
}
- if (name.equals("http://java.sun.com/xml/ns/jax-rpc/ri/config")){
- return prefix +"jax-rpc-ri-config.xsd";
+ if (name.equals("http://java.sun.com/xml/ns/jax-rpc/ri/config")) {
+ return prefix + "jax-rpc-ri-config.xsd";
}
// if (name.equals("http://java.sun.com/xml/ns/persistence")){
// System.out.println("prefix +persistence.xsd="+ prefix +"persistence.xsd");
// return prefix +"persistence.xsd";
-// }
+// }
// ludo: this is meant to be this way.
- if (name.equals("http://java.sun.com/xml/ns/j2eeppppppp")){
- return prefix +"j2ee_web_services_1_1.xsd";
+ if (name.equals("http://java.sun.com/xml/ns/j2eeppppppp")) {
+ return prefix + "j2ee_web_services_1_1.xsd";
}
-
+
return null;
}
+
/**
* Get registered URI for the given publicId or null if not registered.
+ *
+ * @param publicId
* @return null if not registered
- */
+ */
@Override
public String resolvePublic(String publicId) {
return null;
- }
+ }
}
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/db/DbUtil.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/db/DbUtil.java
index ac5c78a9a261..f5dafdf696bd 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/db/DbUtil.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/db/DbUtil.java
@@ -81,7 +81,7 @@ public static Map normalizePoolMap(Map poolValue
String password = poolValues.get(__Password);
String user = poolValues.get(__User);
- if (driverClassName.indexOf("pointbase") != -1) {
+ if (driverClassName != null && driverClassName.indexOf("pointbase") != -1) {
url = poolValues.get(__DatabaseName);
}
// Search for server name key should be case insensitive.
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2TargetModuleID.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2TargetModuleID.java
index dc88498be24b..7b6b8c30acbc 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2TargetModuleID.java
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2TargetModuleID.java
@@ -111,7 +111,7 @@ public TargetModuleID getParentTargetModuleID() {
}
public TargetModuleID [] getChildTargetModuleID() {
- return children.toArray(new TargetModuleID[children.size()]);
+ return children.toArray(TargetModuleID[]::new);
}
public void setParent(Hk2TargetModuleID parent) {
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml
index 6cac2ce5dbc7..8e55afc6fcd9 100644
--- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml
@@ -407,13 +407,74 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -424,7 +485,7 @@
-
+
diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/nbdepjakartaee11.xml b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/nbdepjakartaee11.xml
new file mode 100644
index 000000000000..a34755601895
--- /dev/null
+++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/nbdepjakartaee11.xml
@@ -0,0 +1,54 @@
+
+
+
+ org/netbeans/modules/glassfish/common/resources/server
+
+
+ deployer:gfv800ee11
+
+
+
+
+ /
+ contextRoot
+
+
+
diff --git a/enterprise/glassfish.tooling/manifest.mf b/enterprise/glassfish.tooling/manifest.mf
index d020f619f4cc..0a8fd416b5c1 100644
--- a/enterprise/glassfish.tooling/manifest.mf
+++ b/enterprise/glassfish.tooling/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.glassfish.tooling/0
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/tooling/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.30
+OpenIDE-Module-Specification-Version: 1.32
diff --git a/enterprise/glassfish.tooling/nbproject/org-netbeans-modules-glassfish-tooling.sig b/enterprise/glassfish.tooling/nbproject/org-netbeans-modules-glassfish-tooling.sig
index cecbe71f931c..39653d84aedf 100644
--- a/enterprise/glassfish.tooling/nbproject/org-netbeans-modules-glassfish-tooling.sig
+++ b/enterprise/glassfish.tooling/nbproject/org-netbeans-modules-glassfish-tooling.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.29
+#Version 1.30
CLSS public abstract interface java.io.Closeable
intf java.lang.AutoCloseable
@@ -1416,6 +1416,8 @@ fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVer
fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_6_2_5
fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_0
fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_1
+fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_10
+fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_11
fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_2
fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_3
fld public final static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion GF_7_0_4
@@ -1445,7 +1447,7 @@ meth public static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion
meth public static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion valueOf(java.lang.String)
meth public static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion[] values()
supr java.lang.Enum
-hfds GF_1_STR,GF_1_STR_NEXT,GF_2_1_1_STR,GF_2_1_1_STR_NEXT,GF_2_1_STR,GF_2_1_STR_NEXT,GF_2_STR,GF_2_STR_NEXT,GF_3_0_1_STR,GF_3_0_1_STR_NEXT,GF_3_1_1_STR,GF_3_1_1_STR_NEXT,GF_3_1_2_2_STR,GF_3_1_2_3_STR,GF_3_1_2_4_STR,GF_3_1_2_5_STR,GF_3_1_2_STR,GF_3_1_2_STR_NEXT,GF_3_1_STR,GF_3_1_STR_NEXT,GF_3_STR,GF_3_STR_NEXT,GF_4_0_1_STR,GF_4_0_1_STR_NEXT,GF_4_1_1_STR,GF_4_1_1_STR_NEXT,GF_4_1_2_STR,GF_4_1_2_STR_NEXT,GF_4_1_STR,GF_4_1_STR_NEXT,GF_4_STR,GF_4_STR_NEXT,GF_5_0_1_STR,GF_5_0_1_STR_NEXT,GF_5_1_0_STR,GF_5_1_0_STR_NEXT,GF_5_STR,GF_5_STR_NEXT,GF_6_1_0_STR,GF_6_1_0_STR_NEXT,GF_6_2_0_STR,GF_6_2_0_STR_NEXT,GF_6_2_1_STR,GF_6_2_1_STR_NEXT,GF_6_2_2_STR,GF_6_2_2_STR_NEXT,GF_6_2_3_STR,GF_6_2_3_STR_NEXT,GF_6_2_4_STR,GF_6_2_4_STR_NEXT,GF_6_2_5_STR,GF_6_2_5_STR_NEXT,GF_6_STR,GF_6_STR_NEXT,GF_7_0_0_STR,GF_7_0_0_STR_NEXT,GF_7_0_1_STR,GF_7_0_1_STR_NEXT,GF_7_0_2_STR,GF_7_0_2_STR_NEXT,GF_7_0_3_STR,GF_7_0_3_STR_NEXT,GF_7_0_4_STR,GF_7_0_4_STR_NEXT,GF_7_0_5_STR,GF_7_0_5_STR_NEXT,GF_7_0_6_STR,GF_7_0_6_STR_NEXT,GF_7_0_7_STR,GF_7_0_7_STR_NEXT,GF_7_0_8_STR,GF_7_0_8_STR_NEXT,GF_7_0_9_STR,GF_7_0_9_STR_NEXT,build,major,minor,stringValuesMap,update,value
+hfds GF_1_STR,GF_1_STR_NEXT,GF_2_1_1_STR,GF_2_1_1_STR_NEXT,GF_2_1_STR,GF_2_1_STR_NEXT,GF_2_STR,GF_2_STR_NEXT,GF_3_0_1_STR,GF_3_0_1_STR_NEXT,GF_3_1_1_STR,GF_3_1_1_STR_NEXT,GF_3_1_2_2_STR,GF_3_1_2_3_STR,GF_3_1_2_4_STR,GF_3_1_2_5_STR,GF_3_1_2_STR,GF_3_1_2_STR_NEXT,GF_3_1_STR,GF_3_1_STR_NEXT,GF_3_STR,GF_3_STR_NEXT,GF_4_0_1_STR,GF_4_0_1_STR_NEXT,GF_4_1_1_STR,GF_4_1_1_STR_NEXT,GF_4_1_2_STR,GF_4_1_2_STR_NEXT,GF_4_1_STR,GF_4_1_STR_NEXT,GF_4_STR,GF_4_STR_NEXT,GF_5_0_1_STR,GF_5_0_1_STR_NEXT,GF_5_1_0_STR,GF_5_1_0_STR_NEXT,GF_5_STR,GF_5_STR_NEXT,GF_6_1_0_STR,GF_6_1_0_STR_NEXT,GF_6_2_0_STR,GF_6_2_0_STR_NEXT,GF_6_2_1_STR,GF_6_2_1_STR_NEXT,GF_6_2_2_STR,GF_6_2_2_STR_NEXT,GF_6_2_3_STR,GF_6_2_3_STR_NEXT,GF_6_2_4_STR,GF_6_2_4_STR_NEXT,GF_6_2_5_STR,GF_6_2_5_STR_NEXT,GF_6_STR,GF_6_STR_NEXT,GF_7_0_0_STR,GF_7_0_0_STR_NEXT,GF_7_0_10_STR,GF_7_0_10_STR_NEXT,GF_7_0_11_STR,GF_7_0_11_STR_NEXT,GF_7_0_1_STR,GF_7_0_1_STR_NEXT,GF_7_0_2_STR,GF_7_0_2_STR_NEXT,GF_7_0_3_STR,GF_7_0_3_STR_NEXT,GF_7_0_4_STR,GF_7_0_4_STR_NEXT,GF_7_0_5_STR,GF_7_0_5_STR_NEXT,GF_7_0_6_STR,GF_7_0_6_STR_NEXT,GF_7_0_7_STR,GF_7_0_7_STR_NEXT,GF_7_0_8_STR,GF_7_0_8_STR_NEXT,GF_7_0_9_STR,GF_7_0_9_STR_NEXT,build,major,minor,stringValuesMap,update,value
CLSS public org.netbeans.modules.glassfish.tooling.data.IdeContext
anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="")
@@ -1727,7 +1729,7 @@ meth public static java.net.URL getBuilderConfig(org.netbeans.modules.glassfish.
meth public static org.netbeans.modules.glassfish.tooling.server.config.ConfigBuilder getBuilder(org.netbeans.modules.glassfish.tooling.data.GlassFishServer)
meth public static void destroyBuilder(org.netbeans.modules.glassfish.tooling.data.GlassFishServer)
supr java.lang.Object
-hfds CONFIG_V3,CONFIG_V4,CONFIG_V4_1,CONFIG_V5,CONFIG_V5_0_1,CONFIG_V5_1,CONFIG_V6,CONFIG_V6_1_0,CONFIG_V6_2_0,CONFIG_V6_2_1,CONFIG_V6_2_2,CONFIG_V6_2_3,CONFIG_V6_2_4,CONFIG_V6_2_5,CONFIG_V7_0_0,CONFIG_V7_0_1,CONFIG_V7_0_2,CONFIG_V7_0_3,CONFIG_V7_0_4,CONFIG_V7_0_5,CONFIG_V7_0_6,CONFIG_V7_0_7,CONFIG_V7_0_8,CONFIG_V7_0_9,builders,config
+hfds CONFIG_V3,CONFIG_V4,CONFIG_V4_1,CONFIG_V5,CONFIG_V5_0_1,CONFIG_V5_1,CONFIG_V6,CONFIG_V6_1_0,CONFIG_V6_2_0,CONFIG_V6_2_1,CONFIG_V6_2_2,CONFIG_V6_2_3,CONFIG_V6_2_4,CONFIG_V6_2_5,CONFIG_V7_0_0,CONFIG_V7_0_1,CONFIG_V7_0_10,CONFIG_V7_0_11,CONFIG_V7_0_2,CONFIG_V7_0_3,CONFIG_V7_0_4,CONFIG_V7_0_5,CONFIG_V7_0_6,CONFIG_V7_0_7,CONFIG_V7_0_8,CONFIG_V7_0_9,builders,config
CLSS public org.netbeans.modules.glassfish.tooling.server.config.ConfigUtils
cons public init()
@@ -1859,6 +1861,7 @@ fld public final static org.netbeans.modules.glassfish.tooling.server.config.Jav
fld public final static org.netbeans.modules.glassfish.tooling.server.config.JavaSEPlatform v20
fld public final static org.netbeans.modules.glassfish.tooling.server.config.JavaSEPlatform v21
fld public final static org.netbeans.modules.glassfish.tooling.server.config.JavaSEPlatform v22
+fld public final static org.netbeans.modules.glassfish.tooling.server.config.JavaSEPlatform v23
meth public java.lang.String toString()
meth public static org.netbeans.modules.glassfish.tooling.server.config.JavaSEPlatform toValue(java.lang.String)
meth public static org.netbeans.modules.glassfish.tooling.server.config.JavaSEPlatform valueOf(java.lang.String)
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
index 98a3b277edcb..0affc06f8268 100644
--- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
@@ -120,7 +120,15 @@ public enum GlassFishVersion {
/** GlassFish 7.0.10 */
GF_7_0_10 ((short) 7, (short) 0, (short) 10, (short) 0, GlassFishVersion.GF_7_0_10_STR),
/** GlassFish 7.0.11 */
- GF_7_0_11 ((short) 7, (short) 0, (short) 11, (short) 0, GlassFishVersion.GF_7_0_11_STR);
+ GF_7_0_11 ((short) 7, (short) 0, (short) 11, (short) 0, GlassFishVersion.GF_7_0_11_STR),
+ /** GlassFish 7.0.12 */
+ GF_7_0_12 ((short) 7, (short) 0, (short) 12, (short) 0, GlassFishVersion.GF_7_0_12_STR),
+ /** GlassFish 7.0.13 */
+ GF_7_0_13 ((short) 7, (short) 0, (short) 13, (short) 0, GlassFishVersion.GF_7_0_13_STR),
+ /** GlassFish 7.0.14 */
+ GF_7_0_14 ((short) 7, (short) 0, (short) 14, (short) 0, GlassFishVersion.GF_7_0_14_STR),
+ /** GlassFish 8.0.0 */
+ GF_8_0_0 ((short) 8, (short) 0, (short) 0, (short) 0, GlassFishVersion.GF_8_0_0_STR);
////////////////////////////////////////////////////////////////////////////
// Class attributes //
////////////////////////////////////////////////////////////////////////////
@@ -331,6 +339,26 @@ public enum GlassFishVersion {
/** Additional {@code String} representations of GF_7_0_11 value. */
static final String GF_7_0_11_STR_NEXT[] = {"7.0.11", "7.0.11.0"};
+ /** A {@code String} representation of GF_7_0_12 value. */
+ static final String GF_7_0_12_STR = "7.0.12";
+ /** Additional {@code String} representations of GF_7_0_12 value. */
+ static final String GF_7_0_12_STR_NEXT[] = {"7.0.12", "7.0.12.0"};
+
+ /** A {@code String} representation of GF_7_0_13 value. */
+ static final String GF_7_0_13_STR = "7.0.13";
+ /** Additional {@code String} representations of GF_7_0_13 value. */
+ static final String GF_7_0_13_STR_NEXT[] = {"7.0.13", "7.0.13.0"};
+
+ /** A {@code String} representation of GF_7_0_14 value. */
+ static final String GF_7_0_14_STR = "7.0.14";
+ /** Additional {@code String} representations of GF_7_0_14 value. */
+ static final String GF_7_0_14_STR_NEXT[] = {"7.0.14", "7.0.14.0"};
+
+ /** A {@code String} representation of GF_8_0_0 value. */
+ static final String GF_8_0_0_STR = "8.0.0";
+ /** Additional {@code String} representations of GF_8_0_0 value. */
+ static final String GF_8_0_0_STR_NEXT[] = {"8.0.0", "8.0.0.0"};
+
/**
* Stored String values for backward String
* conversion.
@@ -379,6 +407,10 @@ public enum GlassFishVersion {
initStringValuesMapFromArray(GF_7_0_9, GF_7_0_9_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_10, GF_7_0_10_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_11, GF_7_0_11_STR_NEXT);
+ initStringValuesMapFromArray(GF_7_0_12, GF_7_0_12_STR_NEXT);
+ initStringValuesMapFromArray(GF_7_0_13, GF_7_0_13_STR_NEXT);
+ initStringValuesMapFromArray(GF_7_0_14, GF_7_0_14_STR_NEXT);
+ initStringValuesMapFromArray(GF_8_0_0, GF_8_0_0_STR_NEXT);
}
////////////////////////////////////////////////////////////////////////////
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java
index 7ce0531bd0df..a44b7584cd3a 100644
--- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java
@@ -174,6 +174,26 @@ public class ConfigBuilderProvider {
= new Config.Next(GlassFishVersion.GF_7_0_11,
ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));
+ /** Library builder configuration since GlassFish 7.0.12. */
+ private static final Config.Next CONFIG_V7_0_12
+ = new Config.Next(GlassFishVersion.GF_7_0_12,
+ ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));
+
+ /** Library builder configuration since GlassFish 7.0.13. */
+ private static final Config.Next CONFIG_V7_0_13
+ = new Config.Next(GlassFishVersion.GF_7_0_13,
+ ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));
+
+ /** Library builder configuration since GlassFish 7.0.14. */
+ private static final Config.Next CONFIG_V7_0_14
+ = new Config.Next(GlassFishVersion.GF_7_0_14,
+ ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));
+
+ /** Library builder configuration since GlassFish 8.0.0. */
+ private static final Config.Next CONFIG_V8_0_0
+ = new Config.Next(GlassFishVersion.GF_8_0_0,
+ ConfigBuilderProvider.class.getResource("GlassFishV8_0_0.xml"));
+
/** Library builder configuration for GlassFish cloud. */
private static final Config config
= new Config(CONFIG_V3, CONFIG_V4, CONFIG_V4_1, CONFIG_V5,
@@ -183,7 +203,9 @@ public class ConfigBuilderProvider {
CONFIG_V7_0_0, CONFIG_V7_0_1, CONFIG_V7_0_2,
CONFIG_V7_0_3, CONFIG_V7_0_4, CONFIG_V7_0_5,
CONFIG_V7_0_6, CONFIG_V7_0_7, CONFIG_V7_0_8,
- CONFIG_V7_0_9, CONFIG_V7_0_10, CONFIG_V7_0_11);
+ CONFIG_V7_0_9, CONFIG_V7_0_10, CONFIG_V7_0_11,
+ CONFIG_V7_0_12, CONFIG_V7_0_13, CONFIG_V7_0_14,
+ CONFIG_V8_0_0);
/** Builders array for each server instance. */
private static final ConcurrentMap builders
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV8_0_0.xml b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV8_0_0.xml
new file mode 100644
index 000000000000..02a55b5eef3e
--- /dev/null
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV8_0_0.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java
index a9a6ad5e0037..b0b09be4e27f 100644
--- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java
+++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java
@@ -84,7 +84,13 @@ public enum JavaEEProfile {
v10_0_0_web(Version.v10_0_0, Type.WEB, "10.0.0-web"),
/** JakartaEE 10 full profile. */
- v10_0_0(Version.v10_0_0, Type.FULL, "10.0.0");
+ v10_0_0(Version.v10_0_0, Type.FULL, "10.0.0"),
+
+ /** JakartaEE 11 web profile. */
+ v11_0_0_web(Version.v11_0_0, Type.WEB, "11.0.0-web"),
+
+ /** JakartaEE 11 full profile. */
+ v11_0_0(Version.v11_0_0, Type.FULL, "11.0.0");
////////////////////////////////////////////////////////////////////////////
// Inner enums //
@@ -144,7 +150,9 @@ public enum Version {
/** JakartaEE 9.1. */
v9_1_0("9.1.0"),
/** JakartaEE 10 */
- v10_0_0("10.0.0");
+ v10_0_0("10.0.0"),
+ /** JakartaEE 11 */
+ v11_0_0("11.0.0");
/** JavaEE profile type name. */
private final String name;
diff --git a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java
index 8f7d9455e35c..6e2d1ab002a7 100644
--- a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java
+++ b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java
@@ -168,7 +168,7 @@ public void testGetInstanceforVersionGF6() {
}
/**
- * Test factory functionality for GlassFish v. 7.0.11
+ * Test factory functionality for GlassFish v. 7.0.14
*
* Factory should initialize REST {@code Runner} and point it to
* provided {@code Command} instance.
@@ -176,7 +176,33 @@ public void testGetInstanceforVersionGF6() {
@Test
public void testGetInstanceforVersionGF7() {
GlassFishServerEntity srv = new GlassFishServerEntity();
- srv.setVersion(GlassFishVersion.GF_7_0_11);
+ srv.setVersion(GlassFishVersion.GF_7_0_14);
+ AdminFactory af = AdminFactory.getInstance(srv.getVersion());
+ assertTrue(af instanceof AdminFactoryRest);
+ Command cmd = new CommandVersion();
+ Runner runner;
+ try {
+ runner = af.getRunner(srv, cmd);
+ } catch (GlassFishIdeException gfie) {
+ runner = null;
+ fail("Exception in Runner initialization: " + gfie.getMessage());
+ }
+ // Returned runner should be REST interface.
+ assertTrue(runner instanceof RunnerRest);
+ // Stored command entity should be the one we supplied.
+ assertTrue(cmd.equals(runner.getCommand()));
+ }
+
+ /**
+ * Test factory functionality for GlassFish v. 8.0.0
+ *
+ * Factory should initialize REST {@code Runner} and point it to
+ * provided {@code Command} instance.
+ */
+ @Test
+ public void testGetInstanceforVersionGF8() {
+ GlassFishServerEntity srv = new GlassFishServerEntity();
+ srv.setVersion(GlassFishVersion.GF_8_0_0);
AdminFactory af = AdminFactory.getInstance(srv.getVersion());
assertTrue(af instanceof AdminFactoryRest);
Command cmd = new CommandVersion();
diff --git a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java
index 5fa8fabfa8ac..44dde392c56a 100644
--- a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java
+++ b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java
@@ -121,6 +121,14 @@ public void testToValue() {
GlassFishVersion.GF_7_0_10_STR_NEXT);
verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_11,
GlassFishVersion.GF_7_0_11_STR_NEXT);
+ verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_12,
+ GlassFishVersion.GF_7_0_12_STR_NEXT);
+ verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_13,
+ GlassFishVersion.GF_7_0_13_STR_NEXT);
+ verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_14,
+ GlassFishVersion.GF_7_0_14_STR_NEXT);
+ verifyToValueFromAdditionalArray(GlassFishVersion.GF_8_0_0,
+ GlassFishVersion.GF_8_0_0_STR_NEXT);
}
/**
@@ -147,7 +155,9 @@ public void testToValueIncomplete() {
GlassFishVersion.GF_7_0_4, GlassFishVersion.GF_7_0_5,
GlassFishVersion.GF_7_0_6, GlassFishVersion.GF_7_0_7,
GlassFishVersion.GF_7_0_8, GlassFishVersion.GF_7_0_9,
- GlassFishVersion.GF_7_0_10, GlassFishVersion.GF_7_0_11
+ GlassFishVersion.GF_7_0_10, GlassFishVersion.GF_7_0_11,
+ GlassFishVersion.GF_7_0_12, GlassFishVersion.GF_7_0_13,
+ GlassFishVersion.GF_7_0_14, GlassFishVersion.GF_8_0_0
};
String strings[] = {
"1.0.1.4", "2.0.1.5", "2.1.0.3", "2.1.1.7",
@@ -159,7 +169,8 @@ public void testToValueIncomplete() {
"6.2.4.0", "6.2.5.0", "7.0.0.0", "7.0.1.0",
"7.0.2.0", "7.0.3.0", "7.0.4.0", "7.0.5.0",
"7.0.6.0", "7.0.7.0", "7.0.8.0", "7.0.9.0",
- "7.0.10.0", "7.0.11.0"
+ "7.0.10.0", "7.0.11.0", "7.0.12.0", "7.0.13.0",
+ "7.0.14.0", "8.0.0.0"
};
for (int i = 0; i < versions.length; i++) {
GlassFishVersion version = GlassFishVersion.toValue(strings[i]);
diff --git a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java
index 0b272a43beb4..a2b7204f93eb 100644
--- a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java
+++ b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java
@@ -21,7 +21,8 @@
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_3;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_4;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_6_2_5;
-import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_7_0_11;
+import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_7_0_14;
+import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_8_0_0;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import org.testng.annotations.Test;
@@ -47,8 +48,10 @@ public class EnumUtilsTest {
*/
@Test
public void testEq() {
- assertFalse(EnumUtils.eq(GF_7_0_11, GF_6_2_5), "Equals for a > b shall be false.");
- assertTrue(EnumUtils.eq(GF_7_0_11, GF_7_0_11), "Equals for a == b shall be true.");
+ assertFalse(EnumUtils.eq(GF_8_0_0, GF_7_0_14), "Equals for a > b shall be false.");
+ assertTrue(EnumUtils.eq(GF_8_0_0, GF_8_0_0), "Equals for a == b shall be true.");
+ assertFalse(EnumUtils.eq(GF_7_0_14, GF_6_2_5), "Equals for a > b shall be false.");
+ assertTrue(EnumUtils.eq(GF_7_0_14, GF_7_0_14), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_4, GF_3), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_4, GF_4), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_3, GF_4), "Equals for a < b shall be false.");
@@ -69,8 +72,10 @@ public void testEq() {
*/
@Test
public void testNe() {
- assertTrue(EnumUtils.ne(GF_7_0_11, GF_6_2_5), "Not equals for a > b shall be true.");
- assertFalse(EnumUtils.ne(GF_7_0_11, GF_7_0_11), "Not equals for a == b shall be false.");
+ assertTrue(EnumUtils.ne(GF_8_0_0, GF_7_0_14), "Not equals for a > b shall be true.");
+ assertFalse(EnumUtils.ne(GF_8_0_0, GF_8_0_0), "Not equals for a == b shall be false.");
+ assertTrue(EnumUtils.ne(GF_7_0_14, GF_6_2_5), "Not equals for a > b shall be true.");
+ assertFalse(EnumUtils.ne(GF_7_0_14, GF_7_0_14), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_4, GF_3), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_4, GF_4), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_3, GF_4), "Not equals for a < b shall be true.");
@@ -91,8 +96,10 @@ public void testNe() {
*/
@Test
public void testLt() {
- assertFalse(EnumUtils.lt(GF_7_0_11, GF_6_2_5), "Less than for a > b shall be false.");
- assertFalse(EnumUtils.lt(GF_7_0_11, GF_7_0_11), "Less than for a == b shall be false.");
+ assertFalse(EnumUtils.lt(GF_8_0_0, GF_7_0_14), "Less than for a > b shall be false.");
+ assertFalse(EnumUtils.lt(GF_8_0_0, GF_8_0_0), "Less than for a == b shall be false.");
+ assertFalse(EnumUtils.lt(GF_7_0_14, GF_6_2_5), "Less than for a > b shall be false.");
+ assertFalse(EnumUtils.lt(GF_7_0_14, GF_7_0_14), "Less than for a == b shall be false.");
assertFalse(EnumUtils.lt(GF_4, GF_3), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_4, GF_4), "Less than for a == b shall be false.");
assertTrue(EnumUtils.lt(GF_3, GF_4), "Less than for a < b shall be true.");
@@ -113,8 +120,10 @@ public void testLt() {
*/
@Test
public void testLe() {
- assertFalse(EnumUtils.le(GF_7_0_11, GF_6_2_5), "Less than or equal for a > b shall be false.");
- assertTrue(EnumUtils.le(GF_7_0_11, GF_7_0_11), "Less than or equal for a == b shall be true.");
+ assertFalse(EnumUtils.le(GF_8_0_0, GF_7_0_14), "Less than or equal for a > b shall be false.");
+ assertTrue(EnumUtils.le(GF_8_0_0, GF_8_0_0), "Less than or equal for a == b shall be true.");
+ assertFalse(EnumUtils.le(GF_7_0_14, GF_6_2_5), "Less than or equal for a > b shall be false.");
+ assertTrue(EnumUtils.le(GF_7_0_14, GF_7_0_14), "Less than or equal for a == b shall be true.");
assertFalse(EnumUtils.le(GF_4, GF_3), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_4, GF_4), "Less than or equal for a == b shall be true.");
assertTrue(EnumUtils.le(GF_3, GF_4), "Less than or equal for a < b shall be true.");
@@ -135,8 +144,10 @@ public void testLe() {
*/
@Test
public void testGt() {
- assertTrue(EnumUtils.gt(GF_7_0_11, GF_6_2_5), "Greater than for a > b shall be true.");
- assertFalse(EnumUtils.gt(GF_7_0_11, GF_7_0_11), "Greater than for a == b shall be false.");
+ assertTrue(EnumUtils.gt(GF_8_0_0, GF_7_0_14), "Greater than for a > b shall be true.");
+ assertFalse(EnumUtils.gt(GF_8_0_0, GF_8_0_0), "Greater than for a == b shall be false.");
+ assertTrue(EnumUtils.gt(GF_7_0_14, GF_6_2_5), "Greater than for a > b shall be true.");
+ assertFalse(EnumUtils.gt(GF_7_0_14, GF_7_0_14), "Greater than for a == b shall be false.");
assertTrue(EnumUtils.gt(GF_4, GF_3), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_4, GF_4), "Greater than for a == b shall be false.");
assertFalse(EnumUtils.gt(GF_3, GF_4), "Greater than for a < b shall be false.");
@@ -157,8 +168,10 @@ public void testGt() {
*/
@Test
public void testGe() {
- assertTrue(EnumUtils.ge(GF_7_0_11, GF_6_2_5), "Greater than or equal for a > b shall be true.");
- assertTrue(EnumUtils.ge(GF_7_0_11, GF_7_0_11), "Greater than or equal for a == b shall be true.");
+ assertTrue(EnumUtils.ge(GF_8_0_0, GF_7_0_14), "Greater than or equal for a > b shall be true.");
+ assertTrue(EnumUtils.ge(GF_8_0_0, GF_8_0_0), "Greater than or equal for a == b shall be true.");
+ assertTrue(EnumUtils.ge(GF_7_0_14, GF_6_2_5), "Greater than or equal for a > b shall be true.");
+ assertTrue(EnumUtils.ge(GF_7_0_14, GF_7_0_14), "Greater than or equal for a == b shall be true.");
assertTrue(EnumUtils.ge(GF_4, GF_3), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_4, GF_4), "Greater than or equal for a == b shall be true.");
assertFalse(EnumUtils.ge(GF_3, GF_4), "Greater than or equal for a < b shall be false.");
diff --git a/enterprise/gradle.javaee/manifest.mf b/enterprise/gradle.javaee/manifest.mf
index 94177419eb2e..aab366fc5992 100644
--- a/enterprise/gradle.javaee/manifest.mf
+++ b/enterprise/gradle.javaee/manifest.mf
@@ -2,4 +2,4 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: true
OpenIDE-Module: org.netbeans.modules.gradle.javaee
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gradle/javaee/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.18
+OpenIDE-Module-Specification-Version: 1.20
diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java
index 5ed63c58b0e3..fc9c65609541 100644
--- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java
+++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java
@@ -55,12 +55,14 @@ public class GradleJavaEEProjectSettings implements JavaEEProjectSettingsImpleme
static final Map PROFILE_DEPENDENCIES = new LinkedHashMap<>();
static {
- PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:10.*", JAKARTA_EE_10_FULL);
- PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:10.*", JAKARTA_EE_10_WEB);
- PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:9.*", JAKARTA_EE_9_FULL);
- PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:9.*", JAKARTA_EE_9_WEB);
- PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:8.*", JAKARTA_EE_8_FULL);
- PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:8.*", JAKARTA_EE_8_WEB);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:11.*", JAKARTA_EE_11_FULL);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:11.*", JAKARTA_EE_11_WEB);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:10.*", JAKARTA_EE_10_FULL);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:10.*", JAKARTA_EE_10_WEB);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:9.*", JAKARTA_EE_9_FULL);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:9.*", JAKARTA_EE_9_WEB);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:8.*", JAKARTA_EE_8_FULL);
+ PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:8.*", JAKARTA_EE_8_WEB);
PROFILE_DEPENDENCIES.put("javax:javaee-api:8.*", JAVA_EE_8_FULL);
PROFILE_DEPENDENCIES.put("javax:javaee-web-api:8.*", JAVA_EE_8_WEB);
PROFILE_DEPENDENCIES.put("javax:javaee-api:7.*", JAVA_EE_7_FULL);
diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/JavaEESourcesImpl.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/JavaEESourcesImpl.java
index e3dff8b888d3..2b93272ae503 100644
--- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/JavaEESourcesImpl.java
+++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/JavaEESourcesImpl.java
@@ -107,7 +107,7 @@ public SourceGroup[] getSourceGroups(String str) {
if (webResourceRoots == null) {
webResourceRoots = getWebSourceGroups();
}
- return webResourceRoots.toArray(new SourceGroup[webResourceRoots.size()]);
+ return webResourceRoots.toArray(new SourceGroup[0]);
}
}
return new SourceGroup[0];
diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/api/ui/support/JavaEEServerComboBoxModel.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/api/ui/support/JavaEEServerComboBoxModel.java
index 05292337738f..b55cf69b86c6 100644
--- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/api/ui/support/JavaEEServerComboBoxModel.java
+++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/api/ui/support/JavaEEServerComboBoxModel.java
@@ -49,7 +49,7 @@ private JavaEEServerComboBoxModel(J2eeModule.Type moduleType, Profile javaeeProf
//Simply not add this item to the list
}
}
- platforms = order.toArray(new J2eePlatformModel[order.size()]);
+ platforms = order.toArray(new J2eePlatformModel[0]);
}
diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/WebModuleProviderImpl.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/WebModuleProviderImpl.java
index 9343f7a0546c..d0e1edbe2c2e 100644
--- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/WebModuleProviderImpl.java
+++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/WebModuleProviderImpl.java
@@ -99,7 +99,7 @@ public FileObject[] getSourceRoots() {
fos.add(fo);
}
}
- return fos.toArray(new FileObject[fos.size()]);
+ return fos.toArray(new FileObject[0]);
}
return super.getSourceRoots();
}
diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java
index d16a78ca615b..ecbfba272074 100644
--- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java
+++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java
@@ -157,14 +157,14 @@ private void cbServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
if (profile == Profile.JAVA_EE_6_FULL || profile == Profile.JAVA_EE_7_FULL
|| profile == Profile.JAVA_EE_8_FULL || profile == Profile.JAKARTA_EE_8_FULL
|| profile == Profile.JAKARTA_EE_9_FULL || profile == Profile.JAKARTA_EE_9_1_FULL
- || profile == Profile.JAKARTA_EE_10_FULL) {
+ || profile == Profile.JAKARTA_EE_10_FULL || profile == Profile.JAKARTA_EE_11_FULL) {
continue;
}
} else {
if (profile == Profile.JAVA_EE_6_WEB || profile == Profile.JAVA_EE_7_WEB
|| profile == Profile.JAVA_EE_8_WEB || profile == Profile.JAKARTA_EE_8_WEB
|| profile == Profile.JAKARTA_EE_9_WEB || profile == Profile.JAKARTA_EE_9_1_WEB
- || profile == Profile.JAKARTA_EE_10_WEB) {
+ || profile == Profile.JAKARTA_EE_10_WEB || profile == Profile.JAKARTA_EE_11_WEB) {
continue;
}
}
diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java
index 040515721bb4..c02263e1cad2 100644
--- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java
+++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java
@@ -109,6 +109,12 @@ public String getLicensePath() {
private static List webDependencies(String profileId) {
Profile profile = Profile.fromPropertiesString(profileId);
List ret = new LinkedList<>();
+ if (profile == Profile.JAKARTA_EE_11_WEB) {
+ ret.add("providedCompile 'jakarta.platform:jakarta.jakartaee-web-api:11.0.0'");
+ }
+ if (profile == Profile.JAKARTA_EE_11_FULL) {
+ ret.add("providedCompile 'jakarta.platform:jakarta.jakartaee-api:11.0.0'");
+ }
if (profile == Profile.JAKARTA_EE_10_WEB) {
ret.add("providedCompile 'jakarta.platform:jakarta.jakartaee-web-api:10.0.0'");
}
diff --git a/enterprise/j2ee.ant/nbproject/project.properties b/enterprise/j2ee.ant/nbproject/project.properties
index e75dba2d89db..44ecc45045ac 100644
--- a/enterprise/j2ee.ant/nbproject/project.properties
+++ b/enterprise/j2ee.ant/nbproject/project.properties
@@ -16,4 +16,4 @@
# under the License.
ant.jar=${ant.core.lib}
-spec.version.base=1.57.0
+spec.version.base=1.59.0
diff --git a/enterprise/j2ee.api.ejbmodule/manifest.mf b/enterprise/j2ee.api.ejbmodule/manifest.mf
index 431baf482f5c..ead89a7e3935 100644
--- a/enterprise/j2ee.api.ejbmodule/manifest.mf
+++ b/enterprise/j2ee.api.ejbmodule/manifest.mf
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.j2ee.api.ejbmodule
-OpenIDE-Module-Specification-Version: 1.60
+OpenIDE-Module-Specification-Version: 1.62
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/ejbjar/Bundle.properties
diff --git a/enterprise/j2ee.api.ejbmodule/nbproject/org-netbeans-modules-j2ee-api-ejbmodule.sig b/enterprise/j2ee.api.ejbmodule/nbproject/org-netbeans-modules-j2ee-api-ejbmodule.sig
index d989070f8cdd..0253790777ee 100644
--- a/enterprise/j2ee.api.ejbmodule/nbproject/org-netbeans-modules-j2ee-api-ejbmodule.sig
+++ b/enterprise/j2ee.api.ejbmodule/nbproject/org-netbeans-modules-j2ee-api-ejbmodule.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.59
+#Version 1.60
CLSS public abstract interface java.io.Serializable
diff --git a/enterprise/j2ee.clientproject/nbproject/org-netbeans-modules-j2ee-clientproject.sig b/enterprise/j2ee.clientproject/nbproject/org-netbeans-modules-j2ee-clientproject.sig
index 74f181437406..8e7539b42797 100644
--- a/enterprise/j2ee.clientproject/nbproject/org-netbeans-modules-j2ee-clientproject.sig
+++ b/enterprise/j2ee.clientproject/nbproject/org-netbeans-modules-j2ee-clientproject.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.68.0
+#Version 1.69.0
CLSS public java.lang.Object
cons public init()
diff --git a/enterprise/j2ee.clientproject/nbproject/project.properties b/enterprise/j2ee.clientproject/nbproject/project.properties
index 6242a8a34d1a..18ef632b61be 100644
--- a/enterprise/j2ee.clientproject/nbproject/project.properties
+++ b/enterprise/j2ee.clientproject/nbproject/project.properties
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-spec.version.base=1.69.0
+spec.version.base=1.71.0
javadoc.arch=${basedir}/arch.xml
javadoc.preview=true
javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientCompilationClassPathModifierImpl.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientCompilationClassPathModifierImpl.java
index 8a4ea18304f5..801e4d3c2e77 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientCompilationClassPathModifierImpl.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientCompilationClassPathModifierImpl.java
@@ -115,7 +115,7 @@ private static URI[] convertURLsToURIs(URL[] entry) {
for (URL url : entry) {
content.add(URI.create(url.toExternalForm()));
}
- return content.toArray(new URI[content.size()]);
+ return content.toArray(new URI[0]);
}
private static ClassPathUiSupport.Callback createClassPathUiSupportCallback(final String path) {
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java
index 989b684138e4..d488fd7944c3 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java
@@ -575,7 +575,7 @@ protected void projectOpened() {
libs.add(FileUtil.getArchiveRoot(children[i].toURL()));
}
}
- cpMod.getClassPathModifier().addRoots(libs.toArray(new URL[libs.size()]), ProjectProperties.JAVAC_CLASSPATH);
+ cpMod.getClassPathModifier().addRoots(libs.toArray(new URL[0]), ProjectProperties.JAVAC_CLASSPATH);
libFolder.addFileChangeListener (AppClientProject.this);
}
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java
index 21ba8c0aee2c..2aea1b1edc1f 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java
@@ -174,7 +174,7 @@ public File[] getRequiredLibraries() {
}
files.add(FileUtil.toFile(FileUtil.getArchiveFile(fo)));
}
- return files.toArray(new File[files.size()]);
+ return files.toArray(new File[0]);
}
@Override
@@ -351,24 +351,32 @@ public String getModuleVersion() {
if (p == null) {
return AppClient.VERSION_6_0;
}
- if (Profile.JAKARTA_EE_10_FULL.equals(p) || Profile.JAKARTA_EE_10_WEB.equals(p)) {
- return AppClient.VERSION_10_0;
- } else if (Profile.JAKARTA_EE_9_1_FULL.equals(p) || Profile.JAKARTA_EE_9_1_WEB.equals(p)) {
- return AppClient.VERSION_9_0;
- } else if (Profile.JAKARTA_EE_9_FULL.equals(p) || Profile.JAKARTA_EE_9_WEB.equals(p)) {
- return AppClient.VERSION_9_0;
- } else if (Profile.JAKARTA_EE_8_FULL.equals(p) || Profile.JAKARTA_EE_8_FULL.equals(p)) {
- return AppClient.VERSION_8_0;
- } else if (Profile.JAVA_EE_8_FULL.equals(p) || Profile.JAVA_EE_8_WEB.equals(p)) {
- return AppClient.VERSION_8_0;
- } else if (Profile.JAVA_EE_7_FULL.equals(p) || Profile.JAVA_EE_7_WEB.equals(p)) {
- return AppClient.VERSION_7_0;
- } else if (Profile.JAVA_EE_5.equals(p)) {
- return AppClient.VERSION_5_0;
- } else if (Profile.J2EE_14.equals(p)) {
- return AppClient.VERSION_1_4;
- } else {
- return AppClient.VERSION_6_0;
+ switch (p) {
+ case JAKARTA_EE_11_FULL:
+ case JAKARTA_EE_11_WEB:
+ return AppClient.VERSION_11_0;
+ case JAKARTA_EE_10_FULL:
+ case JAKARTA_EE_10_WEB:
+ return AppClient.VERSION_10_0;
+ case JAKARTA_EE_9_1_FULL:
+ case JAKARTA_EE_9_1_WEB:
+ case JAKARTA_EE_9_FULL:
+ case JAKARTA_EE_9_WEB:
+ return AppClient.VERSION_9_0;
+ case JAKARTA_EE_8_FULL:
+ case JAKARTA_EE_8_WEB:
+ case JAVA_EE_8_FULL:
+ case JAVA_EE_8_WEB:
+ return AppClient.VERSION_8_0;
+ case JAVA_EE_7_FULL:
+ case JAVA_EE_7_WEB:
+ return AppClient.VERSION_7_0;
+ case JAVA_EE_5:
+ return AppClient.VERSION_5_0;
+ case J2EE_14:
+ return AppClient.VERSION_1_4;
+ default:
+ return AppClient.VERSION_6_0;
}
}
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java
index 3db60b9f55e6..ccebb909b204 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java
@@ -160,26 +160,44 @@ private static AntProjectHelper createProjectImpl(final AppClientProjectCreateDa
// create application-client.xml
String resource;
- if(j2eeProfile == null) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_10_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_10_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_9_1_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_1_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_9_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_8_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_8_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N
- } else if (Profile.JAVA_EE_8_FULL.equals(j2eeProfile) || Profile.JAVA_EE_8_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N
- } else if (Profile.JAVA_EE_7_FULL.equals(j2eeProfile) || Profile.JAVA_EE_7_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N
- } else if (Profile.JAVA_EE_5.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N
- } else if (Profile.J2EE_14.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N
- } else {
+ if(null == j2eeProfile) {
resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N
+ } else {
+ switch (j2eeProfile) {
+ case JAKARTA_EE_11_FULL:
+ case JAKARTA_EE_11_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-11.xml"; // NOI18N
+ break;
+ case JAKARTA_EE_10_FULL:
+ case JAKARTA_EE_10_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N
+ break;
+ case JAKARTA_EE_9_1_FULL:
+ case JAKARTA_EE_9_1_WEB:
+ case JAKARTA_EE_9_FULL:
+ case JAKARTA_EE_9_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N
+ break;
+ case JAKARTA_EE_8_FULL:
+ case JAKARTA_EE_8_WEB:
+ case JAVA_EE_8_FULL:
+ case JAVA_EE_8_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N
+ break;
+ case JAVA_EE_7_FULL:
+ case JAVA_EE_7_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N
+ break;
+ case JAVA_EE_5:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N
+ break;
+ case J2EE_14:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N
+ break;
+ default:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N
+ break;
+ }
}
FileObject foSource = FileUtil.getConfigFile(resource);
FileObject ddFile = FileUtil.copyFile(foSource, confRoot, "application-client"); //NOI18N
@@ -389,26 +407,44 @@ public Void run() throws Exception {
} else {
// XXX just temporary, since now the import would fail due to another bug
String resource;
- if (j2eeProfile == null) {
+ if (null == j2eeProfile) {
resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_10_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_10_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_9_1_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_1_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_9_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N
- } else if (Profile.JAKARTA_EE_8_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_8_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N
- } else if (Profile.JAVA_EE_8_FULL.equals(j2eeProfile) || Profile.JAVA_EE_8_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N
- } else if (Profile.JAVA_EE_7_FULL.equals(j2eeProfile) || Profile.JAVA_EE_7_WEB.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N
- } else if (Profile.JAVA_EE_5.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N
- } else if (Profile.J2EE_14.equals(j2eeProfile)) {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N
} else {
- resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N
+ switch (j2eeProfile) {
+ case JAKARTA_EE_11_FULL:
+ case JAKARTA_EE_11_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-11.xml"; // NOI18N
+ break;
+ case JAKARTA_EE_10_FULL:
+ case JAKARTA_EE_10_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N
+ break;
+ case JAKARTA_EE_9_1_FULL:
+ case JAKARTA_EE_9_1_WEB:
+ case JAKARTA_EE_9_FULL:
+ case JAKARTA_EE_9_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N
+ break;
+ case JAKARTA_EE_8_FULL:
+ case JAKARTA_EE_8_WEB:
+ case JAVA_EE_8_FULL:
+ case JAVA_EE_8_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N
+ break;
+ case JAVA_EE_7_FULL:
+ case JAVA_EE_7_WEB:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N
+ break;
+ case JAVA_EE_5:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N
+ break;
+ case J2EE_14:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N
+ break;
+ default:
+ resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N
+ break;
+ }
}
FileUtil.copyFile(FileUtil.getConfigFile(resource),
confFolderFO, "application-client"); //NOI18N
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/classpath/DelagatingProjectClassPathModifierImpl.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/classpath/DelagatingProjectClassPathModifierImpl.java
index ce827a5f4dfe..2be4ec3b218a 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/classpath/DelagatingProjectClassPathModifierImpl.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/classpath/DelagatingProjectClassPathModifierImpl.java
@@ -59,7 +59,7 @@ protected SourceGroup[] getExtensibleSourceGroups() {
protected String[] getExtensibleClassPathTypes(SourceGroup sourceGroup) {
List res = new ArrayList(Arrays.asList(cpMod.getExtensibleClassPathTypes(sourceGroup)));
res.add(JavaClassPathConstants.COMPILE_ONLY);
- return res.toArray(new String[res.size()]);
+ return res.toArray(new String[0]);
}
@Override
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java
index 9428283f8159..026e3ea28c5a 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java
@@ -323,16 +323,30 @@ private void init() {
PLATFORM_LIST_RENDERER = PlatformUiSupport.createPlatformListCellRenderer();
SpecificationVersion minimalSourceLevel = null;
Profile profile = Profile.fromPropertiesString(evaluator.getProperty(J2EE_PLATFORM));
- if (Profile.JAKARTA_EE_9_1_FULL.equals(profile) || Profile.JAKARTA_EE_10_FULL.equals(profile)) {
- minimalSourceLevel = new SpecificationVersion("11");
- } else if (Profile.JAKARTA_EE_8_FULL.equals(profile) || Profile.JAVA_EE_8_FULL.equals(profile) || Profile.JAKARTA_EE_9_FULL.equals(profile)) {
- minimalSourceLevel = new SpecificationVersion("1.8");
- } else if (Profile.JAVA_EE_7_FULL.equals(profile)) {
- minimalSourceLevel = new SpecificationVersion("1.7");
- } else if (Profile.JAVA_EE_6_FULL.equals(profile)) {
- minimalSourceLevel = new SpecificationVersion("1.6");
- } else if (Profile.JAVA_EE_5.equals(profile)) {
- minimalSourceLevel = new SpecificationVersion("1.5");
+ switch (profile) {
+ case JAKARTA_EE_11_FULL:
+ minimalSourceLevel = new SpecificationVersion("21");
+ break;
+ case JAKARTA_EE_9_1_FULL:
+ case JAKARTA_EE_10_FULL:
+ minimalSourceLevel = new SpecificationVersion("11");
+ break;
+ case JAKARTA_EE_8_FULL:
+ case JAVA_EE_8_FULL:
+ case JAKARTA_EE_9_FULL:
+ minimalSourceLevel = new SpecificationVersion("1.8");
+ break;
+ case JAVA_EE_7_FULL:
+ minimalSourceLevel = new SpecificationVersion("1.7");
+ break;
+ case JAVA_EE_6_FULL:
+ minimalSourceLevel = new SpecificationVersion("1.6");
+ break;
+ case JAVA_EE_5:
+ minimalSourceLevel = new SpecificationVersion("1.5");
+ break;
+ default:
+ break;
}
JAVAC_SOURCE_MODEL = PlatformUiSupport.createSourceLevelComboBoxModel(PLATFORM_MODEL, evaluator.getProperty(JAVAC_SOURCE), evaluator.getProperty(JAVAC_TARGET), minimalSourceLevel);
JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer ();
@@ -809,7 +823,7 @@ void loadIncludesExcludes(IncludeExcludeVisualizer v) {
}
}
}
- v.setRoots(roots.toArray(new File[roots.size()]));
+ v.setRoots(roots.toArray(new File[0]));
v.setIncludePattern(includes);
v.setExcludePattern(excludes);
}
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/MainClassChooser.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/MainClassChooser.java
index e74954dc9f6d..811c0eaa5ddd 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/MainClassChooser.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/MainClassChooser.java
@@ -106,7 +106,7 @@ public void run () {
});
} else {
@SuppressWarnings("unchecked")
- final ElementHandle[] arr = possibleMainClasses.toArray(new ElementHandle[possibleMainClasses.size()]);
+ final ElementHandle[] arr = possibleMainClasses.toArray(new ElementHandle[0]);
// #46861, sort name of classes
Arrays.sort (arr, new MainClassComparator());
SwingUtilities.invokeLater(new Runnable () {
diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java
index 84e1b584ec60..6a09706ecd45 100644
--- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java
+++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java
@@ -90,36 +90,35 @@ protected FileObject getXmlArtifactsRoot() {
protected String getProjectJavaEEVersion() {
Car j2eeClientModule = Car.getCar(project.getProjectDirectory());
if (j2eeClientModule != null) {
- if (Profile.JAVA_EE_6_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_16;
- } else if (Profile.JAVA_EE_6_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_16;
- } else if (Profile.JAVA_EE_7_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_17;
- } else if (Profile.JAVA_EE_7_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_17;
- } else if (Profile.JAVA_EE_8_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_18;
- } else if (Profile.JAVA_EE_8_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_18;
- } else if (Profile.JAKARTA_EE_8_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_8;
- } else if (Profile.JAKARTA_EE_8_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_8;
- } else if (Profile.JAKARTA_EE_9_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_9;
- } else if (Profile.JAKARTA_EE_9_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_9;
- } else if (Profile.JAKARTA_EE_9_1_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_91;
- } else if (Profile.JAKARTA_EE_9_1_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_91;
- } else if (Profile.JAKARTA_EE_10_WEB.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_10;
- } else if (Profile.JAKARTA_EE_10_FULL.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAKARTA_EE_VERSION_10;
- } else if (Profile.JAVA_EE_5.equals(j2eeClientModule.getJ2eeProfile())) {
- return JAVA_EE_VERSION_15;
+ switch (j2eeClientModule.getJ2eeProfile()) {
+ case JAVA_EE_6_WEB:
+ case JAVA_EE_6_FULL:
+ return JAVA_EE_VERSION_16;
+ case JAVA_EE_7_WEB:
+ case JAVA_EE_7_FULL:
+ return JAVA_EE_VERSION_17;
+ case JAVA_EE_8_WEB:
+ case JAVA_EE_8_FULL:
+ return JAVA_EE_VERSION_18;
+ case JAKARTA_EE_8_WEB:
+ case JAKARTA_EE_8_FULL:
+ return JAKARTA_EE_VERSION_8;
+ case JAKARTA_EE_9_WEB:
+ case JAKARTA_EE_9_FULL:
+ return JAKARTA_EE_VERSION_9;
+ case JAKARTA_EE_9_1_WEB:
+ case JAKARTA_EE_9_1_FULL:
+ return JAKARTA_EE_VERSION_91;
+ case JAKARTA_EE_10_WEB:
+ case JAKARTA_EE_10_FULL:
+ return JAKARTA_EE_VERSION_10;
+ case JAKARTA_EE_11_WEB:
+ case JAKARTA_EE_11_FULL:
+ return JAKARTA_EE_VERSION_11;
+ case JAVA_EE_5:
+ return JAVA_EE_VERSION_15;
+ default:
+ break;
}
}
return JAVA_EE_VERSION_NONE;
diff --git a/enterprise/j2ee.common/licenseinfo.xml b/enterprise/j2ee.common/licenseinfo.xml
index b42331580466..60333ee39d25 100644
--- a/enterprise/j2ee.common/licenseinfo.xml
+++ b/enterprise/j2ee.common/licenseinfo.xml
@@ -28,10 +28,12 @@
src/org/netbeans/modules/j2ee/common/dd/resources/beans-2.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/beans-3.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/beans-4.0.xml
+ src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/constraint.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/constraint-1.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/constraint-2.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.0.xml
+ src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/ear-1.3.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/ear-1.4.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/ear-5.xml
@@ -40,10 +42,12 @@
src/org/netbeans/modules/j2ee/common/dd/resources/ear-8.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/ear-9.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/ear-10.xml
+ src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/validation.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/validation-1.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/validation-2.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/validation-3.0.xml
+ src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-2.3.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-2.4.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-2.5.xml
@@ -52,11 +56,13 @@
src/org/netbeans/modules/j2ee/common/dd/resources/web-4.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-5.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-6.0.xml
+ src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-3.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-3.1.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-4.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-5.0.xmlsrc/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.0.xml
+ src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xmltest/unit/src/templates/Class.templatetest/unit/src/templates/Interface.template
diff --git a/enterprise/j2ee.common/manifest.mf b/enterprise/j2ee.common/manifest.mf
index 5adf8465b0d1..5490cc5a9eec 100644
--- a/enterprise/j2ee.common/manifest.mf
+++ b/enterprise/j2ee.common/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.j2ee.common/1
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/common/Bundle.properties
OpenIDE-Module-Needs: javax.script.ScriptEngine.freemarker
-OpenIDE-Module-Specification-Version: 1.126
+OpenIDE-Module-Specification-Version: 1.128
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/j2ee.common/nbproject/org-netbeans-modules-j2ee-common.sig b/enterprise/j2ee.common/nbproject/org-netbeans-modules-j2ee-common.sig
index 842d4a9cc389..a1b4fc406ffa 100644
--- a/enterprise/j2ee.common/nbproject/org-netbeans-modules-j2ee-common.sig
+++ b/enterprise/j2ee.common/nbproject/org-netbeans-modules-j2ee-common.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.125
+#Version 1.126
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/enterprise/j2ee.common/nbproject/project.xml b/enterprise/j2ee.common/nbproject/project.xml
index 7ce39afc5dc6..d3188a0893e6 100644
--- a/enterprise/j2ee.common/nbproject/project.xml
+++ b/enterprise/j2ee.common/nbproject/project.xml
@@ -530,7 +530,6 @@
org.netbeans.modules.web.jsf.richfacesorg.netbeans.modules.web.primefacesorg.netbeans.modules.web.project
- org.netbeans.modules.web.strutsorg.netbeans.modules.websvc.coreorg.netbeans.modules.websvc.jaxrpcorg.netbeans.modules.websvc.restapi
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/DatasourceUIHelper.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/DatasourceUIHelper.java
index affc750c5bc0..310f224015e9 100644
--- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/DatasourceUIHelper.java
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/DatasourceUIHelper.java
@@ -30,7 +30,6 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.LinkedList;
@@ -608,7 +607,7 @@ private static List getDatasources(final J2eeModuleProvider provider
datasources.addAll(serverDatasources);
ArrayList sortedDatasources = new ArrayList(datasources);
- Collections.sort(sortedDatasources, new DatasourceComparator());
+ sortedDatasources.sort(new DatasourceComparator());
return sortedDatasources;
}
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java
index 9949940624ff..6fdcfd672e2d 100644
--- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java
@@ -35,7 +35,8 @@
import org.netbeans.modules.web.api.webmodule.WebModule;
/**
- * Facade allowing queries for certain capabilities provided by Java EE runtime.
+ * Facade allowing queries for certain capabilities provided by
+ * Java/Jakarta EE runtime.
*
* @author Petr Hejl
* @since 1.58
@@ -91,86 +92,92 @@ public static J2eeProjectCapabilities forProject(@NonNull Project project) {
/**
* EJB 3.0 functionality is supported in EjbJar project which is targeting
- * Java EE 5 or Java EE 6 platform.
+ * from Java EE 5 to Jakarta EE 8 platform.
*/
public boolean isEjb30Supported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean eeOk = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_5) ||
- ejbJarProfile.equals(Profile.JAVA_EE_6_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_7_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_8_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_FULL));
+ boolean eeOk = ejbJarProfile != null && ejbJarProfile.isFullProfile() &&
+ ejbJarProfile.isAtLeast(Profile.JAVA_EE_5) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_FULL);
return J2eeModule.Type.EJB.equals(moduleType) && eeOk;
}
/**
* EJB 3.1 functionality is supported in EjbJar and Web project which is targeting
- * full Java EE 6 platform.
+ * full platform profiles from Java EE 6 to Jakarta EE 8 platform.
* @return {@code true} if the project is targeting full Java EE 6 or newer platform
*/
public boolean isEjb31Supported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean ee6or7 = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_6_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_7_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_8_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_FULL));
+ boolean ee6or7 = ejbJarProfile != null && ejbJarProfile.isFullProfile() &&
+ ejbJarProfile.isAtLeast(Profile.JAVA_EE_6_FULL) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_FULL);
return ee6or7 && (J2eeModule.Type.EJB.equals(moduleType) ||
J2eeModule.Type.WAR.equals(moduleType));
}
/**
- * EJB 3.1 Lite functionality is supported in Web project targeting Java EE 6
- * web profile or newer and wherever full EJB 3.1 is supported.
+ * EJB 3.1 Lite functionality is supported in Web projects targeting from
+ * Java EE 6 to Jakarta EE 8 web profile, and wherever full EJB 3.1 is supported.
*/
public boolean isEjb31LiteSupported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean ee6or7Web = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_6_WEB) || ejbJarProfile.equals(Profile.JAVA_EE_7_WEB) || ejbJarProfile.equals(Profile.JAVA_EE_8_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_WEB));
+ boolean ee6or7Web = ejbJarProfile != null &&
+ ejbJarProfile.isAtLeast(Profile.JAVA_EE_6_WEB) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_WEB);
return isEjb31Supported() || (J2eeModule.Type.WAR.equals(moduleType) && ee6or7Web);
}
/**
* EJB 3.2 functionality is supported in EjbJar and Web project which is targeting
- * full Java EE or newer platform.
+ * full platform profiles from Java EE 7 to Jakarta EE 8 platform.
*
* @return {@code true} if the project is targeting full Java EE 7 or newer platform
* @since 1.76
*/
public boolean isEjb32Supported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean ee7 = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_7_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_8_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_FULL));
+ boolean ee7 = ejbJarProfile != null && ejbJarProfile.isFullProfile() &&
+ ejbJarProfile.isAtLeast(Profile.JAVA_EE_7_FULL) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_FULL);
return ee7 && (J2eeModule.Type.EJB.equals(moduleType) || J2eeModule.Type.WAR.equals(moduleType));
}
/**
- * EJB 3.2 Lite functionality is supported in Web project targeting Java EE 7
- * web profile and wherever full EJB 3.2 is supported.
+ * EJB 3.2 Lite functionality is supported in Web projects targeting from
+ * Java EE 7 to Jakarta EE 8 web profile, and wherever full EJB 3.2 is supported.
*
* @return {@code true} if the project is targeting full or web profile Java EE 7 or newer platform
* @since 1.76
*/
public boolean isEjb32LiteSupported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean ee7Web = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_7_WEB) || ejbJarProfile.equals(Profile.JAVA_EE_8_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_WEB));
+ boolean ee7Web = ejbJarProfile != null &&
+ ejbJarProfile.isAtLeast(Profile.JAVA_EE_7_WEB) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_WEB);
return isEjb32Supported() || (J2eeModule.Type.WAR.equals(moduleType) && ee7Web);
}
/**
* EJB 4.0 functionality is supported in EjbJar and Web project which is targeting
- * full Jakarta EE 9/9.1 platform.
+ * full platform profiles from Jakarta EE 9 to Jakarta EE 11 platform.
*
* @return {@code true} if the project is targeting full Jakarta EE 9/9.1 or newer platform
* @since 1.76
*/
public boolean isEjb40Supported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean ee9 = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAKARTA_EE_9_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_9_1_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_10_FULL));
+ boolean ee9 = ejbJarProfile != null && ejbJarProfile.isFullProfile() &&
+ ejbJarProfile.isAtLeast(Profile.JAKARTA_EE_9_FULL) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_11_FULL);
return ee9 && (J2eeModule.Type.EJB.equals(moduleType) || J2eeModule.Type.WAR.equals(moduleType));
}
/**
- * EJB 4.0 Lite functionality is supported in Web project targeting Jakarta EE 9/9.1
- * web profile and wherever full EJB 4.0 is supported.
+ * EJB 4.0 Lite functionality is supported in Web projects targeting from
+ * Jakarta EE 9 to Jakarta EE 11 web profile, and wherever full EJB 4.0 is supported.
*
* @return {@code true} if the project is targeting full or web profile Jakarta EE 9/9.1 or newer platform
* @since 1.76
*/
public boolean isEjb40LiteSupported() {
J2eeModule.Type moduleType = provider.getJ2eeModule().getType();
- boolean ee9Web = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAKARTA_EE_9_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_9_1_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_10_WEB));
+ boolean ee9Web = ejbJarProfile != null &&
+ ejbJarProfile.isAtLeast(Profile.JAKARTA_EE_9_WEB) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_11_WEB);
return isEjb40Supported() || (J2eeModule.Type.WAR.equals(moduleType) && ee9Web);
}
@@ -182,7 +189,7 @@ public boolean isEjb40LiteSupported() {
public boolean isCdi10Supported() {
return Profile.JAVA_EE_6_FULL.equals(ejbJarProfile) ||
Profile.JAVA_EE_6_WEB.equals(webProfile) ||
- Profile.JAVA_EE_6_FULL.equals(ejbJarProfile);
+ Profile.JAVA_EE_6_FULL.equals(carProfile);
}
/**
@@ -242,6 +249,18 @@ public boolean isCdi40Supported() {
|| Profile.JAKARTA_EE_10_WEB.equals(webProfile)
|| Profile.JAKARTA_EE_10_FULL.equals(carProfile);
}
+
+ /**
+ * Is CDI 4.1 supported in this project?
+ *
+ * @return {@code true} if the project targets Jakarta EE 11 profile,
+ * {@code false} otherwise
+ */
+ public boolean isCdi41Supported() {
+ return Profile.JAKARTA_EE_11_FULL.equals(ejbJarProfile)
+ || Profile.JAKARTA_EE_11_WEB.equals(webProfile)
+ || Profile.JAKARTA_EE_11_FULL.equals(carProfile);
+ }
/**
* Returns true if the server used by project supports EJB lite.
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/SharabilityUtility.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/SharabilityUtility.java
index 08c021cf942d..7f70dcd744c7 100644
--- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/SharabilityUtility.java
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/SharabilityUtility.java
@@ -82,7 +82,7 @@ public void run() {
List roots = lib.getContent("classpath"); // NOI18N
// CopyFiles.class was not present in NB 6.1
boolean version61 = org.netbeans.spi.java.classpath.support.ClassPathSupport.
- createClassPath(roots.toArray(new URL[roots.size()])).
+ createClassPath(roots.toArray(new URL[0])).
findResource("org/netbeans/modules/java/j2seproject/copylibstask/CopyFiles.class") == null; // NOI18N
if (!version61) {
return;
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java
index ec0298a273be..c59d22b16300 100644
--- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java
@@ -66,7 +66,9 @@ public static FileObject createWebXml(Profile j2eeProfile, FileObject dir) throw
*/
public static FileObject createWebXml(Profile j2eeProfile, boolean webXmlRequired, FileObject dir) throws IOException {
String template = null;
- if ((Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) && webXmlRequired) {
+ if ((Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) && webXmlRequired) {
+ template = "web-6.1.xml"; //NOI18N
+ } else if ((Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) && webXmlRequired) {
template = "web-6.0.xml"; //NOI18N
} else if ((Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile ||
Profile.JAKARTA_EE_9_FULL == j2eeProfile || Profile.JAKARTA_EE_9_WEB == j2eeProfile) && webXmlRequired) {
@@ -105,7 +107,9 @@ public static FileObject createWebXml(Profile j2eeProfile, boolean webXmlRequire
*/
public static FileObject createWebFragmentXml(Profile j2eeProfile, FileObject dir) throws IOException {
String template = null;
- if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) {
+ if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) {
+ template = "web-fragment-6.1.xml"; //NOI18N
+ } else if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) {
template = "web-fragment-6.0.xml"; //NOI18N
} else if (Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile ||
Profile.JAKARTA_EE_9_FULL == j2eeProfile || Profile.JAKARTA_EE_9_WEB == j2eeProfile) {
@@ -152,7 +156,9 @@ public static FileObject createBeansXml(Profile j2eeProfile, FileObject dir) thr
*/
public static FileObject createBeansXml(Profile j2eeProfile, FileObject dir, String name) throws IOException {
String template = null;
- if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) {
+ if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) {
+ template = "beans-4.1.xml"; //NOI18N
+ } else if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) {
template = "beans-4.0.xml"; //NOI18N
} else if (Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile ||
Profile.JAKARTA_EE_9_FULL == j2eeProfile || Profile.JAKARTA_EE_9_WEB == j2eeProfile) {
@@ -211,6 +217,8 @@ public static FileObject createValidationXml(Profile j2eeProfile, FileObject dir
|| Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile
|| Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) {
template = "validation-3.0.xml"; //NOI18N
+ } else if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) {
+ template = "validation-3.1.xml"; //NOI18N
}
if (template == null)
return null;
@@ -257,6 +265,8 @@ public static FileObject createConstraintXml(Profile j2eeProfile, FileObject dir
|| Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile
|| Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) {
template = "constraint-3.0.xml"; //NOI18N
+ } else if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) {
+ template = "constraint-3.1.xml"; //NOI18N
}
if (template == null)
return null;
@@ -285,7 +295,9 @@ public static FileObject createApplicationXml(final Profile profile, final FileO
boolean forceCreation) throws IOException {
String template = null;
- if (profile != null && profile.equals(Profile.JAKARTA_EE_10_FULL) && forceCreation) {
+ if (profile != null && profile.equals(Profile.JAKARTA_EE_11_FULL) && forceCreation) {
+ template = "ear-11.xml"; // NOI18N
+ } else if (profile != null && profile.equals(Profile.JAKARTA_EE_10_FULL) && forceCreation) {
template = "ear-10.xml"; // NOI18N
} else if (profile != null && (profile.equals(Profile.JAKARTA_EE_9_FULL) || profile.equals(Profile.JAKARTA_EE_9_1_FULL)) && forceCreation) {
template = "ear-9.xml"; // NOI18N
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml
new file mode 100644
index 000000000000..5c5e6fe0231d
--- /dev/null
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml
new file mode 100644
index 000000000000..5145f6849044
--- /dev/null
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml
new file mode 100644
index 000000000000..6fadd79c3997
--- /dev/null
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml
new file mode 100644
index 000000000000..834da5a7137b
--- /dev/null
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml
new file mode 100644
index 000000000000..20d6dbbc30c9
--- /dev/null
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml
new file mode 100644
index 000000000000..22db23644db4
--- /dev/null
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/ui/NoSelectedServerWarning.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/ui/NoSelectedServerWarning.java
index 9890ff0bedb3..e1cbd4342035 100644
--- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/ui/NoSelectedServerWarning.java
+++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/ui/NoSelectedServerWarning.java
@@ -98,7 +98,7 @@ public static String selectServerDialog(Object[] moduleTypes, String j2eeSpec, S
types.add(type);
}
}
- return selectServerDialog(types.toArray(new J2eeModule.Type[types.size()]),
+ return selectServerDialog(types.toArray(new J2eeModule.Type[0]),
Profile.fromPropertiesString(j2eeSpec), title, description);
}
diff --git a/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java b/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java
index 768cd24506da..eedb3c6bf08d 100644
--- a/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java
+++ b/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java
@@ -201,6 +201,26 @@ public void testIsEjbSupported() throws Exception {
assertFalse(cap.isEjb40Supported());
// assertTrue(cap.isEjb40LiteSupported());
+ p = createProject(Profile.JAKARTA_EE_11_FULL, Type.EJB);
+ cap = J2eeProjectCapabilities.forProject(p);
+ assertFalse(cap.isEjb30Supported());
+ assertFalse(cap.isEjb31Supported());
+ assertFalse(cap.isEjb31LiteSupported());
+ assertFalse(cap.isEjb32Supported());
+ assertFalse(cap.isEjb32LiteSupported());
+ assertTrue(cap.isEjb40Supported());
+ assertTrue(cap.isEjb40LiteSupported());
+
+ p = createProject(Profile.JAKARTA_EE_11_WEB, Type.EJB);
+ cap = J2eeProjectCapabilities.forProject(p);
+ assertFalse(cap.isEjb30Supported());
+ assertFalse(cap.isEjb31Supported());
+ assertFalse(cap.isEjb31LiteSupported());
+ assertFalse(cap.isEjb32Supported());
+ assertFalse(cap.isEjb32LiteSupported());
+ assertFalse(cap.isEjb40Supported());
+// assertTrue(cap.isEjb40LiteSupported());
+
p = createProject(Profile.JAVA_EE_5, Type.WAR);
cap = J2eeProjectCapabilities.forProject(p);
assertFalse(cap.isEjb30Supported());
@@ -351,6 +371,26 @@ public void testIsEjbSupported() throws Exception {
assertFalse(cap.isEjb40Supported());
assertTrue(cap.isEjb40LiteSupported());
+ p = createProject(Profile.JAKARTA_EE_11_FULL, Type.WAR);
+ cap = J2eeProjectCapabilities.forProject(p);
+ assertFalse(cap.isEjb30Supported());
+ assertFalse(cap.isEjb31Supported());
+ assertFalse(cap.isEjb31LiteSupported());
+ assertFalse(cap.isEjb32Supported());
+ assertFalse(cap.isEjb32LiteSupported());
+ assertTrue(cap.isEjb40Supported());
+ assertTrue(cap.isEjb40LiteSupported());
+
+ p = createProject(Profile.JAKARTA_EE_11_WEB, Type.WAR);
+ cap = J2eeProjectCapabilities.forProject(p);
+ assertFalse(cap.isEjb30Supported());
+ assertFalse(cap.isEjb31Supported());
+ assertFalse(cap.isEjb31LiteSupported());
+ assertFalse(cap.isEjb32Supported());
+ assertFalse(cap.isEjb32LiteSupported());
+ assertFalse(cap.isEjb40Supported());
+ assertTrue(cap.isEjb40LiteSupported());
+
}
private Project createProject(final Profile profile, final Type type) throws IOException {
diff --git a/enterprise/j2ee.core/manifest.mf b/enterprise/j2ee.core/manifest.mf
index c055143561cb..83cd53905b27 100644
--- a/enterprise/j2ee.core/manifest.mf
+++ b/enterprise/j2ee.core/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.j2ee.core/0
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/core/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.48
+OpenIDE-Module-Specification-Version: 1.50
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/j2ee.core/nbproject/org-netbeans-modules-j2ee-core.sig b/enterprise/j2ee.core/nbproject/org-netbeans-modules-j2ee-core.sig
index 052bc10deba0..ce5255ca0b69 100644
--- a/enterprise/j2ee.core/nbproject/org-netbeans-modules-j2ee-core.sig
+++ b/enterprise/j2ee.core/nbproject/org-netbeans-modules-j2ee-core.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.47
+#Version 1.48
CLSS public abstract interface java.io.Serializable
diff --git a/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java b/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java
index 743eb3eb2241..b8b4d65ef557 100644
--- a/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java
+++ b/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java
@@ -86,7 +86,13 @@ public enum Profile {
JAKARTA_EE_10_WEB("10", "web"),
@Messages("JAKARTA_EE_10_FULL.displayName=Jakarta EE 10")
- JAKARTA_EE_10_FULL("10");
+ JAKARTA_EE_10_FULL("10"),
+
+ @Messages("JAKARTA_EE_11_WEB.displayName=Jakarta EE 11 Web")
+ JAKARTA_EE_11_WEB("11", "web"),
+
+ @Messages("JAKARTA_EE_11_FULL.displayName=Jakarta EE 11")
+ JAKARTA_EE_11_FULL("11");
// !!! ATTENTION: BE AWARE OF THE ENUM ORDER! It controls compatibility and UI position.
public static final Comparator UI_COMPARATOR = (Profile o1, Profile o2) -> -(o1.ordinal() - o2.ordinal());
@@ -116,6 +122,28 @@ public String getDisplayName() {
public String toPropertiesString() {
return propertiesString;
}
+
+ /**
+ * Find out if this profile is a Web profile Platform.
+ *
+ * @return true if this is a Java/Jakarta EE Web profile, false if is a Full
+ * Platform
+ */
+ @NonNull
+ public boolean isWebProfile() {
+ return propertiesString.endsWith("web");
+ }
+
+ /**
+ * Find out if this profile is a Full profile Platform.
+ *
+ * @return true if this is a Java/Jakarta EE Full profile, false if is a Web
+ * profile Platform
+ */
+ @NonNull
+ public boolean isFullProfile() {
+ return !propertiesString.endsWith("web");
+ }
/**
* Find out if the version of the profile is equal or higher to given profile.
@@ -123,12 +151,12 @@ public String toPropertiesString() {
* Please be aware of the following rules:
*
*
- * 1) Each Java EE X version is considered as lower than Java EE X+1 version
+ * 1) Each Java/Jakarta EE X version is considered as lower than Java EE X+1 version
* (this applies regardless on Web/Full specification and in reality it means
* that even Java EE 6 Full version is considered as lower than Java EE 7 Web)
*
*
- * 2) Each Java EE X Web version is considered as lower than Java EE X Full
+ * 2) Each Java/Jakarta EE X Web version is considered as lower than Java/Jakarta EE X Full
*
*
* @param profile profile to compare against
@@ -139,6 +167,29 @@ public String toPropertiesString() {
public boolean isAtLeast(@NonNull Profile profile) {
return this.ordinal() >= profile.ordinal();
}
+
+ /**
+ * Find out if the version of the profile is equal or lower to given profile.
+ *
+ * Please be aware of the following rules:
+ *
+ *
+ * 1) Each Java/Jakarta EE X version is considered as lower than Java/Jakarta EE X+1 version
+ * (this applies regardless on Web/Full specification and in reality it means
+ * that even Java EE 6 Full version is considered as lower than Java EE 7 Web)
+ *
October 2003 - DD API proposal and architecture discussion. [done]
November 2003 - DD API initial implementation, NbUnit tests. [done]
December 2003 - DD API documentation, DD API architecture document, DD API architecture question document. [done]
-
December 5. 2003 - DD API review - the overall architecture [done] See DDAPI Rewiev Report
+
December 5. 2003 - DD API review - the overall architecture [done] See DDAPI Rewiev Report
January 2004 - DD API review - architecture details (Commitment Review)
January 2004 - implementation of (final) changes emerging from DD API Commitment Review
diff --git a/enterprise/j2ee.dd/licenseinfo.xml b/enterprise/j2ee.dd/licenseinfo.xml
index 8abafdce5d82..1afb7a12332f 100755
--- a/enterprise/j2ee.dd/licenseinfo.xml
+++ b/enterprise/j2ee.dd/licenseinfo.xml
@@ -125,16 +125,24 @@
src/org/netbeans/modules/j2ee/dd/impl/resources/application_10.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/application-client_10.mddsrc/org/netbeans/modules/j2ee/dd/impl/resources/application-client_10.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_0.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/ejb-jar_4_0.mddsrc/org/netbeans/modules/j2ee/dd/impl/resources/ejb-jar_4_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_9.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_10.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_web_services_2_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_web_services_client_2_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/jsp_3_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/jsp_3_1.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/permissions_9.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/web-app_5_0.mddsrc/org/netbeans/modules/j2ee/dd/impl/resources/web-app_5_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/web-common_5_0.xsd
@@ -145,6 +153,11 @@
src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_0.xsdsrc/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_0.mddsrc/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_0.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd
+ src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd
diff --git a/enterprise/j2ee.dd/nbproject/org-netbeans-modules-j2ee-dd.sig b/enterprise/j2ee.dd/nbproject/org-netbeans-modules-j2ee-dd.sig
index c0d0b8d729ef..af476a3995eb 100644
--- a/enterprise/j2ee.dd/nbproject/org-netbeans-modules-j2ee-dd.sig
+++ b/enterprise/j2ee.dd/nbproject/org-netbeans-modules-j2ee-dd.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.62.0
+#Version 1.63.0
CLSS public abstract interface java.io.Serializable
diff --git a/enterprise/j2ee.dd/nbproject/project.properties b/enterprise/j2ee.dd/nbproject/project.properties
index c4108f2ff22e..9fcd3a8a745c 100644
--- a/enterprise/j2ee.dd/nbproject/project.properties
+++ b/enterprise/j2ee.dd/nbproject/project.properties
@@ -18,7 +18,7 @@
javac.compilerargs=-Xlint:all -Xlint:-serial
javac.source=1.8
javac.fork=true
-spec.version.base=1.63.0
+spec.version.base=1.65.0
is.autoload=true
javadoc.arch=${basedir}/arch.xml
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java
index b8f758945219..7efc0715a889 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java
@@ -38,24 +38,28 @@ public interface Application extends org.netbeans.modules.j2ee.dd.api.common.Roo
public static final String VERSION_6="6"; //NOI18N
/**
- * application.xml DD version for JavaEE7
+ * application.xml DD version for Java EE 7
* @since 1.29
*/
public static final String VERSION_7 = "7"; //NOI18N
/**
- * application.xml DD version for JavaEE8/JakartaEE8
+ * application.xml DD version for Java EE 8/Jakarta EE 8
* @since 2
*/
public static final String VERSION_8 = "8"; //NOI18N
/**
- * application.xml DD version for JakartaEE9/JakartaEE9.1
+ * application.xml DD version for Jakarta EE 9/Jakarta EE 9.1
* @since 2
*/
public static final String VERSION_9 = "9"; //NOI18N
/**
- * application.xml DD version for JakartaEE10
+ * application.xml DD version for Jakarta EE 10
*/
public static final String VERSION_10 = "10"; //NOI18N
+ /**
+ * application.xml DD version for Jakarta EE 11
+ */
+ public static final String VERSION_11 = "11"; //NOI18N
public static final int STATE_VALID=0;
public static final int STATE_INVALID_PARSABLE=1;
public static final int STATE_INVALID_UNPARSABLE=2;
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java
index e25401db687f..89ba3f2e4610 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java
@@ -246,8 +246,10 @@ private static Application createApplication(DDParse parse) {
return new org.netbeans.modules.j2ee.dd.impl.application.model_8.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES);
} else if (Application.VERSION_9.equals(version)) {
return new org.netbeans.modules.j2ee.dd.impl.application.model_9.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES);
- }else if (Application.VERSION_10.equals(version)) {
+ } else if (Application.VERSION_10.equals(version)) {
return new org.netbeans.modules.j2ee.dd.impl.application.model_10.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES);
+ } else if (Application.VERSION_11.equals(version)) {
+ return new org.netbeans.modules.j2ee.dd.impl.application.model_11.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES);
}
return jar;
}
@@ -274,6 +276,10 @@ public InputSource resolveEntity (String publicId, String systemId) {
return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_8.xsd"); //NOI18N
} else if ("https://jakarta.ee/xml/ns/jakartaee/application_9.xsd".equals(systemId)) {
return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_9.xsd"); //NOI18N
+ } else if ("https://jakarta.ee/xml/ns/jakartaee/application_10.xsd".equals(systemId)) {
+ return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_10.xsd"); //NOI18N
+ } else if ("https://jakarta.ee/xml/ns/jakartaee/application_11.xsd".equals(systemId)) {
+ return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_11.xsd"); //NOI18N
} else {
// use the default behaviour
return null;
@@ -390,7 +396,11 @@ private void extractVersion () {
Node vNode = attrs.getNamedItem("version");//NOI18N
if(vNode != null) {
String versionValue = vNode.getNodeValue();
- if (Application.VERSION_9.equals(versionValue)) {
+ if (Application.VERSION_11.equals(versionValue)) {
+ version = Application.VERSION_11;
+ } else if (Application.VERSION_10.equals(versionValue)) {
+ version = Application.VERSION_10;
+ } else if (Application.VERSION_9.equals(versionValue)) {
version = Application.VERSION_9;
} else if (Application.VERSION_8.equals(versionValue)) {
version = Application.VERSION_8;
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java
index f77703239167..61175e205c27 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java
@@ -46,6 +46,7 @@ public interface AppClient extends RootInterface {
public static final String VERSION_8_0 = "8"; //NOI18N
public static final String VERSION_9_0 = "9"; //NOI18N
public static final String VERSION_10_0 = "10"; //NOI18N
+ public static final String VERSION_11_0 = "11"; //NOI18N
public static final int STATE_VALID=0;
public static final int STATE_INVALID_PARSABLE=1;
public static final int STATE_INVALID_UNPARSABLE=2;
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java
index 098a331e7315..f1095478b304 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java
@@ -65,6 +65,10 @@ public interface WebApp extends org.netbeans.modules.j2ee.dd.api.common.RootInte
* web.xml, web-fragment.xml DD version for JakartaEE10
*/
static final String VERSION_6_0 = "6.0"; //NOI18N
+ /**
+ * web.xml, web-fragment.xml DD version for Jakarta EE 11
+ */
+ static final String VERSION_6_1 = "6.1"; //NOI18N
static final int STATE_VALID = 0;
static final int STATE_INVALID_PARSABLE = 1;
static final int STATE_INVALID_UNPARSABLE = 2;
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java
index de00d64f8820..3b5feac01988 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java
@@ -79,7 +79,12 @@ public WebFragment getWebFragmentRoot(FileObject fo) throws IOException, FileNot
private WebFragment createWebFragment(FileObject fo, String version) throws IOException, SAXException {
try {
- if (WebFragment.VERSION_6_0.equals(version)) {
+ if (WebFragment.VERSION_6_1.equals(version)) {
+ try (InputStream inputStream = fo.getInputStream()) {
+ return org.netbeans.modules.j2ee.dd.impl.web.model_6_1_frag.WebFragment.createGraph(inputStream);
+ }
+ } else
+ if (WebFragment.VERSION_6_0.equals(version)) {
try (InputStream inputStream = fo.getInputStream()) {
return org.netbeans.modules.j2ee.dd.impl.web.model_6_0_frag.WebFragment.createGraph(inputStream);
}
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/client/annotation/AppClientImpl.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/client/annotation/AppClientImpl.java
index 7391505ccbaf..67dd4857a976 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/client/annotation/AppClientImpl.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/client/annotation/AppClientImpl.java
@@ -113,7 +113,7 @@ private void initEjbRefs() {
EjbRefHelper.setEjbRefs(helper, resultEjbRefs, null);
- ejbRefs = resultEjbRefs.toArray(new EjbRef[resultEjbRefs.size()]);
+ ejbRefs = resultEjbRefs.toArray(new EjbRef[0]);
}
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/CommonDDAccess.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/CommonDDAccess.java
index d26277440d24..5fd6d6d889a2 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/CommonDDAccess.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/CommonDDAccess.java
@@ -90,7 +90,7 @@ public static BaseBean newBean(CommonDDBean parent, String beanName, String pkgN
pkgName
+ DOT
+ beanName);
- return (BaseBean) beanClass.newInstance();
+ return (BaseBean) beanClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
if (e instanceof ClassNotFoundException)
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java
index 0913f6eca722..5a74cbfc8d1d 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java
@@ -125,6 +125,8 @@ public static WebApp createWebApp(InputStream is, String version) throws IOExcep
return org.netbeans.modules.j2ee.dd.impl.web.model_5_0.WebApp.createGraph(is);
} else if (WebApp.VERSION_6_0.equals(version)) {
return org.netbeans.modules.j2ee.dd.impl.web.model_6_0.WebApp.createGraph(is);
+ } else if (WebApp.VERSION_6_1.equals(version)) {
+ return org.netbeans.modules.j2ee.dd.impl.web.model_6_1.WebApp.createGraph(is);
} else {
return null;
}
@@ -155,6 +157,8 @@ public static AppClient createAppClient(InputStream is, String version) throws I
return org.netbeans.modules.j2ee.dd.impl.client.model_9_0.ApplicationClient.createGraph(is);
} else if (AppClient.VERSION_10_0.equals(version)) {
return org.netbeans.modules.j2ee.dd.impl.client.model_10_0.ApplicationClient.createGraph(is);
+ } else if (AppClient.VERSION_11_0.equals(version)) {
+ return org.netbeans.modules.j2ee.dd.impl.client.model_11_0.ApplicationClient.createGraph(is);
}
} catch (RuntimeException ex) {
throw new SAXException(ex);
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/CommonAnnotationHelper.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/CommonAnnotationHelper.java
index c4bf602d5ea8..e7d042ff7b38 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/CommonAnnotationHelper.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/CommonAnnotationHelper.java
@@ -130,7 +130,7 @@ public void handleAnnotation(TypeElement type, Element element, AnnotationMirror
} catch (InterruptedException e) {
return new SecurityRole[0];
}
- return result.toArray(new SecurityRole[result.size()]);
+ return result.toArray(new SecurityRole[0]);
}
/**
@@ -259,7 +259,7 @@ public static ServiceRef[] getServiceRefs(final AnnotationModelHelper helper, fi
List resources = getResources(helper, typeElement);
serviceRefs.addAll(getServiceRefs(resources));
- return serviceRefs.toArray(new ServiceRef[serviceRefs.size()]);
+ return serviceRefs.toArray(new ServiceRef[0]);
}
/**
@@ -279,7 +279,7 @@ public static ServiceRef[] getServiceRefs(final AnnotationModelHelper helper) {
List resources = getResources(helper);
serviceRefs.addAll(getServiceRefs(resources));
- return serviceRefs.toArray(new ServiceRef[serviceRefs.size()]);
+ return serviceRefs.toArray(new ServiceRef[0]);
}
/**
@@ -414,7 +414,7 @@ private static ResourceRef[] getResourceRefs(final List resources)
elements.add(new ResourceRefImpl(resource));
}
}
- return elements.toArray(new ResourceRef[elements.size()]);
+ return elements.toArray(new ResourceRef[0]);
}
private static EnvEntry[] getEnvEntries(final List resources) {
@@ -425,7 +425,7 @@ private static EnvEntry[] getEnvEntries(final List resources) {
elements.add(new EnvEntryImpl(resource));
}
}
- return elements.toArray(new EnvEntry[elements.size()]);
+ return elements.toArray(new EnvEntry[0]);
}
private static MessageDestinationRef[] getMessageDestinationRefs(final List resources) {
@@ -436,7 +436,7 @@ private static MessageDestinationRef[] getMessageDestinationRefs(final List getServiceRefs(final List resources) {
@@ -461,7 +461,7 @@ private static ResourceEnvRef[] getResourceEnvRefs(final List reso
elements.add(new ResourceEnvRefImpl(resource));
}
}
- return elements.toArray(new ResourceEnvRef[elements.size()]);
+ return elements.toArray(new ResourceEnvRef[0]);
}
private static void addServiceReference(final List serviceRefs, final Element element, TypeElement parentElement, final AnnotationModelHelper helper) {
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/ServiceRefImpl.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/ServiceRefImpl.java
index 8ace7c652dcf..105f65a7d2ae 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/ServiceRefImpl.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/annotation/ServiceRefImpl.java
@@ -156,7 +156,7 @@ private void initPortComponentRefs() {
}
}
if (sei != null) portComponents.add(new PortComponentRefImpl(sei));
- portComponentRefs = portComponents.toArray(new PortComponentRef[portComponents.size()]);
+ portComponentRefs = portComponents.toArray(new PortComponentRef[0]);
}
}
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/ActivationConfigImpl.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/ActivationConfigImpl.java
index 7582f7379d68..5c6f5b1027e2 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/ActivationConfigImpl.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/ActivationConfigImpl.java
@@ -52,7 +52,7 @@ public void setActivationConfigProperty(ActivationConfigProperty[] value) {
@Override
public ActivationConfigProperty[] getActivationConfigProperty() {
- return properties.toArray(new ActivationConfigProperty[properties.size()]);
+ return properties.toArray(new ActivationConfigProperty[0]);
}
@Override
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/EnterpriseBeansImpl.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/EnterpriseBeansImpl.java
index 50f1bb7d6ad7..2e24526b0248 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/EnterpriseBeansImpl.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/EnterpriseBeansImpl.java
@@ -104,12 +104,12 @@ public Ejb[] getEjbs() {
public Session[] getSession() {
Collection sessions = sessionManager.getObjects();
- return sessions.toArray(new Session[sessions.size()]);
+ return sessions.toArray(new Session[0]);
}
public MessageDriven[] getMessageDriven() {
Collection messageDrivens = messageDrivenManager.getObjects();
- return messageDrivens.toArray(new MessageDriven[messageDrivens.size()]);
+ return messageDrivens.toArray(new MessageDriven[0]);
}
public Entity[] getEntity() {
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/MessageDrivenImpl.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/MessageDrivenImpl.java
index 8fd4185dc459..6a2cea2b425c 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/MessageDrivenImpl.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/MessageDrivenImpl.java
@@ -155,8 +155,8 @@ private void initLocalAndRemoteEjbRefs() {
EjbRefHelper.setEjbRefsForClass(getHelper(), getTypeElement(), resultEjbRefs, resultEjbLocalRefs);
- ejbRefs = resultEjbRefs.toArray(new EjbRef[resultEjbRefs.size()]);
- ejbLocalRefs = resultEjbLocalRefs.toArray(new EjbLocalRef[resultEjbLocalRefs.size()]);
+ ejbRefs = resultEjbRefs.toArray(new EjbRef[0]);
+ ejbLocalRefs = resultEjbLocalRefs.toArray(new EjbLocalRef[0]);
}
//
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/SessionImpl.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/SessionImpl.java
index 3042cef63c9a..4fac61b7dfba 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/SessionImpl.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/ejb/annotation/SessionImpl.java
@@ -332,8 +332,8 @@ private void initLocalAndRemoteEjbRefs() {
EjbRefHelper.setEjbRefsForClass(getHelper(), getTypeElement(), resultEjbRefs, resultEjbLocalRefs);
- ejbRefs = resultEjbRefs.toArray(new EjbRef[resultEjbRefs.size()]);
- ejbLocalRefs = resultEjbLocalRefs.toArray(new EjbLocalRef[resultEjbLocalRefs.size()]);
+ ejbRefs = resultEjbRefs.toArray(new EjbRef[0]);
+ ejbLocalRefs = resultEjbLocalRefs.toArray(new EjbLocalRef[0]);
}
@@ -409,12 +409,12 @@ public String getSessionType() {
public String[] getBusinessLocal() throws VersionNotSupportedException {
initBusinessInterfaces();
- return businessLocal.toArray(new String[businessLocal.size()]);
+ return businessLocal.toArray(new String[0]);
}
public String[] getBusinessRemote() throws VersionNotSupportedException {
initBusinessInterfaces();
- return businessRemote.toArray(new String[businessRemote.size()]);
+ return businessRemote.toArray(new String[0]);
}
public EjbRef[] getEjbRef() {
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd
new file mode 100644
index 000000000000..48b4353d4987
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd
@@ -0,0 +1,385 @@
+
+
+
+
+ application-client
+ https://jakarta.ee/xml/ns/jakartaee
+ ApplicationClient
+ org.netbeans.modules.j2ee.dd.api.client.AppClient
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ public org.xml.sax.SAXParseException getError() {
+ return null;
+ }
+ public int getStatus() {
+ return STATE_VALID;
+ }
+ public void setVersion(java.math.BigDecimal value) {
+ setAttributeValue(VERSION, value.toString());
+ }
+ public java.math.BigDecimal getVersion() {
+ return new java.math.BigDecimal(getAttributeValue(VERSION));
+ }
+
+
+
+ env-entryType
+ https://jakarta.ee/xml/ns/jakartaee
+ EnvEntry
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EnvEntry, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EnvEntryName"; }
+
+
+
+ ejb-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EjbRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EjbRefName"; }
+
+
+
+ resource-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResourceRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ResourceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ResRefName"; }
+
+
+
+ resource-env-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResourceEnvRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ResourceEnvRefName"; }
+
+
+
+ message-destination-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "MessageDestinationRefName"; }
+
+
+
+ persistence-context-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceContextRefType
+
+
+ persistence-unit-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceUnitRefType
+
+
+ lifecycle-callbackType
+ https://jakarta.ee/xml/ns/jakartaee
+ LifecycleCallbackType
+
+
+ fully-qualified-classType
+ https://jakarta.ee/xml/ns/jakartaee
+ FullyQualifiedClass
+ java.lang.String
+
+
+ message-destinationType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestination
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.MessageDestination, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "MessageDestinationName"; }
+
+
+
+ string
+ https://jakarta.ee/xml/ns/jakartaee
+ String
+ java.lang.String
+
+
+ xsdStringType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdStringType
+ java.lang.String
+
+
+ descriptionType
+ https://jakarta.ee/xml/ns/jakartaee
+ DescriptionType
+ java.lang.String
+
+
+ display-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ DisplayNameType
+ java.lang.String
+
+
+ iconType
+ https://jakarta.ee/xml/ns/jakartaee
+ Icon
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.common.Icon
+
+
+
+ pathType
+ https://jakarta.ee/xml/ns/jakartaee
+ PathType
+ java.lang.String
+
+
+ java-identifierType
+ https://jakarta.ee/xml/ns/jakartaee
+ JavaIdentifierType
+ java.lang.String
+
+
+ jndi-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ JndiNameType
+ java.lang.String
+
+
+ injection-targetType
+ https://jakarta.ee/xml/ns/jakartaee
+ InjectionTarget
+ org.netbeans.modules.j2ee.dd.api.common.InjectionTarget
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+
+ persistence-context-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceContextTypeType
+ java.lang.String
+
+
+ message-destination-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationTypeType
+ java.lang.String
+
+
+ message-destination-usageType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationUsageType
+ java.lang.String
+
+
+ message-destination-linkType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationLinkType
+ java.lang.String
+
+
+ res-authType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResAuthType
+ java.lang.String
+
+
+ res-sharing-scopeType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResSharingScopeType
+ java.lang.String
+
+
+ service-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRef
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ServiceRefName"; }
+
+
+
+ xsdAnyURIType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdAnyURIType
+ java.net.URI
+
+
+ xsdQNameType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdQNameType
+ java.lang.String
+
+
+ port-component-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PortComponentRef
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.common.PortComponentRef
+
+
+
+ service-ref_handlerType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandler
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "HandlerName"; }
+
+
+
+ service-ref_handler-chainsType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChains
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains
+
+
+ service-ref_handler-chainType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChainType
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain
+
+
+ service-ref_qname-pattern
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefQnamePattern
+ java.lang.String
+
+
+ service-ref_protocol-bindingListType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefProtocolBindingListType
+ String
+
+
+ param-valueType
+ https://jakarta.ee/xml/ns/jakartaee
+ InitParam
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.InitParam, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ParamName"; }
+
+
+
+ true-falseType
+ https://jakarta.ee/xml/ns/jakartaee
+ TrueFalseType
+ boolean
+
+
+ ejb-ref-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRefNameType
+ java.lang.String
+
+
+ ejb-ref-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRefTypeType
+ java.lang.String
+
+
+ homeType
+ https://jakarta.ee/xml/ns/jakartaee
+ HomeType
+ java.lang.String
+
+
+ remoteType
+ https://jakarta.ee/xml/ns/jakartaee
+ RemoteType
+ java.lang.String
+
+
+ ejb-linkType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbLinkType
+ java.lang.String
+
+
+ env-entry-type-valuesType
+ https://jakarta.ee/xml/ns/jakartaee
+ EnvEntryTypeValuesType
+ java.lang.String
+
+
+
+
+
+ handlerType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandler
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "HandlerName"; }
+
+
+
+ handler-chainsType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChains
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains
+
+
+ handler-chainType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChainType
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain
+
+
+ dewey-versionType
+ https://jakarta.ee/xml/ns/jakartaee
+ version
+ java.math.BigDecimal
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd
new file mode 100644
index 000000000000..538258a1d104
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd
@@ -0,0 +1,252 @@
+
+
+
+
+
+ Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/application-client_11.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The application-client element is the root element of an
+ application client deployment descriptor. The application
+ client deployment descriptor describes the enterprise bean
+ components and external resources referenced by the
+ application client.
+
+
+
+
+
+
+
+ The env-entry-name element contains the name of an
+ application client's environment entry. The name is a JNDI
+ name relative to the java:comp/env context. The name must
+ be unique within an application client.
+
+
+
+
+
+
+
+
+
+
+ The ejb-ref-name element contains the name of an enterprise bean
+ reference. The enterprise bean reference is an entry
+ in the application client's environment and is relative to the
+ java:comp/env context. The name must be unique within the
+ application client.
+
+ It is recommended that name is prefixed with "ejb/".
+
+
+
+
+
+
+
+
+
+
+ The res-ref-name element specifies the name of a
+ resource manager connection factory reference.The name
+ is a JNDI name relative to the java:comp/env context.
+ The name must be unique within an application client.
+
+
+
+
+
+
+
+
+
+
+ The resource-env-ref-name element specifies the name of
+ a resource environment reference; its value is the
+ environment entry name used in the application client
+ code. The name is a JNDI name relative to the
+ java:comp/env context and must be unique within an
+ application client.
+
+
+
+
+
+
+
+
+
+
+ The message-destination-ref-name element specifies the
+ name of a message destination reference; its value is
+ the message destination reference name used in the
+ application client code. The name is a JNDI name
+ relative to the java:comp/env context and must be unique
+ within an application client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The callback-handler element names a class provided by
+ the application. The class must have a no args
+ constructor and must implement the
+ jakarta.security.auth.callback.CallbackHandler
+ interface. The class will be instantiated by the
+ application client container and used by the container
+ to collect authentication information from the user.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The required value for the version is 11.
+
+
+
+
+
+
+
+
+ The metadata-complete attribute defines whether this
+ deployment descriptor and other related deployment
+ descriptors for this module (e.g., web service
+ descriptors) are complete, or whether the class
+ files available to this module and packaged with
+ this application should be examined for annotations
+ that specify deployment information.
+
+ If metadata-complete is set to "true", the deployment
+ tool must ignore any annotations that specify deployment
+ information, which might be present in the class files
+ of the application.
+
+ If metadata-complete is not specified or is set to
+ "false", the deployment tool must examine the class
+ files of the application for annotations, as
+ specified by the specifications.
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd
new file mode 100644
index 000000000000..3f904a644a8d
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd
@@ -0,0 +1,111 @@
+
+
+
+
+ application
+ https://jakarta.ee/xml/ns/jakartaee
+ Application
+ org.netbeans.modules.j2ee.dd.api.application.Application
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ public org.xml.sax.SAXParseException getError() {
+ return null;
+ }
+ public int getStatus() {
+ return STATE_VALID;
+ }
+ public void setVersion(java.math.BigDecimal value) {
+ setAttributeValue(VERSION, value.toString());
+ }
+ public java.math.BigDecimal getVersion() {
+ return new java.math.BigDecimal(getAttributeValue(VERSION));
+ }
+
+
+
+ moduleType
+ https://jakarta.ee/xml/ns/jakartaee
+ Module
+ org.netbeans.modules.j2ee.dd.api.application.Module
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+
+ security-roleType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityRole
+ org.netbeans.modules.j2ee.dd.api.common.SecurityRole
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+
+ pathType
+ https://jakarta.ee/xml/ns/jakartaee
+ Path
+ java.lang.String
+
+
+ descriptionType
+ https://jakarta.ee/xml/ns/jakartaee
+ Description
+ java.lang.String
+
+
+ xsdStringType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdString
+ java.lang.String
+
+
+ role-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ RoleName
+ java.lang.String
+
+
+ webType
+ https://jakarta.ee/xml/ns/jakartaee
+ Web
+ org.netbeans.modules.j2ee.dd.api.application.Web
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ public String getWebUriId() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(org.netbeans.modules.j2ee.dd.api.application.Application.VERSION_11);
+ }
+ public void setWebUriId(String value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(org.netbeans.modules.j2ee.dd.api.application.Application.VERSION_11);
+ }
+
+
+
+ string
+ https://jakarta.ee/xml/ns/jakartaee
+ String
+ java.lang.String
+
+
+ display-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ DisplayName
+ java.lang.String
+
+
+ iconType
+ https://jakarta.ee/xml/ns/jakartaee
+ Icon
+ org.netbeans.modules.j2ee.dd.api.common.Icon
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd
new file mode 100644
index 000000000000..f45bf73a859a
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd
@@ -0,0 +1,390 @@
+
+
+
+
+
+
+ Copyright (c) 2009, 2023 Oracle and/or its affiliates and others.
+ All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/application_11.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The application element is the root element of a Jakarta EE
+ application deployment descriptor.
+
+
+
+
+
+
+
+
+ The context-root element content must be unique
+ in the ear.
+
+
+
+
+
+
+
+
+
+
+
+ The security-role-name element content
+ must be unique in the ear.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The applicationType defines the structure of the
+ application.
+
+
+
+
+
+
+
+
+
+
+ If initialize-in-order is true, modules must be initialized
+ in the order they're listed in this deployment descriptor,
+ with the exception of application client modules, which can
+ be initialized in any order.
+ If initialize-in-order is not set or set to false, the order
+ of initialization is unspecified and may be product-dependent.
+
+
+
+
+
+
+
+ The application deployment descriptor must have one
+ module element for each Jakarta EE module in the
+ application package. A module element is defined
+ by moduleType definition.
+
+
+
+
+
+
+
+
+
+ The library-directory element specifies the pathname
+ of a directory within the application package, relative
+ to the top level of the application package. All files
+ named "*.jar" in this directory must be made available
+ in the class path of all components included in this
+ application package. If this element isn't specified,
+ the directory named "lib" is searched. An empty element
+ may be used to disable searching.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The required value for the version is 11.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The moduleType defines a single Jakarta EE module and contains a
+ connector, ejb, java, or web element, which indicates the
+ module type and contains a path to the module file, and an
+ optional alt-dd element, which specifies an optional URI to
+ the post-assembly version of the deployment descriptor.
+
+
+
+
+
+
+
+
+
+
+ The connector element specifies the URI of a
+ resource adapter archive file, relative to the
+ top level of the application package.
+
+
+
+
+
+
+
+
+ The ejb element specifies the URI of an ejb-jar,
+ relative to the top level of the application
+ package.
+
+
+
+
+
+
+
+
+ The java element specifies the URI of a java
+ application client module, relative to the top
+ level of the application package.
+
+
+
+
+
+
+
+
+
+
+ The alt-dd element specifies an optional URI to the
+ post-assembly version of the deployment descriptor
+ file for a particular Jakarta EE module. The URI must
+ specify the full pathname of the deployment
+ descriptor file relative to the application's root
+ directory. If alt-dd is not specified, the deployer
+ must read the deployment descriptor from the default
+ location and file name required by the respective
+ component specification.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The webType defines the web-uri and context-root of
+ a web application module.
+
+
+
+
+
+
+
+
+ The web-uri element specifies the URI of a web
+ application file, relative to the top level of the
+ application package.
+
+
+
+
+
+
+
+
+
+ The context-root element specifies the context root
+ of a web application.
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_0.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_0.xsd
new file mode 100644
index 000000000000..71ae3d744356
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_0.xsd
@@ -0,0 +1,372 @@
+
+
+
+
+
+
+
+
+
+ ...
+
+
+ The deployment descriptor may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for the Java EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd
+
+ ]]>
+
+
+
+
+
+
+ Bean classes of enabled beans must be
+ deployed in bean archives. A library jar, EJB jar,
+ application client jar or rar archive is a bean archive if
+ it has a file named beans.xml in the META-INF directory. The
+ WEB-INF/classes directory of a war is a bean archive if
+ there is a file named beans.xml in the WEB-INF directory of
+ the war. A directory in the JVM classpath is a bean archive
+ if it has a file named beans.xml in the META-INF directory.
+
+ When running in a CDI Lite environment, the bean-discovery-mode
+ attribute is the only configuration value read from a beans.xml file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The version of CDI this beans.xml is for. If the version is "4.0" (or
+ later), then the attribute bean-discovery-mode must be added.
+
+
+
+
+
+
+
+
+
+
+
+ It is strongly recommended you use "annotated". This is now the default and it
+ is also the default as of 4.0 when an empty beans.xml file is seen. When running
+ in a CDI Lite environment, this is the only aspect of the beans.xml file that
+ is used.
+
+ If the bean discovery mode is "all", then all types in this
+ archive will be considered. If the bean discovery mode is
+ "annotated", then only those types with bean defining annotations will be
+ considered. If the bean discovery mode is "none", then no
+ types will be considered.
+
+
+
+
+
+
+
+ Only those types with bean defining annotations will be
+ considered.
+
+
+
+
+
+
+ All types in this archive will be considered.
+
+
+
+
+
+
+ This archive will be ignored.
+
+
+
+
+
+
+
+
+
+
+
+
+ element allows exclusion of classes and packages from consideration. Various filters may be applied, and may be conditionally activated.]]>
+
+
+
+
+
+
+
+ would exclude all classes and subpackages of com.acme.]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ would exclude all classes and subpackages of com.acme.]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ By default, a bean archive has no enabled
+ interceptors bound via interceptor bindings. An interceptor
+ must be explicitly enabled by listing its class under the
+ <interceptors> element of the beans.xml file of the
+ bean archive. The order of the interceptor declarations
+ determines the interceptor ordering. Interceptors which
+ occur earlier in the list are called first. If the same
+ class is listed twice under the <interceptors>
+ element, the container automatically detects the problem and
+ treats it as a deployment problem.
+
+
+
+
+
+
+
+ Each child <class> element
+ must specify the name of an interceptor class. If
+ there is no class with the specified name, or if
+ the class with the specified name is not an
+ interceptor class, the container automatically
+ detects the problem and treats it as a deployment
+ problem.
+
+
+
+
+
+
+
+
+
+
+ By default, a bean archive has no enabled
+ decorators. A decorator must be explicitly enabled by
+ listing its bean class under the <decorators> element
+ of the beans.xml file of the bean archive. The order of the
+ decorator declarations determines the decorator ordering.
+ Decorators which occur earlier in the list are called first.
+ If the same class is listed twice under the
+ <decorators> element, the container automatically
+ detects the problem and treats it as a deployment problem.
+
+
+
+
+
+
+
+ Each child <class> element
+ must specify the name of a decorator class. If
+ there is no class with the specified name, or if
+ the class with the specified name is not a
+ decorator class, the container automatically
+ detects the problem and treats it as a deployment
+ problem.
+
+
+
+
+
+
+
+
+
+
+ An alternative is a bean that must be
+ explicitly declared in the beans.xml file if it should be
+ available for lookup, injection or EL resolution. By
+ default, a bean archive has no selected alternatives. An
+ alternative must be explicitly declared using the
+ <alternatives> element of the beans.xml file of the
+ bean archive. The <alternatives> element contains a
+ list of bean classes and stereotypes. An alternative is
+ selected for the bean archive if either: the alternative is
+ a managed bean or session bean and the bean class of the
+ bean is listed, or the alternative is a producer method,
+ field or resource, and the bean class that declares the
+ method or field is listed, or any @Alternative stereotype of
+ the alternative is listed.
+
+
+
+
+
+
+
+ Each child <class> element
+ must specify the name of an alternative bean class.
+ If there is no class with the specified name, or if
+ the class with the specified name is not an
+ alternative bean class, the container automatically
+ detects the problem and treats it as a deployment
+ problem. If the same class is listed twice under
+ the <alternatives> element, the container
+ automatically detects the problem and treats it as
+ a deployment problem.
+
+
+
+
+
+
+
+ Each child <stereotype>
+ element must specify the name of an @Alternative
+ stereotype annotation. If there is no annotation
+ with the specified name, or the annotation is not
+ an @Alternative stereotype, the container
+ automatically detects the problem and treats it as
+ a deployment problem. If the same stereotype is
+ listed twice under the <alternatives>
+ element, the container automatically detects the
+ problem and treats it as a deployment problem.
+
+
+
+
+
+
+
+
+
+ If an explicit bean archive contains the <trim/< element in its beans.xml file, types that don’t have
+ either a bean defining annotation (as defined in Bean defining annotations) or any scope annotation,
+ are removed from the set of discovered types.
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_1.xsd
new file mode 100644
index 000000000000..f5e05e80a87c
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_1.xsd
@@ -0,0 +1,372 @@
+
+
+
+
+
+
+
+
+
+ ...
+
+
+ The deployment descriptor may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for the Java EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/beans_4_1.xsd
+
+ ]]>
+
+
+
+
+
+
+ Bean classes of enabled beans must be
+ deployed in bean archives. A library jar, EJB jar,
+ application client jar or rar archive is a bean archive if
+ it has a file named beans.xml in the META-INF directory. The
+ WEB-INF/classes directory of a war is a bean archive if
+ there is a file named beans.xml in the WEB-INF directory of
+ the war. A directory in the JVM classpath is a bean archive
+ if it has a file named beans.xml in the META-INF directory.
+
+ When running in a CDI Lite environment, the bean-discovery-mode
+ attribute is the only configuration value read from a beans.xml file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The version of CDI this beans.xml is for. If the version is "4.1" (or
+ later), then the attribute bean-discovery-mode must be added.
+
+
+
+
+
+
+
+
+
+
+
+ It is strongly recommended you use "annotated". This is now the default and it
+ is also the default as of 4.1 when an empty beans.xml file is seen. When running
+ in a CDI Lite environment, this is the only aspect of the beans.xml file that
+ is used.
+
+ If the bean discovery mode is "all", then all types in this
+ archive will be considered. If the bean discovery mode is
+ "annotated", then only those types with bean defining annotations will be
+ considered. If the bean discovery mode is "none", then no
+ types will be considered.
+
+
+
+
+
+
+
+ Only those types with bean defining annotations will be
+ considered.
+
+
+
+
+
+
+ All types in this archive will be considered.
+
+
+
+
+
+
+ This archive will be ignored.
+
+
+
+
+
+
+
+
+
+
+
+
+ element allows exclusion of classes and packages from consideration. Various filters may be applied, and may be conditionally activated.]]>
+
+
+
+
+
+
+
+ would exclude all classes and subpackages of com.acme.]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ would exclude all classes and subpackages of com.acme.]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ By default, a bean archive has no enabled
+ interceptors bound via interceptor bindings. An interceptor
+ must be explicitly enabled by listing its class under the
+ <interceptors> element of the beans.xml file of the
+ bean archive. The order of the interceptor declarations
+ determines the interceptor ordering. Interceptors which
+ occur earlier in the list are called first. If the same
+ class is listed twice under the <interceptors>
+ element, the container automatically detects the problem and
+ treats it as a deployment problem.
+
+
+
+
+
+
+
+ Each child <class> element
+ must specify the name of an interceptor class. If
+ there is no class with the specified name, or if
+ the class with the specified name is not an
+ interceptor class, the container automatically
+ detects the problem and treats it as a deployment
+ problem.
+
+
+
+
+
+
+
+
+
+
+ By default, a bean archive has no enabled
+ decorators. A decorator must be explicitly enabled by
+ listing its bean class under the <decorators> element
+ of the beans.xml file of the bean archive. The order of the
+ decorator declarations determines the decorator ordering.
+ Decorators which occur earlier in the list are called first.
+ If the same class is listed twice under the
+ <decorators> element, the container automatically
+ detects the problem and treats it as a deployment problem.
+
+
+
+
+
+
+
+ Each child <class> element
+ must specify the name of a decorator class. If
+ there is no class with the specified name, or if
+ the class with the specified name is not a
+ decorator class, the container automatically
+ detects the problem and treats it as a deployment
+ problem.
+
+
+
+
+
+
+
+
+
+
+ An alternative is a bean that must be
+ explicitly declared in the beans.xml file if it should be
+ available for lookup, injection or EL resolution. By
+ default, a bean archive has no selected alternatives. An
+ alternative must be explicitly declared using the
+ <alternatives> element of the beans.xml file of the
+ bean archive. The <alternatives> element contains a
+ list of bean classes and stereotypes. An alternative is
+ selected for the bean archive if either: the alternative is
+ a managed bean or session bean and the bean class of the
+ bean is listed, or the alternative is a producer method,
+ field or resource, and the bean class that declares the
+ method or field is listed, or any @Alternative stereotype of
+ the alternative is listed.
+
+
+
+
+
+
+
+ Each child <class> element
+ must specify the name of an alternative bean class.
+ If there is no class with the specified name, or if
+ the class with the specified name is not an
+ alternative bean class, the container automatically
+ detects the problem and treats it as a deployment
+ problem. If the same class is listed twice under
+ the <alternatives> element, the container
+ automatically detects the problem and treats it as
+ a deployment problem.
+
+
+
+
+
+
+
+ Each child <stereotype>
+ element must specify the name of an @Alternative
+ stereotype annotation. If there is no annotation
+ with the specified name, or the annotation is not
+ an @Alternative stereotype, the container
+ automatically detects the problem and treats it as
+ a deployment problem. If the same stereotype is
+ listed twice under the <alternatives>
+ element, the container automatically detects the
+ problem and treats it as a deployment problem.
+
+
+
+
+
+
+
+
+
+ If an explicit bean archive contains the <trim/< element in its beans.xml file, types that don’t have
+ either a bean defining annotation (as defined in Bean defining annotations) or any scope annotation,
+ are removed from the set of discovered types.
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd
new file mode 100644
index 000000000000..e0ac46d5f1ab
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd
@@ -0,0 +1,1165 @@
+
+
+
+
+
+ Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/connector_2_1.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The connector element is the root element of the deployment
+ descriptor for the resource adapter. This element includes
+ general information - vendor name, resource adapter version,
+ icon - about the resource adapter module. It also includes
+ information specific to the implementation of the resource
+ adapter library as specified through the element
+ resourceadapter.
+
+
+
+
+
+
+
+
+
+
+
+
+ The activationspecType specifies an activation
+ specification. The information includes fully qualified
+ Java class name of an activation specification and a set of
+ required configuration property names.
+
+
+
+
+
+
+
+ com.wombat.ActivationSpecImpl
+
+
+ ]]>
+
+
+
+
+
+
+
+ The required-config-property element is deprecated since
+ Connectors 1.6 specification. The resource adapter
+ implementation is recommended to use the @NotNull
+ Bean Validation annotation or its XML validation
+ descriptor equivalent to indicate that a configuration
+ property is required to be specified by the deployer.
+ See the Jakarta Connectors specification for more information.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The adminobjectType specifies information about an
+ administered object. Administered objects are specific to a
+ messaging style or message provider. This contains
+ information on the Java type of the interface implemented by
+ an administered object, its Java class name and its
+ configuration properties.
+
+
+
+
+
+
+
+ jakarta.jms.Destination
+
+
+ ]]>
+
+
+
+
+
+
+ com.wombat.DestinationImpl
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The authentication-mechanismType specifies an authentication
+ mechanism supported by the resource adapter. Note that this
+ support is for the resource adapter and not for the
+ underlying EIS instance. The optional description specifies
+ any resource adapter specific requirement for the support of
+ security contract and authentication mechanism.
+
+ Note that BasicPassword mechanism type should support the
+ jakarta.resource.spi.security.PasswordCredential interface.
+ The Kerbv5 mechanism type should support the
+ org.ietf.jgss.GSSCredential interface or the deprecated
+ jakarta.resource.spi.security.GenericCredential interface.
+
+
+
+
+
+
+
+
+ BasicPassword
+
+
+ Kerbv5
+
+
+ Any additional security mechanisms are outside the
+ scope of the Jakarta Connectors architecture specification.
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ServerName
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ java.lang.String
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The config-propertyType contains a declaration of a single
+ configuration property that may be used for providing
+ configuration information.
+
+ The declaration consists of an optional description, name,
+ type and an optional value of the configuration property. If
+ the resource adapter provider does not specify a value than
+ the deployer is responsible for providing a valid value for
+ a configuration property.
+
+ Any bounds or well-defined values of properties should be
+ described in the description element.
+
+
+
+
+
+
+
+
+
+
+ WombatServer
+
+ ]]>
+
+
+
+
+
+
+
+ The element config-property-ignore is used to specify
+ whether the configuration tools must ignore considering the
+ configuration property during auto-discovery of
+ Configuration properties. See the Jakarta Connectors specification for
+ more details. If unspecified, the container must not ignore
+ the configuration property during auto-discovery.
+ This element must be one of the following, "true" or "false".
+
+
+
+
+
+
+
+
+ The element config-property-supports-dynamic-updates is used to specify
+ whether the configuration property allows its value to be updated, by
+ application server's configuration tools, during the lifetime of
+ the JavaBean instance. See the Jakarta Connectors specification for
+ more details. If unspecified, the container must not dynamically
+ reconfigure the property.
+ This element must be one of the following, "true" or "false".
+
+
+
+
+
+
+
+
+ The element config-property-confidential is used to specify
+ whether the configuration property is confidential and
+ recommends application server's configuration tools to use special
+ visual aids for editing them. See the Jakarta Connectors specification for
+ more details. If unspecified, the container must not treat the
+ property as confidential.
+ This element must be one of the following, "true" or "false".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The connection-definitionType defines a set of connection
+ interfaces and classes pertaining to a particular connection
+ type. This also includes configurable properties for
+ ManagedConnectionFactory instances that may be produced out
+ of this set.
+
+
+
+
+
+
+
+
+ com.wombat.ManagedConnectionFactoryImpl
+
+
+ ]]>
+
+
+
+
+
+
+
+ com.wombat.ConnectionFactory
+
+
+ OR
+
+ jakarta.resource.cci.ConnectionFactory
+
+
+ ]]>
+
+
+
+
+
+
+ com.wombat.ConnectionFactoryImpl
+
+
+ ]]>
+
+
+
+
+
+
+ jakarta.resource.cci.Connection
+
+
+ ]]>
+
+
+
+
+
+
+ com.wombat.ConnectionImpl
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The connectorType defines a resource adapter.
+
+
+
+
+
+
+
+
+ The element module-name specifies the name of the
+ resource adapter.
+
+ If there is no module-name specified, the module-name
+ is determined as defined in Section EE.8.1.1 and EE.8.1.2
+ of the Java Platform, Enterprise Edition (Jakarta EE)
+ Specification, version 6.
+
+
+
+
+
+
+
+
+
+ The element vendor-name specifies the name of
+ resource adapter provider vendor.
+
+ If there is no vendor-name specified, the application
+ server must consider the default "" (empty string) as
+ the name of the resource adapter provider vendor.
+
+
+
+
+
+
+
+
+ The element eis-type contains information about the
+ type of the EIS. For example, the type of an EIS can
+ be product name of EIS independent of any version
+ info.
+
+ This helps in identifying EIS instances that can be
+ used with this resource adapter.
+
+ If there is no eis-type specified, the application
+ server must consider the default "" (empty string) as
+ the type of the EIS.
+
+
+
+
+
+
+
+
+ The element resourceadapter-version specifies a string-based version
+ of the resource adapter from the resource adapter
+ provider.
+
+ If there is no resourceadapter-version specified, the application
+ server must consider the default "" (empty string) as
+ the version of the resource adapter.
+
+
+
+
+
+
+
+
+
+
+
+ The element required-work-context specifies a fully qualified class
+ name that implements WorkContext interface, that the resource adapter
+ requires the application server to support.
+
+
+
+
+
+
+
+
+
+ The version indicates the version of the schema to be used by the
+ deployment tool. This element doesn't have a default, and the resource adapter
+ developer/deployer is required to specify it. The element allows the deployment
+ tool to choose which schema to validate the descriptor against.
+
+
+
+
+
+
+
+
+
+ The metadata-complete attribute defines whether the deployment
+ descriptor for the resource adapter module is complete, or whether
+ the class files available to the module and packaged with the resource
+ adapter should be examined for annotations that specify deployment
+ information.
+
+ If metadata-complete is set to "true", the deployment tool of the
+ application server must ignore any annotations that specify deployment
+ information, which might be present in the class files of the
+ application.If metadata-complete is not specified or is set to "false",
+ the deployment tool must examine the class files of the application for
+ annotations, as specified by this specification. If the
+ deployment descriptor is not included or is included but not marked
+ metadata-complete, the deployment tool will process annotations.
+
+ Application servers must assume that metadata-complete is true for
+ resource adapter modules with deployment descriptor version
+ lower than 1.6.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The credential-interfaceType specifies the
+ interface that the resource adapter implementation
+ supports for the representation of the
+ credentials. This element(s) that use this type,
+ i.e. credential-interface, should be used by
+ application server to find out the Credential
+ interface it should use as part of the security
+ contract.
+
+ The possible values are:
+
+ jakarta.resource.spi.security.PasswordCredential
+ org.ietf.jgss.GSSCredential
+ jakarta.resource.spi.security.GenericCredential
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The inbound-resourceadapterType specifies information
+ about an inbound resource adapter. This contains information
+ specific to the implementation of the resource adapter
+ library as specified through the messageadapter element.
+
+
+
+
+
+
+
+
+
+ The messagelistener-type element content must be
+ unique in the messageadapter. Several messagelisteners
+ can not use the same messagelistener-type.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The licenseType specifies licensing requirements for the
+ resource adapter module. This type specifies whether a
+ license is required to deploy and use this resource adapter,
+ and an optional description of the licensing terms
+ (examples: duration of license, number of connection
+ restrictions). It is used by the license element.
+
+
+
+
+
+
+
+
+
+ The element license-required specifies whether a
+ license is required to deploy and use the
+ resource adapter. This element must be one of
+ the following, "true" or "false".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The messageadapterType specifies information about the
+ messaging capabilities of the resource adapter. This
+ contains information specific to the implementation of the
+ resource adapter library as specified through the
+ messagelistener element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The messagelistenerType specifies information about a
+ specific message listener supported by the messaging
+ resource adapter. It contains information on the Java type
+ of the message listener interface and an activation
+ specification.
+
+
+
+
+
+
+
+ jakarta.jms.MessageListener
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The outbound-resourceadapterType specifies information about
+ an outbound resource adapter. The information includes fully
+ qualified names of classes/interfaces required as part of
+ the connector architecture specified contracts for
+ connection management, level of transaction support
+ provided, one or more authentication mechanisms supported
+ and additional required security permissions.
+
+ If any of the outbound resource adapter elements (transaction-support,
+ authentication-mechanism, reauthentication-support) is specified through
+ this element or metadata annotations, and no connection-definition is
+ specified as part of this element or through annotations, the
+ application server must consider this an error and fail deployment.
+
+ If there is no authentication-mechanism specified as part of
+ this element or metadata annotations, then the resource adapter does
+ not support any standard security authentication mechanisms as
+ part of security contract. The application server ignores the security
+ part of the system contracts in this case.
+
+ If there is no transaction-support specified as part of this element
+ or metadata annotation, then the application server must consider that
+ the resource adapter does not support either the resource manager local
+ or Jakarta Transactions transactions and must consider the transaction support as
+ NoTransaction. Note that resource adapters may specify the level of
+ transaction support to be used at runtime for a ManagedConnectionFactory
+ through the TransactionSupport interface.
+
+ If there is no reauthentication-support specified as part of
+ this element or metadata annotation, then the application server must consider
+ that the resource adapter does not support re-authentication of
+ ManagedConnections.
+
+
+
+
+
+
+
+
+
+
+
+ The element reauthentication-support specifies
+ whether the resource adapter implementation supports
+ re-authentication of existing Managed- Connection
+ instance. Note that this information is for the
+ resource adapter implementation and not for the
+ underlying EIS instance. This element must have
+ either a "true" or "false" value.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Destination
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The resourceadapterType specifies information about the
+ resource adapter. The information includes fully qualified
+ resource adapter Java class name, configuration properties,
+ information specific to the implementation of the resource
+ adapter library as specified through the
+ outbound-resourceadapter and inbound-resourceadapter
+ elements, and an optional set of administered objects.
+
+
+
+
+
+
+
+
+ The element resourceadapter-class specifies the
+ fully qualified name of a Java class that implements
+ the jakarta.resource.spi.ResourceAdapter
+ interface. This Java class is provided as part of
+ resource adapter's implementation of connector
+ architecture specified contracts. The implementation
+ of this class is required to be a JavaBean.
+
+
+
+
+
+
+
+
+
+
+ The connectionfactory-interface element content
+ must be unique in the outbound-resourceadapter.
+ Multiple connection-definitions can not use the
+ same connectionfactory-type.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The adminobject-interface and adminobject-class element content must be
+ unique in the resourceadapterType. Several admin objects
+ can not use the same adminobject-interface and adminobject-class.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The security-permissionType specifies a security
+ permission that is required by the resource adapter code.
+
+ The security permission listed in the deployment descriptor
+ are ones that are different from those required by the
+ default permission set as specified in the connector
+ specification. The optional description can mention specific
+ reason that resource adapter requires a given security
+ permission.
+
+
+
+
+
+
+
+
+
+ The element security-permission-spec specifies a security
+ permission based on the Security policy file
+ syntax. Refer to the following URL for Sun's
+ implementation of the security permission
+ specification:
+
+ http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd
new file mode 100644
index 000000000000..4f8e7c01a084
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd
@@ -0,0 +1,3631 @@
+
+
+
+
+
+
+ Copyright (c) 2009, 2023 Oracle and/or its affiliates and others.
+ All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+ The following definitions that appear in the common
+ shareable schema(s) of Jakarta EE deployment descriptors should be
+ interpreted with respect to the context they are included:
+
+
+ Deployment Component may indicate one of the following:
+ Jakarta EE application;
+ application client;
+ web application;
+ enterprise bean;
+ resource adapter;
+
+ Deployment File may indicate one of the following:
+ ear file;
+ war file;
+ jar file;
+ rar file;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This group keeps the usage of the contained description related
+ elements consistent across Jakarta EE deployment descriptors.
+
+ All elements may occur multiple times with different languages,
+ to support localization of the content.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This group keeps the usage of the contained JNDI environment
+ reference elements consistent across Jakarta EE deployment descriptors.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This group collects elements that are common to most
+ JNDI resource elements.
+
+
+
+
+
+
+
+
+
+
+
+ The JNDI name to be looked up to resolve a resource reference.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This group collects elements that are common to all the
+ JNDI resource elements. It does not include the lookup-name
+ element, that is only applicable to some resource elements.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of an administered object.
+
+
+
+
+
+
+
+
+ Description of this administered object.
+
+
+
+
+
+
+
+
+ The name element specifies the JNDI name of the
+ administered object being defined.
+
+
+
+
+
+
+
+
+ The administered object's interface type.
+
+
+
+
+
+
+
+
+ The administered object's class name.
+
+
+
+
+
+
+
+
+ Resource adapter name.
+
+
+
+
+
+
+
+
+ Property of the administered object property. This may be a
+ vendor-specific property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a Connector Connection Factory resource.
+
+
+
+
+
+
+
+
+ Description of this resource.
+
+
+
+
+
+
+
+
+ The name element specifies the JNDI name of the
+ resource being defined.
+
+
+
+
+
+
+
+
+ The fully qualified class name of the connection factory
+ interface.
+
+
+
+
+
+
+
+
+
+ Resource adapter name.
+
+
+
+
+
+
+
+
+ Maximum number of connections that should be concurrently
+ allocated for a connection pool.
+
+
+
+
+
+
+
+
+ Minimum number of connections that should be concurrently
+ allocated for a connection pool.
+
+
+
+
+
+
+
+
+ The level of transaction support the connection factory
+ needs to support.
+
+
+
+
+
+
+
+
+ Resource property. This may be a vendor-specific
+ property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a ContextService.
+
+
+
+
+
+
+
+
+ Description of this ContextService.
+
+
+
+
+
+
+
+
+ JNDI name of the ContextService instance being defined.
+ The JNDI name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+
+
+
+
+
+
+
+
+ A ContextService injection point annotated with these qualifier annotations
+ injects a bean that is produced by this context-service element.
+ Applications can define their own Producers for ContextService injection points
+ as long as the qualifier annotations on the producer do not conflict with the
+ non-empty qualifier list of a context-service.
+
+ You can specify a single qualifier element with no value to indicate an
+ empty list of qualifier annotation classes.
+
+
+
+
+
+
+
+
+ Types of context to clear whenever a thread runs a
+ contextual task or action. The thread's previous context
+ is restored afterward. Context types that are defined by
+ the Jakarta EE Concurrency specification include:
+ Application, Security, Transaction,
+ and Remaining, which means all available thread context
+ types that are not specified elsewhere. You can also specify
+ vendor-specific context types. Absent other configuration,
+ cleared context defaults to Transaction. You can specify
+ a single cleared element with no value to indicate an
+ empty list of context types to clear. If neither
+ propagated nor unchanged specify (or default to) Remaining,
+ then Remaining is automatically appended to the list of
+ cleared context types.
+
+
+
+
+
+
+
+
+ Types of context to capture from the requesting thread
+ and propagate to a thread that runs a contextual task
+ or action. The captured context is re-established
+ when threads run the contextual task or action,
+ with the respective thread's previous context being
+ restored afterward. Context types that are defined by
+ the Jakarta EE Concurrency specification include:
+ Application, Security,
+ and Remaining, which means all available thread context
+ types that are not specified elsewhere. You can also specify
+ vendor-specific context types. Absent other configuration,
+ propagated context defaults to Remaining. You can specify
+ a single propagated element with no value to indicate that
+ no context types should be propagated.
+
+
+
+
+
+
+
+
+ Types of context that are left alone when a thread runs a
+ contextual task or action. Context types that are defined
+ by the Jakarta EE Concurrency specification include:
+ Application, Security, Transaction,
+ and Remaining, which means all available thread context
+ types that are not specified elsewhere. You can also specify
+ vendor-specific context types. Absent other configuration,
+ unchanged context defaults to empty. You can specify
+ a single unchanged element with no value to indicate that
+ no context types should be left unchanged.
+
+
+
+
+
+
+
+
+ Vendor-specific property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a DataSource.
+
+
+
+
+
+
+
+
+ Description of this DataSource.
+
+
+
+
+
+
+
+
+ The name element specifies the JNDI name of the
+ data source being defined.
+
+
+
+
+
+
+
+
+
+ DataSource, XADataSource or ConnectionPoolDataSource
+ implementation class.
+
+
+
+
+
+
+
+
+ Database server name.
+
+
+
+
+
+
+
+
+ Port number where a server is listening for requests.
+
+
+
+
+
+
+
+
+ Name of a database on a server.
+
+
+
+
+
+
+
+ url property is specified
+ along with other standard DataSource properties
+ such as serverName, databaseName
+ and portNumber, the more specific properties will
+ take precedence and url will be ignored.
+
+ ]]>
+
+
+
+
+
+
+
+ User name to use for connection authentication.
+
+
+
+
+
+
+
+
+ Password to use for connection authentication.
+
+
+
+
+
+
+
+
+ JDBC DataSource property. This may be a vendor-specific
+ property or a less commonly used DataSource property.
+
+
+
+
+
+
+
+
+ Sets the maximum time in seconds that this data source
+ will wait while attempting to connect to a database.
+
+
+
+
+
+
+
+
+ Set to false if connections should not participate in
+ transactions.
+
+
+
+
+
+
+
+
+ Isolation level for connections.
+
+
+
+
+
+
+
+
+ Number of connections that should be created when a
+ connection pool is initialized.
+
+
+
+
+
+
+
+
+ Maximum number of connections that should be concurrently
+ allocated for a connection pool.
+
+
+
+
+
+
+
+
+ Minimum number of connections that should be concurrently
+ allocated for a connection pool.
+
+
+
+
+
+
+
+
+ The number of seconds that a physical connection should
+ remain unused in the pool before the connection is
+ closed for a connection pool.
+
+
+
+
+
+
+
+
+ The total number of statements that a connection pool
+ should keep open.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The description type is used by a description element to
+ provide text describing the parent element. The elements
+ that use this type should include any information that the
+ Deployment Component's Deployment File file producer wants
+ to provide to the consumer of the Deployment Component's
+ Deployment File (i.e., to the Deployer). Typically, the
+ tools used by such a Deployment File consumer will display
+ the description when processing the parent element that
+ contains the description.
+
+ The lang attribute defines the language that the
+ description is provided in. The default value is "en" (English).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type defines a dewey decimal that is used
+ to describe versions of documents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Employee Self Service
+
+
+ The value of the xml:lang attribute is "en" (English) by default.
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EmployeeRecord
+
+ ../products/product.jar#ProductEJB
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The ejb-local-refType is used by ejb-local-ref elements for
+ the declaration of a reference to an enterprise bean's local
+ home or to the local business interface of a 3.0 bean.
+ The declaration consists of:
+
+ - an optional description
+ - the enterprise bean's reference name used in the code of the
+ Deployment Component that's referencing the enterprise bean.
+ - the optional expected type of the referenced enterprise bean
+ - the optional expected local interface of the referenced
+ enterprise bean or the local business interface of the
+ referenced enterprise bean.
+ - the optional expected local home interface of the referenced
+ enterprise bean. Not applicable if this ejb-local-ref refers
+ to the local business interface of a 3.0 bean.
+ - optional ejb-link information, used to specify the
+ referenced enterprise bean
+ - optional elements to define injection of the named enterprise
+ bean into a component field or property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ejb/Payroll
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The ejb-refType is used by ejb-ref elements for the
+ declaration of a reference to an enterprise bean's home or
+ to the remote business interface of a 3.0 bean.
+ The declaration consists of:
+
+ - an optional description
+ - the enterprise bean's reference name used in the code of
+ the Deployment Component that's referencing the enterprise
+ bean.
+ - the optional expected type of the referenced enterprise bean
+ - the optional remote interface of the referenced enterprise bean
+ or the remote business interface of the referenced enterprise
+ bean
+ - the optional expected home interface of the referenced
+ enterprise bean. Not applicable if this ejb-ref
+ refers to the remote business interface of a 3.0 bean.
+ - optional ejb-link information, used to specify the
+ referenced enterprise bean
+ - optional elements to define injection of the named enterprise
+ bean into a component field or property
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The ejb-ref-typeType contains the expected type of the
+ referenced enterprise bean.
+
+ The ejb-ref-type designates a value
+ that must be one of the following:
+
+ Entity
+ Session
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type is used to designate an empty
+ element when used.
+
+
+
+
+
+
+
+
+
+
+
+
+ The env-entryType is used to declare an application's
+ environment entry. The declaration consists of an optional
+ description, the name of the environment entry, a type
+ (optional if the value is injected, otherwise required), and
+ an optional value.
+
+ It also includes optional elements to define injection of
+ the named resource into fields or JavaBeans properties.
+
+ If a value is not specified and injection is requested,
+ no injection will occur and no entry of the specified name
+ will be created. This allows an initial value to be
+ specified in the source code without being incorrectly
+ changed when no override has been specified.
+
+ If a value is not specified and no injection is requested,
+ a value must be supplied during deployment.
+
+ This type is used by env-entry elements.
+
+
+
+
+
+
+
+
+
+ minAmount
+
+ ]]>
+
+
+
+
+
+
+
+ java.lang.Integer
+
+ ]]>
+
+
+
+
+
+
+
+ 100.00
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ java.lang.Boolean
+ java.lang.Class
+ com.example.Color
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The elements that use this type designate the name of a
+ Java class or interface. The name is in the form of a
+ "binary name", as defined in the JLS. This is the form
+ of name used in Class.forName(). Tools that need the
+ canonical name (the name used in source code) will need
+ to convert this binary name to the canonical name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type defines four different values which can designate
+ boolean values. This includes values yes and no which are
+ not designated by xsd:boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The icon type contains small-icon and large-icon elements
+ that specify the file names for small and large GIF, JPEG,
+ or PNG icon images used to represent the parent element in a
+ GUI tool.
+
+ The xml:lang attribute defines the language that the
+ icon file names are provided in. Its value is "en" (English)
+ by default.
+
+
+
+
+
+
+
+
+ employee-service-icon16x16.jpg
+
+ ]]>
+
+
+
+
+
+
+ employee-service-icon32x32.jpg
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An injection target specifies a class and a name within
+ that class into which a resource should be injected.
+
+ The injection target class specifies the fully qualified
+ class name that is the target of the injection. The
+ Jakarta EE specifications describe which classes can be an
+ injection target.
+
+ The injection target name specifies the target within
+ the specified class. The target is first looked for as a
+ JavaBeans property name. If not found, the target is
+ looked for as a field name.
+
+ The specified resource will be injected into the target
+ during initialization of the class by either calling the
+ set method for the target property or by setting a value
+ into the named field.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The following transaction isolation levels are allowed
+ (see documentation for the java.sql.Connection interface):
+ TRANSACTION_READ_UNCOMMITTED
+ TRANSACTION_READ_COMMITTED
+ TRANSACTION_REPEATABLE_READ
+ TRANSACTION_SERIALIZABLE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The java-identifierType defines a Java identifier.
+ The users of this type should further verify that
+ the content does not contain Java reserved keywords.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is a generic type that designates a Java primitive
+ type or a fully qualified name of a Java interface/type,
+ or an array of such types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+ Example:
+
+ jdbc:mysql://localhost:3307/testdb
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a Messaging Connection Factory.
+
+
+
+
+
+
+
+
+ Description of this Messaging Connection Factory.
+
+
+
+
+
+
+
+
+ The name element specifies the JNDI name of the
+ messaging connection factory being defined.
+
+
+
+
+
+
+
+
+ Fully-qualified name of the messaging connection factory
+ interface. Permitted values are jakarta.jms.ConnectionFactory,
+ jakarta.jms.QueueConnectionFactory, or
+ jakarta.jms.TopicConnectionFactory. If not specified,
+ jakarta.jms.ConnectionFactory will be used.
+
+
+
+
+
+
+
+
+ Fully-qualified name of the messaging connection factory
+ implementation class. Ignored if a resource adapter
+ is used.
+
+
+
+
+
+
+
+
+ Resource adapter name. If not specified, the application
+ server will define the default behavior, which may or may
+ not involve the use of a resource adapter.
+
+
+
+
+
+
+
+
+ User name to use for connection authentication.
+
+
+
+
+
+
+
+
+ Password to use for connection authentication.
+
+
+
+
+
+
+
+
+ Client id to use for connection.
+
+
+
+
+
+
+
+
+ Messaging Connection Factory property. This may be a vendor-specific
+ property or a less commonly used ConnectionFactory property.
+
+
+
+
+
+
+
+
+ Set to false if connections should not participate in
+ transactions.
+
+
+
+
+
+
+
+
+ Maximum number of connections that should be concurrently
+ allocated for a connection pool.
+
+
+
+
+
+
+
+
+ Minimum number of connections that should be concurrently
+ allocated for a connection pool.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a Messaging Destination.
+
+
+
+
+
+
+
+
+ Description of this Messaging Destination.
+
+
+
+
+
+
+
+
+ The name element specifies the JNDI name of the
+ messaging destination being defined.
+
+
+
+
+
+
+
+
+ Fully-qualified name of the messaging destination interface.
+ Permitted values are jakarta.jms.Queue and jakarta.jms.Topic
+
+
+
+
+
+
+
+
+ Fully-qualified name of the messaging destination implementation
+ class. Ignored if a resource adapter is used unless the
+ resource adapter defines more than one destination implementation
+ class for the specified interface.
+
+
+
+
+
+
+
+
+ Resource adapter name. If not specified, the application
+ server will define the default behavior, which may or may
+ not involve the use of a resource adapter.
+
+
+
+
+
+
+
+
+ Name of the queue or topic.
+
+
+
+
+
+
+
+
+ Messaging Destination property. This may be a vendor-specific
+ property or a less commonly used Destination property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The jndi-nameType type designates a JNDI name in the
+ Deployment Component's environment and is relative to the
+ java:comp/env context. A JNDI name must be unique within the
+ Deployment Component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.aardvark.payroll.PayrollHome
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The lifecycle-callback type specifies a method on a
+ class to be called when a lifecycle event occurs.
+ Note that each class may have only one lifecycle callback
+ method for any given event and that the method may not
+ be overloaded.
+
+ If the lifefycle-callback-class element is missing then
+ the class defining the callback is assumed to be the
+ component class in scope at the place in the descriptor
+ in which the callback definition appears.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The listenerType indicates the deployment properties for a web
+ application listener bean.
+
+
+
+
+
+
+
+
+
+
+ The listener-class element declares a class in the
+ application must be registered as a web
+ application listener bean. The value is the fully
+ qualified classname of the listener class.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The localType defines the fully-qualified name of an
+ enterprise bean's local interface.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The local-homeType defines the fully-qualified
+ name of an enterprise bean's local home interface.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a Mail Session resource.
+
+
+
+
+
+
+
+
+ Description of this Mail Session resource.
+
+
+
+
+
+
+
+
+ The name element specifies the JNDI name of the
+ Mail Session resource being defined.
+
+
+
+
+
+
+
+
+ Storage protocol.
+
+
+
+
+
+
+
+
+ Service provider store protocol implementation class
+
+
+
+
+
+
+
+
+ Transport protocol.
+
+
+
+
+
+
+
+
+ Service provider transport protocol implementation class
+
+
+
+
+
+
+
+
+ Mail server host name.
+
+
+
+
+
+
+
+
+ Mail server user name.
+
+
+
+
+
+
+
+
+ Password.
+
+
+
+
+
+
+
+
+ Email address to indicate the message sender.
+
+
+
+
+
+
+
+
+ Mail server property. This may be a vendor-specific
+ property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a ManagedExecutorService.
+
+
+
+
+
+
+
+
+ Description of this ManagedExecutorService.
+
+
+
+
+
+
+
+
+ JNDI name of the ManagedExecutorService instance being defined.
+ The JNDI name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+
+
+
+
+
+
+
+
+ Refers to the name of a ContextServiceDefinition or
+ context-service deployment descriptor element,
+ which determines how context is applied to tasks and actions
+ that run on this executor.
+ The name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+ In the absence of a configured value,
+ java:comp/DefaultContextService is used.
+
+
+
+
+
+
+
+
+ A ManagedExecutorService injection point annotated with these qualifier annotations
+ injects a bean that is produced by this managed-executor element.
+ Applications can define their own Producers for ManagedExecutorService injection points
+ as long as the qualifier annotations on the producer do not conflict with the
+ non-empty qualifier list of a managed-executor.
+
+ You can specify a single qualifier element with no value to indicate an
+ empty list of qualifier annotation classes.
+
+
+
+
+
+
+
+
+ Upper bound on contextual tasks and actions that this executor
+ will simultaneously execute asynchronously. This constraint does
+ not apply to tasks and actions that the executor runs inline,
+ such as when a thread requests CompletableFuture.join and the
+ action runs inline if it has not yet started.
+ The default is unbounded, although still subject to
+ resource constraints of the system.
+
+
+
+
+
+
+
+
+ The amount of time in milliseconds that a task or action
+ can execute before it is considered hung.
+
+
+
+
+
+
+
+
+ Indicates whether this executor is requested to
+ create virtual threads for tasks that do not run inline.
+ When true, the executor can create
+ virtual threads if it is capable of doing so
+ and if the request is not overridden by vendor-specific
+ configuration that restricts the use of virtual threads.
+
+
+
+
+
+
+
+
+ Vendor-specific property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a ManagedScheduledExecutorService.
+
+
+
+
+
+
+
+
+ Description of this ManagedScheduledExecutorService.
+
+
+
+
+
+
+
+
+ JNDI name of the ManagedScheduledExecutorService instance
+ being defined.
+ The JNDI name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+
+
+
+
+
+
+
+
+ Refers to the name of a ContextServiceDefinition or
+ context-service deployment descriptor element,
+ which determines how context is applied to tasks and actions
+ that run on this executor.
+ The name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+ In the absence of a configured value,
+ java:comp/DefaultContextService is used.
+
+
+
+
+
+
+
+
+ A ManagedScheduledExecutorService injection point annotated with these qualifier annotations
+ injects a bean that is produced by this managed-scheduled-executor element.
+ Applications can define their own Producers for ManagedScheduledExecutorService injection points
+ as long as the qualifier annotations on the producer do not conflict with the
+ non-empty qualifier list of a managed-scheduled-executor.
+
+ You can specify a single qualifier element with no value to indicate an
+ empty list of qualifier annotation classes.
+
+
+
+
+
+
+
+
+ Upper bound on contextual tasks and actions that this executor
+ will simultaneously execute asynchronously. This constraint does
+ not apply to tasks and actions that the executor runs inline,
+ such as when a thread requests CompletableFuture.join and the
+ action runs inline if it has not yet started. This constraint also
+ does not apply to tasks that are scheduled via the schedule methods.
+ The default is unbounded, although still subject to
+ resource constraints of the system.
+
+
+
+
+
+
+
+
+ The amount of time in milliseconds that a task or action
+ can execute before it is considered hung.
+
+
+
+
+
+
+
+
+ Indicates whether this executor is requested to
+ create virtual threads for tasks that do not run inline.
+ When true, the executor can create
+ virtual threads if it is capable of doing so
+ and if the request is not overridden by vendor-specific
+ configuration that restricts the use of virtual threads.
+
+
+
+
+
+
+
+
+ Vendor-specific property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration of a ManagedThreadFactory.
+
+
+
+
+
+
+
+
+ Description of this ManagedThreadFactory.
+
+
+
+
+
+
+
+
+ JNDI name of the ManagedThreadFactory instance being defined.
+ The JNDI name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+
+
+
+
+
+
+
+
+ Refers to the name of a ContextServiceDefinition or
+ context-service deployment descriptor element,
+ which determines how context is applied to threads
+ from this thread factory.
+ The name must be in a valid Jakarta EE namespace,
+ such as java:comp, java:module, java:app, or java:global.
+ In the absence of a configured value,
+ java:comp/DefaultContextService is used.
+
+
+
+
+
+
+
+
+ A ManagedThreadFactory injection point annotated with these qualifier annotations
+ injects a bean that is produced by this managed-thread-factory element.
+ Applications can define their own Producers for ManagedThreadFactory injection points
+ as long as the qualifier annotations on the producer do not conflict with the
+ non-empty qualifier list of a managed-thread-factory.
+
+ You can specify a single qualifier element with no value to indicate an
+ empty list of qualifier annotation classes.
+
+
+
+
+
+
+
+
+ Priority for threads created by this thread factory.
+ The default is 5 (java.lang.Thread.NORM_PRIORITY).
+
+
+
+
+
+
+
+
+ Indicates whether this executor is requested to
+ create virtual threads for tasks that do not run inline.
+ When true, the executor can create
+ virtual threads if it is capable of doing so
+ and if the request is not overridden by vendor-specific
+ configuration that restricts the use of virtual threads.
+
+
+
+
+
+
+
+
+ Vendor-specific property.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type is a general type that can be used to declare
+ parameter/value lists.
+
+
+
+
+
+
+
+
+
+
+ The param-name element contains the name of a
+ parameter.
+
+
+
+
+
+
+
+
+
+ The param-value element contains the value of a
+ parameter.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The elements that use this type designate either a relative
+ path or an absolute path starting with a "/".
+
+ In elements that specify a pathname to a file within the
+ same Deployment File, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the Deployment File's namespace. Absolute filenames (i.e.,
+ those starting with "/") also specify names in the root of
+ the Deployment File's namespace. In general, relative names
+ are preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ myPersistenceContext
+
+
+
+
+ myPersistenceContext
+
+ PersistenceUnit1
+
+ Extended
+
+
+ ]]>
+
+
+
+
+
+
+
+
+ The persistence-context-ref-name element specifies
+ the name of a persistence context reference; its
+ value is the environment entry name used in
+ Deployment Component code. The name is a JNDI name
+ relative to the java:comp/env context.
+
+
+
+
+
+
+
+
+ The Application Assembler(or BeanProvider) may use the
+ following syntax to avoid the need to rename persistence
+ units to have unique names within a Jakarta EE application.
+
+ The Application Assembler specifies the pathname of the
+ root of the persistence.xml file for the referenced
+ persistence unit and appends the name of the persistence
+ unit separated from the pathname by #. The pathname is
+ relative to the referencing application component jar file.
+ In this manner, multiple persistence units with the same
+ persistence unit name may be uniquely identified when the
+ Application Assembler cannot change persistence unit names.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Used to specify properties for the container or persistence
+ provider. Vendor-specific properties may be included in
+ the set of properties. Properties that are not recognized
+ by a vendor must be ignored. Entries that make use of the
+ namespace jakarta.persistence and its subnamespaces must not
+ be used for vendor-specific properties. The namespace
+ jakarta.persistence is reserved for use by the specification.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The persistence-context-synchronizationType specifies
+ whether a container-managed persistence context is automatically
+ synchronized with the current transaction.
+
+ The value of the persistence-context-synchronization element
+ must be one of the following:
+ Synchronized
+ Unsynchronized
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The persistence-context-typeType specifies the transactional
+ nature of a persistence context reference.
+
+ The value of the persistence-context-type element must be
+ one of the following:
+ Transaction
+ Extended
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Specifies a thread priority value in the range of
+ 1 (java.lang.Thread.MIN_PRIORITY) to 10 (java.lang.Thread.MAX_PRIORITY).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Specifies a name/value pair.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ myPersistenceUnit
+
+
+
+
+ myPersistenceUnit
+
+ PersistenceUnit1
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+ The persistence-unit-ref-name element specifies
+ the name of a persistence unit reference; its
+ value is the environment entry name used in
+ Deployment Component code. The name is a JNDI name
+ relative to the java:comp/env context.
+
+
+
+
+
+
+
+
+ The Application Assembler(or BeanProvider) may use the
+ following syntax to avoid the need to rename persistence
+ units to have unique names within a Jakarta EE application.
+
+ The Application Assembler specifies the pathname of the
+ root of the persistence.xml file for the referenced
+ persistence unit and appends the name of the persistence
+ unit separated from the pathname by #. The pathname is
+ relative to the referencing application component jar file.
+ In this manner, multiple persistence units with the same
+ persistence unit name may be uniquely identified when the
+ Application Assembler cannot change persistence unit names.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.wombat.empl.EmployeeService
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jms/StockQueue
+
+ jakarta.jms.Queue
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+ The resource-env-ref-name element specifies the name
+ of a resource environment reference; its value is
+ the environment entry name used in
+ the Deployment Component code. The name is a JNDI
+ name relative to the java:comp/env context and must
+ be unique within a Deployment Component.
+
+
+
+
+
+
+
+
+
+ The resource-env-ref-type element specifies the type
+ of a resource environment reference. It is the
+ fully qualified name of a Java language class or
+ interface.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jdbc/EmployeeAppDB
+ javax.sql.DataSource
+ Container
+ Shareable
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+ The res-ref-name element specifies the name of a
+ resource manager connection factory reference.
+ The name is a JNDI name relative to the
+ java:comp/env context.
+ The name must be unique within a Deployment File.
+
+
+
+
+
+
+
+
+
+ The res-type element specifies the type of the data
+ source. The type is specified by the fully qualified
+ Java language class or interface
+ expected to be implemented by the data source.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The res-authType specifies whether the Deployment Component
+ code signs on programmatically to the resource manager, or
+ whether the Container will sign on to the resource manager
+ on behalf of the Deployment Component. In the latter case,
+ the Container uses information that is supplied by the
+ Deployer.
+
+ The value must be one of the two following:
+
+ Application
+ Container
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The res-sharing-scope type specifies whether connections
+ obtained through the given resource manager connection
+ factory reference can be shared. The value, if specified,
+ must be one of the two following:
+
+ Shareable
+ Unshareable
+
+ The default value is Shareable.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The run-asType specifies the run-as identity to be
+ used for the execution of a component. It contains an
+ optional description, and the name of a security role.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The role-nameType designates the name of a security role.
+
+ The name must conform to the lexical rules for a token.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This role includes all employees who are authorized
+ to access the employee service application.
+
+ employee
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The security-role-refType contains the declaration of a
+ security role reference in a component's or a
+ Deployment Component's code. The declaration consists of an
+ optional description, the security role name used in the
+ code, and an optional link to a security role. If the
+ security role is not specified, the Deployer must choose an
+ appropriate security role.
+
+
+
+
+
+
+
+
+
+
+ The value of the role-name element must be the String used
+ as the parameter to the
+ EJBContext.isCallerInRole(String roleName) method or the
+ HttpServletRequest.isUserInRole(String role) method.
+
+
+
+
+
+
+
+
+
+ The role-link element is a reference to a defined
+ security role. The role-link element must contain
+ the name of one of the security roles defined in the
+ security-role elements.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:QName.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:boolean.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:NMTOKEN.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:anyURI.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:integer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:positiveInteger.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:nonNegativeInteger.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type adds an "id" attribute to xsd:string.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is a special string datatype that is defined by Jakarta EE as
+ a base type for defining collapsed strings. When schemas
+ require trailing/leading space elimination as well as
+ collapsing the existing whitespace, this base type may be
+ used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This simple type designates a boolean with only two
+ permissible values
+
+ - true
+ - false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The url-patternType contains the url pattern of the mapping.
+ It must follow the rules specified in Section 11.2 of the
+ Servlet API Specification. This pattern is assumed to be in
+ URL-decoded form and must not contain CR(#xD) or LF(#xA).
+ If it contains those characters, the container must inform
+ the developer with a descriptive error message.
+ The container must preserve all characters including whitespaces.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CorporateStocks
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+ The message-destination-name element specifies a
+ name for a message destination. This name must be
+ unique among the names of message destinations
+ within the Deployment File.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The JNDI name to be looked up to resolve the message destination.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jms/StockQueue
+
+ jakarta.jms.Queue
+
+ Consumes
+
+ CorporateStocks
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+ The message-destination-ref-name element specifies
+ the name of a message destination reference; its
+ value is the environment entry name used in
+ Deployment Component code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The message-destination-usageType specifies the use of the
+ message destination indicated by the reference. The value
+ indicates whether messages are consumed from the message
+ destination, produced for the destination, or both. The
+ Assembler makes use of this information in linking producers
+ of a destination with its consumers.
+
+ The value of the message-destination-usage element must be
+ one of the following:
+ Consumes
+ Produces
+ ConsumesProduces
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jakarta.jms.Queue
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The message-destination-linkType is used to link a message
+ destination reference or message-driven bean to a message
+ destination.
+
+ The Assembler sets the value to reflect the flow of messages
+ between producers and consumers in the application.
+
+ The value must be the message-destination-name of a message
+ destination in the same Deployment File or in another
+ Deployment File in the same Jakarta EE application unit.
+
+ Alternatively, the value may be composed of a path name
+ specifying a Deployment File containing the referenced
+ message destination with the message-destination-name of the
+ destination appended and separated from the path name by
+ "#". The path name is relative to the Deployment File
+ containing Deployment Component that is referencing the
+ message destination. This allows multiple message
+ destinations with the same name to be uniquely identified.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The transaction-supportType specifies the level of
+ transaction support provided by the resource adapter. It is
+ used by transaction-support elements.
+
+ The value must be one of the following:
+
+ NoTransaction
+ LocalTransaction
+ XATransaction
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd
new file mode 100644
index 000000000000..3a8dae9d6c89
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd
@@ -0,0 +1,380 @@
+
+
+
+
+
+ Copyright (c) 2009, 2023 Oracle and/or its affiliates and others.
+ All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ This is the XML Schema for the JSP 4.0 deployment descriptor
+ types. The JSP 4.0 schema contains all the special
+ structures and datatypes that are necessary to use JSP files
+ from a web application.
+
+ The contents of this schema is used by the web-common_6_1.xsd
+ file to define JSP specific content.
+
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The jsp-configType is used to provide global configuration
+ information for the JSP files in a web application. It has
+ two subelements, taglib and jsp-property-group.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The jsp-file element contains the full path to a JSP file
+ within the web application beginning with a `/'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The jsp-property-groupType is used to group a number of
+ files so they can be given global property information.
+ All files so described are deemed to be JSP files. The
+ following additional properties can be described:
+
+ - Control whether EL is ignored.
+ - Control whether scripting elements are invalid.
+ - Indicate pageEncoding information.
+ - Indicate that a resource is a JSP document (XML).
+ - Prelude and Coda automatic includes.
+ - Control whether the character sequence #{ is allowed
+ when used as a String literal.
+ - Control whether template text containing only
+ whitespaces must be removed from the response output.
+ - Indicate the default contentType information.
+ - Indicate the default buffering model for JspWriter
+ - Control whether error should be raised for the use of
+ undeclared namespaces in a JSP page.
+
+
+
+
+
+
+
+
+
+
+
+ Can be used to easily set the isELIgnored
+ property of a group of JSP pages. By default, the
+ EL evaluation is enabled for Web Applications using
+ a Servlet 2.4 or greater web.xml, and disabled
+ otherwise.
+
+
+
+
+
+
+
+
+ Can be used to easily set the errorOnELNotFound
+ property of a group of JSP pages. By default, this
+ property is false.
+
+
+
+
+
+
+
+
+ The valid values of page-encoding are those of the
+ pageEncoding page directive. It is a
+ translation-time error to name different encodings
+ in the pageEncoding attribute of the page directive
+ of a JSP page and in a JSP configuration element
+ matching the page. It is also a translation-time
+ error to name different encodings in the prolog
+ or text declaration of a document in XML syntax and
+ in a JSP configuration element matching the document.
+ It is legal to name the same encoding through
+ mulitple mechanisms.
+
+
+
+
+
+
+
+
+ Can be used to easily disable scripting in a
+ group of JSP pages. By default, scripting is
+ enabled.
+
+
+
+
+
+
+
+
+ If true, denotes that the group of resources
+ that match the URL pattern are JSP documents,
+ and thus must be interpreted as XML documents.
+ If false, the resources are assumed to not
+ be JSP documents, unless there is another
+ property group that indicates otherwise.
+
+
+
+
+
+
+
+
+ The include-prelude element is a context-relative
+ path that must correspond to an element in the
+ Web Application. When the element is present,
+ the given path will be automatically included (as
+ in an include directive) at the beginning of each
+ JSP page in this jsp-property-group.
+
+
+
+
+
+
+
+
+ The include-coda element is a context-relative
+ path that must correspond to an element in the
+ Web Application. When the element is present,
+ the given path will be automatically included (as
+ in an include directive) at the end of each
+ JSP page in this jsp-property-group.
+
+
+
+
+
+
+
+
+ The character sequence #{ is reserved for EL expressions.
+ Consequently, a translation error occurs if the #{
+ character sequence is used as a String literal, unless
+ this element is enabled (true). Disabled (false) by
+ default.
+
+
+
+
+
+
+
+
+ Indicates that template text containing only whitespaces
+ must be removed from the response output. It has no
+ effect on JSP documents (XML syntax). Disabled (false)
+ by default.
+
+
+
+
+
+
+
+
+ The valid values of default-content-type are those of the
+ contentType page directive. It specifies the default
+ response contentType if the page directive does not include
+ a contentType attribute.
+
+
+
+
+
+
+
+
+ The valid values of buffer are those of the
+ buffer page directive. It specifies if buffering should be
+ used for the output to response, and if so, the size of the
+ buffer to use.
+
+
+
+
+
+
+
+
+ The default behavior when a tag with unknown namespace is used
+ in a JSP page (regular syntax) is to silently ignore it. If
+ set to true, then an error must be raised during the translation
+ time when an undeclared tag is used in a JSP page. Disabled
+ (false) by default.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The taglibType defines the syntax for declaring in
+ the deployment descriptor that a tag library is
+ available to the application. This can be done
+ to override implicit map entries from TLD files and
+ from the container.
+
+
+
+
+
+
+
+
+
+ A taglib-uri element describes a URI identifying a
+ tag library used in the web application. The body
+ of the taglib-uri element may be either an
+ absolute URI specification, or a relative URI.
+ There should be no entries in web.xml with the
+ same taglib-uri value.
+
+
+
+
+
+
+
+
+
+ the taglib-location element contains the location
+ (as a resource relative to the root of the web
+ application) where to find the Tag Library
+ Description file for the tag library.
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd
new file mode 100644
index 000000000000..fdb3c9d6d5e6
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd
@@ -0,0 +1,151 @@
+
+
+
+
+
+ Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/permissions_10.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The permissions element is the root element in a
+ declared permissions file. The declared permissions file
+ declares the code based permissions granted to classes and libraries
+ packaged in the application archive, or in a module if the module is
+ deployed standalone.
+
+
+
+
+
+
+
+
+
+
+
+
+ Each permission element declares a permission. If no permission
+ elements are declared, the application or module needs no special
+ permissions, and the Jakarta EE product may deploy it with no
+ permissions beyond those necessary for the operation of the
+ container.
+
+ For details on the definition of the 'name' and 'actions'
+ elements, refer to the Java API documentation for the class
+ java.security.Permission, and its derived classes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The required value for the version is 10.
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd
new file mode 100644
index 000000000000..a16828a162fc
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd
@@ -0,0 +1,856 @@
+
+
+
+
+ web-app
+ https://jakarta.ee/xml/ns/jakartaee
+ WebApp
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.WebApp
+
+
+ public org.xml.sax.SAXParseException getError() {
+ return null;
+ }
+ public int getStatus() {
+ return STATE_VALID;
+ }
+ public void setJspConfig(org.netbeans.modules.j2ee.dd.api.web.JspConfig value) {
+ if (value==null) setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{});
+ else setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.JspConfig getSingleJspConfig() {
+ org.netbeans.modules.j2ee.dd.api.web.JspConfig[] values = getJspConfig();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setWelcomeFileList(org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList value) {
+ if (value==null) setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{});
+ setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList getSingleWelcomeFileList() {
+ org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[] values = getWelcomeFileList();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setSessionConfig(org.netbeans.modules.j2ee.dd.api.web.SessionConfig value) {
+ if (value==null) setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{});
+ else setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.SessionConfig getSingleSessionConfig() {
+ org.netbeans.modules.j2ee.dd.api.web.SessionConfig[] values = getSessionConfig();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setLoginConfig(org.netbeans.modules.j2ee.dd.api.web.LoginConfig value) {
+ if (value==null) setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{});
+ else setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.LoginConfig getSingleLoginConfig() {
+ org.netbeans.modules.j2ee.dd.api.web.LoginConfig[] values = getLoginConfig();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setDistributable(boolean value) {
+ if (value) setDistributable(new EmptyType[]{new EmptyType()});
+ else setDistributable(new EmptyType[]{});
+ }
+ public boolean isDistributable() {
+ EmptyType[] values = getDistributable();
+ if (values==null || values.length==0) return false;
+ else return true;
+ }
+ public void setLocaleEncodingMappingList(org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList value) {
+ if (value==null) setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{});
+ else setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList getSingleLocaleEncodingMappingList() {
+ org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[] values = getLocaleEncodingMappingList();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setName(String[] value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(WebApp.VERSION_6_1);
+ }
+ public String[] getName() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(WebApp.VERSION_6_1);
+ }
+
+
+
+ emptyType
+ https://jakarta.ee/xml/ns/jakartaee
+ EmptyType
+
+
+ param-valueType
+ https://jakarta.ee/xml/ns/jakartaee
+ InitParam
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.InitParam, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ParamName"; }
+
+
+
+ filterType
+ https://jakarta.ee/xml/ns/jakartaee
+ Filter
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.Filter, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "FilterName"; }
+
+
+
+ filter-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ FilterMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.FilterMapping
+
+
+ public String getServletName() {
+ return this.sizeServletName() > 0 ? (String)this.getValue(SERVLET_NAME, 0) : null;
+ }
+
+ public void setServletName(String value) {
+ setServletNames(value != null ? new String[]{value} : new String[]{});
+ }
+
+ public String getUrlPattern() {
+ return this.sizeUrlPattern() > 0 ? (String)this.getValue(URL_PATTERN, 0) : null;
+ }
+
+ public void setUrlPattern(String value) {
+ setUrlPatterns(value != null ? new String[]{value} : new String[]{});
+ }
+
+
+
+ listenerType
+ https://jakarta.ee/xml/ns/jakartaee
+ Listener
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.Listener
+
+
+
+ servletType
+ https://jakarta.ee/xml/ns/jakartaee
+ Servlet
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.Servlet, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ServletName"; }
+
+
+
+ servlet-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServletMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.ServletMapping25, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "UrlPattern"; }
+
+ public void setUrlPattern(String value) {
+ setUrlPatterns(new String[] {value});
+ }
+
+ public String getUrlPattern() {
+ String[] urlPatterns = getUrlPatterns();
+ if (urlPatterns != null && urlPatterns.length > 0) {
+ return urlPatterns[0];
+ }
+ return null;
+ }
+
+
+
+
+ session-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ SessionConfig
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+
+ org.netbeans.modules.j2ee.dd.api.web.SessionConfig
+
+
+
+ mime-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ MimeMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.MimeMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "Extension"; }
+
+
+
+ welcome-file-listType
+ https://jakarta.ee/xml/ns/jakartaee
+ WelcomeFileList
+
+ org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList
+
+
+
+ error-pageType
+ https://jakarta.ee/xml/ns/jakartaee
+ ErrorPage
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+
+ org.netbeans.modules.j2ee.dd.api.web.ErrorPage, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ErrorCode"; }
+
+
+
+ jsp-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ JspConfig
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.web.JspConfig
+
+
+
+ security-constraintType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityConstraint
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.SecurityConstraint
+
+
+
+ login-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ LoginConfig
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.web.LoginConfig
+
+
+
+ security-roleType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityRole
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.SecurityRole, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "RoleName"; }
+
+
+
+ message-destinationType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestination
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.MessageDestination, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "MessageDestinationName"; }
+
+
+
+ locale-encoding-mapping-listType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocaleEncodingMappingList
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList
+
+
+
+ locale-encoding-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocaleEncodingMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "Locale"; }
+
+
+
+ localeType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocaleType
+ java.lang.String
+
+
+ encodingType
+ https://jakarta.ee/xml/ns/jakartaee
+ EncodingType
+ java.lang.String
+
+
+ string
+ https://jakarta.ee/xml/ns/jakartaee
+ String
+ java.lang.String
+
+
+ descriptionType
+ https://jakarta.ee/xml/ns/jakartaee
+ DescriptionType
+ java.lang.String
+
+
+ xsdStringType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdStringType
+ java.lang.String
+
+
+ display-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ DisplayNameType
+ java.lang.String
+
+
+ iconType
+ https://jakarta.ee/xml/ns/jakartaee
+ Icon
+
+ org.netbeans.modules.j2ee.dd.api.common.Icon
+
+
+
+ pathType
+ https://jakarta.ee/xml/ns/jakartaee
+ PathType
+ java.lang.String
+
+
+ env-entryType
+ https://jakarta.ee/xml/ns/jakartaee
+ EnvEntry
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EnvEntry, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EnvEntryName"; }
+
+
+
+ ejb-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EjbRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EjbRefName"; }
+
+
+
+ ejb-local-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbLocalRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EjbRefName"; }
+
+
+
+ resource-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResourceRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ResourceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ResRefName"; }
+
+
+
+ resource-env-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResourceEnvRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ResourceEnvRefName"; }
+
+
+
+ message-destination-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "MessageDestinationRefName"; }
+
+
+
+ persistence-context-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceContextRefType
+
+
+ persistence-unit-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceUnitRefType
+
+
+ lifecycle-callbackType
+ https://jakarta.ee/xml/ns/jakartaee
+ LifecycleCallbackType
+
+
+ fully-qualified-classType
+ https://jakarta.ee/xml/ns/jakartaee
+ FullyQualifiedClassType
+ java.lang.String
+
+
+ java-identifierType
+ https://jakarta.ee/xml/ns/jakartaee
+ JavaIdentifierType
+ java.lang.String
+
+
+ jndi-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ JndiNameType
+ java.lang.String
+
+
+ persistence-context-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceContextTypeType
+ java.lang.String
+
+
+ propertyType
+ https://jakarta.ee/xml/ns/jakartaee
+ PropertyType
+
+
+ message-destination-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationTypeType
+ java.lang.String
+
+
+ message-destination-usageType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationUsageType
+ java.lang.String
+
+
+ message-destination-linkType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationLinkType
+ java.lang.String
+
+
+ injection-targetType
+ https://jakarta.ee/xml/ns/jakartaee
+ InjectionTarget
+ org.netbeans.modules.j2ee.dd.api.common.InjectionTarget
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+
+ res-authType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResAuthType
+ java.lang.String
+
+
+ res-sharing-scopeType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResSharingScopeType
+ java.lang.String
+
+
+ service-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRef
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ServiceRefName"; }
+
+
+
+ xsdAnyURIType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdAnyURIType
+ java.net.URI
+
+
+ xsdQNameType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdQNameType
+ java.lang.String
+
+
+ port-component-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PortComponentRef
+
+ org.netbeans.modules.j2ee.dd.api.common.PortComponentRef
+
+
+
+ service-ref_handlerType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandler
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "HandlerName"; }
+
+
+
+ service-ref_handler-chainsType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChains
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains
+
+
+ service-ref_handler-chainType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChain
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain
+
+
+ service-ref_qname-pattern
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefQnamePattern
+ java.lang.String
+
+
+ service-ref_protocol-bindingListType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefProtocolBindingListType
+ String
+
+
+ ejb-ref-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRefNameType
+ java.lang.String
+
+
+ ejb-ref-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRefTypeType
+ java.lang.String
+
+
+ local-homeType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocalHomeType
+ java.lang.String
+
+
+ localType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocalType
+ java.lang.String
+
+
+ ejb-linkType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbLinkType
+ java.lang.String
+
+
+ homeType
+ https://jakarta.ee/xml/ns/jakartaee
+ HomeType
+ java.lang.String
+
+
+ remoteType
+ https://jakarta.ee/xml/ns/jakartaee
+ RemoteType
+ java.lang.String
+
+
+ env-entry-type-valuesType
+ https://jakarta.ee/xml/ns/jakartaee
+ EnvEntryTypeValuesType
+ java.lang.String
+
+
+ role-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ RoleNameType
+ java.lang.String
+
+
+ auth-methodType
+ https://jakarta.ee/xml/ns/jakartaee
+ AuthMethodType
+ java.lang.String
+
+
+ form-login-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ FormLoginConfig
+
+ org.netbeans.modules.j2ee.dd.api.web.FormLoginConfig
+
+
+
+ war-pathType
+ https://jakarta.ee/xml/ns/jakartaee
+ WarPathType
+ java.lang.String
+
+
+ web-resource-collectionType
+ https://jakarta.ee/xml/ns/jakartaee
+ WebResourceCollection
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.WebResourceCollection, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "WebResourceName"; }
+
+
+
+ auth-constraintType
+ https://jakarta.ee/xml/ns/jakartaee
+ AuthConstraint
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.AuthConstraint
+
+
+
+ user-data-constraintType
+ https://jakarta.ee/xml/ns/jakartaee
+ UserDataConstraint
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.UserDataConstraint
+
+
+
+ transport-guaranteeType
+ https://jakarta.ee/xml/ns/jakartaee
+ TransportGuaranteeType
+ java.lang.String
+
+
+ url-patternType
+ https://jakarta.ee/xml/ns/jakartaee
+ UrlPatternType
+ java.lang.String
+
+
+ http-methodType
+ https://jakarta.ee/xml/ns/jakartaee
+ HttpMethodType
+ java.lang.String
+
+
+ taglibType
+ https://jakarta.ee/xml/ns/jakartaee
+ Taglib
+
+ org.netbeans.modules.j2ee.dd.api.web.Taglib, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "TaglibUri"; }
+
+
+
+ jsp-property-groupType
+ https://jakarta.ee/xml/ns/jakartaee
+ JspPropertyGroup
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.JspPropertyGroup
+
+
+
+ true-falseType
+ https://jakarta.ee/xml/ns/jakartaee
+ TrueFalseType
+ boolean
+
+
+ error-codeType
+ https://jakarta.ee/xml/ns/jakartaee
+ ErrorCodeType
+ Integer
+
+
+ string
+ http://www.w3.org/2001/XMLSchema
+ String
+ java.lang.String
+
+
+ mime-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ MimeTypeType
+ java.lang.String
+
+
+ xsdIntegerType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdIntegerType
+ java.math.BigInteger
+
+
+ servlet-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServletNameType
+ java.lang.String
+
+
+ nonEmptyStringType
+ https://jakarta.ee/xml/ns/jakartaee
+ NonEmptyStringType
+ java.lang.String
+
+
+ load-on-startupType
+ https://jakarta.ee/xml/ns/jakartaee
+ LoadOnStartupType
+ java.math.BigInteger
+
+
+ run-asType
+ https://jakarta.ee/xml/ns/jakartaee
+ RunAs
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.RunAs
+
+
+
+ security-role-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityRoleRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.SecurityRoleRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "RoleName"; }
+
+
+
+ jsp-fileType
+ https://jakarta.ee/xml/ns/jakartaee
+ JspFileType
+ java.lang.String
+
+
+ filter-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ FilterNameType
+ java.lang.String
+
+
+ dispatcherType
+ https://jakarta.ee/xml/ns/jakartaee
+ DispatcherType
+ java.lang.String
+
+
+ absoluteOrderingType
+ https://jakarta.ee/xml/ns/jakartaee
+ AbsoluteOrdering
+
+ org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering
+
+
+
+
+
+
+ handlerType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandler
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "HandlerName"; }
+
+
+
+ handler-chainsType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChains
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains
+
+
+ handler-chainType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChainType
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain
+
+
+ dewey-versionType
+ https://jakarta.ee/xml/ns/jakartaee
+ version
+ java.math.BigDecimal
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd
new file mode 100644
index 000000000000..9a4cc4f3b7cc
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd
@@ -0,0 +1,351 @@
+
+
+
+
+
+
+ Copyright (c) 2009, 2023 Oracle and/or its affiliates and others.
+ All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The web-app element is the root of the deployment
+ descriptor for a web application. Note that the sub-elements
+ of this element can be in the arbitrary order. Because of
+ that, the multiplicity of the elements of distributable,
+ session-config, welcome-file-list, jsp-config, login-config,
+ and locale-encoding-mapping-list was changed from "?" to "*"
+ in this schema. However, the deployment descriptor instance
+ file must not contain multiple elements of session-config,
+ jsp-config, and login-config. When there are multiple elements of
+ welcome-file-list or locale-encoding-mapping-list, the container
+ must concatenate the element contents. The multiple occurence
+ of the element distributable is redundant and the container
+ treats that case exactly in the same way when there is only
+ one distributable.
+
+
+
+
+
+
+
+
+ The servlet element contains the name of a servlet.
+ The name must be unique within the web application.
+
+
+
+
+
+
+
+
+
+
+
+ The filter element contains the name of a filter.
+ The name must be unique within the web application.
+
+
+
+
+
+
+
+
+
+
+
+ The ejb-local-ref-name element contains the name of an
+ enterprise bean reference. The enterprise
+ bean reference is an entry in the web
+ application's environment and is relative to the
+ java:comp/env context. The name must be unique within
+ the web application.
+
+ It is recommended that name is prefixed with "ejb/".
+
+
+
+
+
+
+
+
+
+
+
+ The ejb-ref-name element contains the name of an
+ enterprise bean reference. The enterprise bean
+ reference is an entry in the web application's environment
+ and is relative to the java:comp/env context.
+ The name must be unique within the web application.
+
+ It is recommended that name is prefixed with "ejb/".
+
+
+
+
+
+
+
+
+
+
+
+ The resource-env-ref-name element specifies the name of
+ a resource environment reference; its value is the
+ environment entry name used in the web application code.
+ The name is a JNDI name relative to the java:comp/env
+ context and must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+
+ The message-destination-ref-name element specifies the name of
+ a message destination reference; its value is the
+ environment entry name used in the web application code.
+ The name is a JNDI name relative to the java:comp/env
+ context and must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+
+
+ The res-ref-name element specifies the name of a
+ resource manager connection factory reference. The name
+ is a JNDI name relative to the java:comp/env context.
+ The name must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+
+ The env-entry-name element contains the name of a web
+ application's environment entry. The name is a JNDI
+ name relative to the java:comp/env context. The name
+ must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+
+
+ A role-name-key is specified to allow the references
+ from the security-role-refs.
+
+
+
+
+
+
+
+
+
+
+
+ The keyref indicates the references from
+ security-role-ref to a specified role-name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ When specified, this element provides a default context path
+ of the web application. An empty value for this element must cause
+ the web application to be deployed at the root for the container.
+ Otherwise, the default context path must start with
+ a "/" character but not end with a "/" character.
+ Servlet containers may provide vendor specific configuration
+ options that allows specifying a value that overrides the value
+ specified here.
+
+
+
+
+
+
+
+
+ When specified, this element provides a default request
+ character encoding of the web application.
+
+
+
+
+
+
+
+
+ When specified, this element provides a default response
+ character encoding of the web application.
+
+
+
+
+
+
+
+
+ When specified, this element causes uncovered http methods
+ to be denied. For every url-pattern that is the target of a
+ security-constrant, this element causes all HTTP methods that
+ are NOT covered (by a security constraint) at the url-pattern
+ to be denied.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Please see section 8.2.2 of the specification for details.
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd
new file mode 100644
index 000000000000..4cb8277c9934
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd
@@ -0,0 +1,1526 @@
+
+
+
+
+
+
+ Copyright (c) 2009, 2023 Oracle and/or its affiliates and others.
+ All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/web-common_6_1.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The context-param element contains the declaration
+ of a web application's servlet context
+ initialization parameters.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The metadata-complete attribute defines whether this
+ deployment descriptor and other related deployment
+ descriptors for this module (e.g., web service
+ descriptors) are complete, or whether the class
+ files available to this module and packaged with
+ this application should be examined for annotations
+ that specify deployment information.
+
+ If metadata-complete is set to "true", the deployment
+ tool must ignore any annotations that specify deployment
+ information, which might be present in the class files
+ of the application.
+
+ If metadata-complete is not specified or is set to
+ "false", the deployment tool must examine the class
+ files of the application for annotations, as
+ specified by the specifications.
+
+
+
+
+
+
+
+
+
+
+
+
+ This type is a general type that can be used to declare
+ attribute/value lists.
+
+
+
+
+
+
+
+
+
+
+ The attribute-name element contains the name of an
+ attribute.
+
+
+
+
+
+
+
+
+
+ The attribute-value element contains the value of a
+ attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The auth-constraintType indicates the user roles that
+ should be permitted access to this resource
+ collection. The role-name used here must either correspond
+ to the role-name of one of the security-role elements
+ defined for this web application, or be the specially
+ reserved role-name "*" that is a compact syntax for
+ indicating all roles in the web application. If both "*"
+ and rolenames appear, the container interprets this as all
+ roles. If no roles are defined, no user is allowed access
+ to the portion of the web application described by the
+ containing security-constraint. The container matches
+ role names case sensitively when determining access.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The auth-methodType is used to configure the authentication
+ mechanism for the web application. As a prerequisite to
+ gaining access to any web resources which are protected by
+ an authorization constraint, a user must have authenticated
+ using the configured mechanism. Legal values are "BASIC",
+ "DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific
+ authentication scheme.
+
+ Used in: login-config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The dispatcher has five legal values: FORWARD, REQUEST,
+ INCLUDE, ASYNC, and ERROR.
+
+ A value of FORWARD means the Filter will be applied under
+ RequestDispatcher.forward() calls.
+ A value of REQUEST means the Filter will be applied under
+ ordinary client calls to the path or servlet.
+ A value of INCLUDE means the Filter will be applied under
+ RequestDispatcher.include() calls.
+ A value of ASYNC means the Filter will be applied under
+ calls dispatched from an AsyncContext.
+ A value of ERROR means the Filter will be applied under the
+ error page mechanism.
+
+ The absence of any dispatcher elements in a filter-mapping
+ indicates a default of applying filters only under ordinary
+ client calls to the path or servlet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The error-code contains an HTTP error code, ex: 404
+
+ Used in: error-page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The error-pageType contains a mapping between an error code
+ or exception type to the path of a resource in the web
+ application.
+
+ Error-page declarations using the exception-type element in
+ the deployment descriptor must be unique up to the class name of
+ the exception-type. Similarly, error-page declarations using the
+ error-code element must be unique in the deployment descriptor
+ up to the status code.
+
+ If an error-page element in the deployment descriptor does not
+ contain an exception-type or an error-code element, the error
+ page is a default error page.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+
+
+ The exception-type contains a fully qualified class
+ name of a Java exception type.
+
+
+
+
+
+
+
+
+
+
+ The location element contains the location of the
+ resource in the web application relative to the root of
+ the web application. The value of the location must have
+ a leading `/'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The filterType is used to declare a filter in the web
+ application. The filter is mapped to either a servlet or a
+ URL pattern in the filter-mapping element, using the
+ filter-name value to reference. Filters can access the
+ initialization parameters declared in the deployment
+ descriptor at runtime via the FilterConfig interface.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+
+
+ The fully qualified classname of the filter.
+
+
+
+
+
+
+
+
+
+
+ The init-param element contains a name/value pair as
+ an initialization param of a servlet filter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Declaration of the filter mappings in this web
+ application is done by using filter-mappingType.
+ The container uses the filter-mapping
+ declarations to decide which filters to apply to a request,
+ and in what order. The container matches the request URI to
+ a Servlet in the normal way. To determine which filters to
+ apply it matches filter-mapping declarations either on
+ servlet-name, or on url-pattern for each filter-mapping
+ element, depending on which style is used. The order in
+ which filters are invoked is the order in which
+ filter-mapping declarations that match a request URI for a
+ servlet appear in the list of filter-mapping elements.The
+ filter-name value must be the value of the filter-name
+ sub-elements of one of the filter declarations in the
+ deployment descriptor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type defines a string which contains at least one
+ character.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The logical name of the filter is declare
+ by using filter-nameType. This name is used to map the
+ filter. Each filter name is unique within the web
+ application.
+
+ Used in: filter, filter-mapping
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The form-login-configType specifies the login and error
+ pages that should be used in form based login. If form based
+ authentication is not used, these elements are ignored.
+
+ Used in: login-config
+
+
+
+
+
+
+
+
+
+
+ The form-login-page element defines the location in the web
+ app where the page that can be used for login can be
+ found. The path begins with a leading / and is interpreted
+ relative to the root of the WAR.
+
+
+
+
+
+
+
+
+
+ The form-error-page element defines the location in
+ the web app where the error page that is displayed
+ when login is not successful can be found.
+ The path begins with a leading / and is interpreted
+ relative to the root of the WAR.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A HTTP method type as defined in HTTP 1.1 section 2.2.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The login-configType is used to configure the authentication
+ method that should be used, the realm name that should be
+ used for this application, and the attributes that are
+ needed by the form login mechanism.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+
+ The realm name element specifies the realm name to
+ use in HTTP Basic authorization.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mime-mappingType defines a mapping between an extension
+ and a mime type.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+ The extension element contains a string describing an
+ extension. example: "txt"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mime-typeType is used to indicate a defined mime type.
+
+ Example:
+ "text/plain"
+
+ Used in: mime-mapping
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The security-constraintType is used to associate
+ security constraints with one or more web resource
+ collections
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The servletType is used to declare a servlet.
+ It contains the declarative data of a
+ servlet. If a jsp-file is specified and the load-on-startup
+ element is present, then the JSP should be precompiled and
+ loaded.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+
+
+
+ The servlet-class element contains the fully
+ qualified class name of the servlet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The load-on-startup element indicates that this
+ servlet should be loaded (instantiated and have
+ its init() called) on the startup of the web
+ application. The optional contents of these
+ element must be an integer indicating the order in
+ which the servlet should be loaded. If the value
+ is a negative integer, or the element is not
+ present, the container is free to load the servlet
+ whenever it chooses. If the value is a positive
+ integer or 0, the container must load and
+ initialize the servlet as the application is
+ deployed. The container must guarantee that
+ servlets marked with lower integers are loaded
+ before servlets marked with higher integers. The
+ container may choose the order of loading of
+ servlets with the same load-on-start-up value.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The servlet-mappingType defines a mapping between a
+ servlet and a url pattern.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The servlet-name element contains the canonical name of the
+ servlet. Each servlet name is unique within the web
+ application.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The session-configType defines the session parameters
+ for this web application.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+ The session-timeout element defines the default
+ session timeout interval for all sessions created
+ in this web application. The specified timeout
+ must be expressed in a whole number of minutes.
+ If the timeout is 0 or less, the container ensures
+ the default behaviour of sessions is never to time
+ out. If this element is not specified, the container
+ must set its default timeout period.
+
+
+
+
+
+
+
+
+ The cookie-config element defines the configuration of the
+ session tracking cookies created by this web application.
+
+
+
+
+
+
+
+
+ The tracking-mode element defines the tracking modes
+ for sessions created by this web application
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The cookie-configType defines the configuration for the
+ session tracking cookies of this web application.
+
+ Used in: session-config
+
+
+
+
+
+
+
+
+
+ The name that will be assigned to any session tracking
+ cookies created by this web application.
+ The default is JSESSIONID
+
+
+
+
+
+
+
+
+ The domain name that will be assigned to any session tracking
+ cookies created by this web application.
+
+
+
+
+
+
+
+
+ The path that will be assigned to any session tracking
+ cookies created by this web application.
+
+
+
+
+
+
+
+
+ The comment that will be assigned to any session tracking
+ cookies created by this web application.
+
+
+
+
+
+
+
+
+ Specifies whether any session tracking cookies created
+ by this web application will be marked as HttpOnly
+
+
+
+
+
+
+
+
+ Specifies whether any session tracking cookies created
+ by this web application will be marked as secure.
+ When true, all session tracking cookies must be marked
+ as secure independent of the nature of the request that
+ initiated the corresponding session.
+ When false, the session cookie should only be marked secure
+ if the request that initiated the session was secure.
+
+
+
+
+
+
+
+
+ The lifetime (in seconds) that will be assigned to any
+ session tracking cookies created by this web application.
+ Default is -1
+
+
+
+
+
+
+
+
+ The attribute-param element contains a name/value pair to
+ be added as an attribute to every session cookie.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The name that will be assigned to any session tracking
+ cookies created by this web application.
+ The default is JSESSIONID
+
+ Used in: cookie-config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The domain name that will be assigned to any session tracking
+ cookies created by this web application.
+
+ Used in: cookie-config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The path that will be assigned to any session tracking
+ cookies created by this web application.
+
+ Used in: cookie-config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The comment that will be assigned to any session tracking
+ cookies created by this web application.
+
+ Used in: cookie-config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The tracking modes for sessions created by this web
+ application
+
+ Used in: session-config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The transport-guaranteeType specifies that the communication
+ between client and server should be NONE, INTEGRAL, or
+ CONFIDENTIAL. NONE means that the application does not
+ require any transport guarantees. A value of INTEGRAL means
+ that the application requires that the data sent between the
+ client and server be sent in such a way that it can't be
+ changed in transit. CONFIDENTIAL means that the application
+ requires that the data be transmitted in a fashion that
+ prevents other entities from observing the contents of the
+ transmission. In most cases, the presence of the INTEGRAL or
+ CONFIDENTIAL flag will indicate that the use of SSL is
+ required.
+
+ Used in: user-data-constraint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user-data-constraintType is used to indicate how
+ data communicated between the client and container should be
+ protected.
+
+ Used in: security-constraint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The elements that use this type designate a path starting
+ with a "/" and interpreted relative to the root of a WAR
+ file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This type contains the recognized versions of
+ web-application supported. It is used to designate the
+ version of the web application.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The web-resource-collectionType is used to identify the
+ resources and HTTP methods on those resources to which a
+ security constraint applies. If no HTTP methods are specified,
+ then the security constraint applies to all HTTP methods.
+ If HTTP methods are specified by http-method-omission
+ elements, the security constraint applies to all methods
+ except those identified in the collection.
+ http-method-omission and http-method elements are never
+ mixed in the same collection.
+
+ Used in: security-constraint
+
+
+
+
+
+
+
+
+
+ The web-resource-name contains the name of this web
+ resource collection.
+
+
+
+
+
+
+
+
+
+
+ Each http-method names an HTTP method to which the
+ constraint applies.
+
+
+
+
+
+
+ Each http-method-omission names an HTTP method to
+ which the constraint does not apply.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The welcome-file-list contains an ordered list of welcome
+ files elements.
+
+ Used in: web-app
+
+
+
+
+
+
+
+
+
+ The welcome-file element contains file name to use
+ as a default welcome file, such as index.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The localeType defines valid locale defined by ISO-639-1
+ and ISO-3166.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The encodingType defines IANA character sets.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The locale-encoding-mapping-list contains one or more
+ locale-encoding-mapping(s).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The locale-encoding-mapping contains locale name and
+ encoding name. The locale name must be either "Language-code",
+ such as "ja", defined by ISO-639 or "Language-code_Country-code",
+ such as "ja_JP". "Country code" is defined by ISO-3166.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This element indicates that the ordering sub-element in which
+ it was placed should take special action regarding the ordering
+ of this application resource relative to other application
+ configuration resources.
+ See section 8.2.2 of the specification for details.
+
+
+
+
+
+
+
+
+
+
+
+
+ This element specifies configuration information related to the
+ handling of multipart/form-data requests.
+
+
+
+
+
+
+
+ The directory location where uploaded files will be stored
+
+
+
+
+
+
+ The maximum size limit of uploaded files
+
+
+
+
+
+
+ The maximum size limit of multipart/form-data requests
+
+
+
+
+
+
+ The size threshold after which an uploaded file will be
+ written to disk
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd
new file mode 100644
index 000000000000..77ab2f758830
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd
@@ -0,0 +1,910 @@
+
+
+
+
+
+
+
+ web-fragment
+ https://jakarta.ee/xml/ns/jakartaee
+ WebFragment
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.WebFragment
+
+
+ public org.xml.sax.SAXParseException getError() {
+ return null;
+ }
+ public int getStatus() {
+ return STATE_VALID;
+ }
+ // due to compatibility with servlet2.3
+ public void setTaglib(int index, org.netbeans.modules.j2ee.dd.api.web.Taglib valueInterface) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.Taglib getTaglib(int index) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public void setTaglib(org.netbeans.modules.j2ee.dd.api.web.Taglib[] value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.Taglib[] getTaglib() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public int sizeTaglib() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public int addTaglib(org.netbeans.modules.j2ee.dd.api.web.Taglib valueInterface) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public int removeTaglib(org.netbeans.modules.j2ee.dd.api.web.Taglib valueInterface) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1);
+ }
+ public void setJspConfig(org.netbeans.modules.j2ee.dd.api.web.JspConfig value) {
+ if (value==null) setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{});
+ else setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.JspConfig getSingleJspConfig() {
+ org.netbeans.modules.j2ee.dd.api.web.JspConfig[] values = getJspConfig();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setWelcomeFileList(org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList value) {
+ if (value==null) setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{});
+ setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList getSingleWelcomeFileList() {
+ org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[] values = getWelcomeFileList();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setSessionConfig(org.netbeans.modules.j2ee.dd.api.web.SessionConfig value) {
+ if (value==null) setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{});
+ else setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.SessionConfig getSingleSessionConfig() {
+ org.netbeans.modules.j2ee.dd.api.web.SessionConfig[] values = getSessionConfig();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setLoginConfig(org.netbeans.modules.j2ee.dd.api.web.LoginConfig value) {
+ if (value==null) setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{});
+ else setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.LoginConfig getSingleLoginConfig() {
+ org.netbeans.modules.j2ee.dd.api.web.LoginConfig[] values = getLoginConfig();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public void setDistributable(boolean value) {
+ if (value) setDistributable(new EmptyType[]{new EmptyType()});
+ else setDistributable(new EmptyType[]{});
+ }
+ public boolean isDistributable() {
+ EmptyType[] values = getDistributable();
+ if (values==null || values.length==0) return false;
+ else return true;
+ }
+ public void setLocaleEncodingMappingList(org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList value) {
+ if (value==null) setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{});
+ else setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{value});
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList getSingleLocaleEncodingMappingList() {
+ org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[] values = getLocaleEncodingMappingList();
+ if (values==null || values.length==0) return null;
+ else return values[0];
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering newAbsoluteOrdering() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException("web-fragment "+VERSION_6_1);
+ }
+ public void setAbsoluteOrdering(org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering[] value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException("web-fragment "+VERSION_6_1);
+ }
+ public org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering[] getAbsoluteOrdering() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException {
+ throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException("web-fragment "+VERSION_6_1);
+ }
+
+
+
+ emptyType
+ https://jakarta.ee/xml/ns/jakartaee
+ EmptyType
+
+
+ param-valueType
+ https://jakarta.ee/xml/ns/jakartaee
+ InitParam
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.InitParam, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ParamName"; }
+
+
+
+ filterType
+ https://jakarta.ee/xml/ns/jakartaee
+ Filter
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.Filter, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "FilterName"; }
+
+
+
+ filter-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ FilterMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.FilterMapping
+
+
+ public String getServletName() {
+ return this.sizeServletName() > 0 ? (String)this.getValue(SERVLET_NAME, 0) : null;
+ }
+
+ public void setServletName(String value) {
+ setServletNames(value != null ? new String[]{value} : new String[]{});
+ }
+
+ public String getUrlPattern() {
+ return this.sizeUrlPattern() > 0 ? (String)this.getValue(URL_PATTERN, 0) : null;
+ }
+
+ public void setUrlPattern(String value) {
+ setUrlPatterns(value != null ? new String[]{value} : new String[]{});
+ }
+
+
+
+ listenerType
+ https://jakarta.ee/xml/ns/jakartaee
+ Listener
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.Listener
+
+
+
+ servletType
+ https://jakarta.ee/xml/ns/jakartaee
+ Servlet
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.Servlet, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ServletName"; }
+
+
+
+ servlet-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServletMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.ServletMapping25, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "UrlPattern"; }
+
+ public void setUrlPattern(String value) {
+ setUrlPatterns(new String[] {value});
+ }
+
+ public String getUrlPattern() {
+ String[] urlPatterns = getUrlPatterns();
+ if (urlPatterns != null && urlPatterns.length > 0) {
+ return urlPatterns[0];
+ }
+ return null;
+ }
+
+
+
+
+ session-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ SessionConfig
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+
+ org.netbeans.modules.j2ee.dd.api.web.SessionConfig
+
+
+
+ mime-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ MimeMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.MimeMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "Extension"; }
+
+
+
+ welcome-file-listType
+ https://jakarta.ee/xml/ns/jakartaee
+ WelcomeFileList
+
+ org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList
+
+
+
+ error-pageType
+ https://jakarta.ee/xml/ns/jakartaee
+ ErrorPage
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+
+ org.netbeans.modules.j2ee.dd.api.web.ErrorPage, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ErrorCode"; }
+
+
+
+ jsp-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ JspConfig
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.web.JspConfig
+
+
+
+ security-constraintType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityConstraint
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.SecurityConstraint
+
+
+
+ login-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ LoginConfig
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.web.LoginConfig
+
+
+
+ security-roleType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityRole
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.SecurityRole, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "RoleName"; }
+
+
+
+ message-destinationType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestination
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.MessageDestination, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "MessageDestinationName"; }
+
+
+
+ locale-encoding-mapping-listType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocaleEncodingMappingList
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+ org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList
+
+
+
+ locale-encoding-mappingType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocaleEncodingMapping
+
+ org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "Locale"; }
+
+
+
+ localeType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocaleType
+ java.lang.String
+
+
+ encodingType
+ https://jakarta.ee/xml/ns/jakartaee
+ EncodingType
+ java.lang.String
+
+
+ string
+ https://jakarta.ee/xml/ns/jakartaee
+ String
+ java.lang.String
+
+
+ descriptionType
+ https://jakarta.ee/xml/ns/jakartaee
+ DescriptionType
+ java.lang.String
+
+
+ xsdStringType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdStringType
+ java.lang.String
+
+
+ display-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ DisplayNameType
+ java.lang.String
+
+
+ iconType
+ https://jakarta.ee/xml/ns/jakartaee
+ Icon
+
+ org.netbeans.modules.j2ee.dd.api.common.Icon
+
+
+
+ pathType
+ https://jakarta.ee/xml/ns/jakartaee
+ PathType
+ java.lang.String
+
+
+ env-entryType
+ https://jakarta.ee/xml/ns/jakartaee
+ EnvEntry
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EnvEntry, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EnvEntryName"; }
+
+
+
+ ejb-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EjbRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EjbRefName"; }
+
+
+
+ ejb-local-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbLocalRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "EjbRefName"; }
+
+
+
+ resource-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResourceRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ResourceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ResRefName"; }
+
+
+
+ resource-env-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResourceEnvRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ResourceEnvRefName"; }
+
+
+
+ message-destination-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "MessageDestinationRefName"; }
+
+
+
+ persistence-context-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceContextRefType
+
+
+ persistence-unit-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceUnitRefType
+
+
+ lifecycle-callbackType
+ https://jakarta.ee/xml/ns/jakartaee
+ LifecycleCallbackType
+
+
+ fully-qualified-classType
+ https://jakarta.ee/xml/ns/jakartaee
+ FullyQualifiedClassType
+ java.lang.String
+
+
+ java-identifierType
+ https://jakarta.ee/xml/ns/jakartaee
+ JavaIdentifierType
+ java.lang.String
+
+
+ jndi-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ JndiNameType
+ java.lang.String
+
+
+ persistence-context-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ PersistenceContextTypeType
+ java.lang.String
+
+
+ propertyType
+ https://jakarta.ee/xml/ns/jakartaee
+ PropertyType
+
+
+ message-destination-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationTypeType
+ java.lang.String
+
+
+ message-destination-usageType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationUsageType
+ java.lang.String
+
+
+ message-destination-linkType
+ https://jakarta.ee/xml/ns/jakartaee
+ MessageDestinationLinkType
+ java.lang.String
+
+
+ injection-targetType
+ https://jakarta.ee/xml/ns/jakartaee
+ InjectionTarget
+ org.netbeans.modules.j2ee.dd.api.common.InjectionTarget
+ org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean
+
+
+ res-authType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResAuthType
+ java.lang.String
+
+
+ res-sharing-scopeType
+ https://jakarta.ee/xml/ns/jakartaee
+ ResSharingScopeType
+ java.lang.String
+
+
+ service-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRef
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "ServiceRefName"; }
+
+
+
+ xsdAnyURIType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdAnyURIType
+ java.net.URI
+
+
+ xsdQNameType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdQNameType
+ java.lang.String
+
+
+ port-component-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ PortComponentRef
+
+ org.netbeans.modules.j2ee.dd.api.common.PortComponentRef
+
+
+
+ service-ref_handlerType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandler
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "HandlerName"; }
+
+
+
+ service-ref_handler-chainsType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChains
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains
+
+
+ service-ref_handler-chainType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChain
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain
+
+
+ service-ref_qname-pattern
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefQnamePattern
+ java.lang.String
+
+
+ service-ref_protocol-bindingListType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefProtocolBindingListType
+ String
+
+
+ ejb-ref-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRefNameType
+ java.lang.String
+
+
+ ejb-ref-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbRefTypeType
+ java.lang.String
+
+
+ local-homeType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocalHomeType
+ java.lang.String
+
+
+ localType
+ https://jakarta.ee/xml/ns/jakartaee
+ LocalType
+ java.lang.String
+
+
+ ejb-linkType
+ https://jakarta.ee/xml/ns/jakartaee
+ EjbLinkType
+ java.lang.String
+
+
+ homeType
+ https://jakarta.ee/xml/ns/jakartaee
+ HomeType
+ java.lang.String
+
+
+ remoteType
+ https://jakarta.ee/xml/ns/jakartaee
+ RemoteType
+ java.lang.String
+
+
+ env-entry-type-valuesType
+ https://jakarta.ee/xml/ns/jakartaee
+ EnvEntryTypeValuesType
+ java.lang.String
+
+
+ role-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ RoleNameType
+ java.lang.String
+
+
+ auth-methodType
+ https://jakarta.ee/xml/ns/jakartaee
+ AuthMethodType
+ java.lang.String
+
+
+ form-login-configType
+ https://jakarta.ee/xml/ns/jakartaee
+ FormLoginConfig
+
+ org.netbeans.modules.j2ee.dd.api.web.FormLoginConfig
+
+
+
+ war-pathType
+ https://jakarta.ee/xml/ns/jakartaee
+ WarPathType
+ java.lang.String
+
+
+ web-resource-collectionType
+ https://jakarta.ee/xml/ns/jakartaee
+ WebResourceCollection
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.WebResourceCollection, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "WebResourceName"; }
+
+
+
+ auth-constraintType
+ https://jakarta.ee/xml/ns/jakartaee
+ AuthConstraint
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.AuthConstraint
+
+
+
+ user-data-constraintType
+ https://jakarta.ee/xml/ns/jakartaee
+ UserDataConstraint
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.UserDataConstraint
+
+
+
+ transport-guaranteeType
+ https://jakarta.ee/xml/ns/jakartaee
+ TransportGuaranteeType
+ java.lang.String
+
+
+ url-patternType
+ https://jakarta.ee/xml/ns/jakartaee
+ UrlPatternType
+ java.lang.String
+
+
+ http-methodType
+ https://jakarta.ee/xml/ns/jakartaee
+ HttpMethodType
+ java.lang.String
+
+
+ taglibType
+ https://jakarta.ee/xml/ns/jakartaee
+ Taglib
+
+ org.netbeans.modules.j2ee.dd.api.web.Taglib, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "TaglibUri"; }
+
+
+
+ jsp-property-groupType
+ https://jakarta.ee/xml/ns/jakartaee
+ JspPropertyGroup
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.web.JspPropertyGroup
+
+
+
+ true-falseType
+ https://jakarta.ee/xml/ns/jakartaee
+ TrueFalseType
+ boolean
+
+
+ error-codeType
+ https://jakarta.ee/xml/ns/jakartaee
+ ErrorCodeType
+ Integer
+
+
+ string
+ http://www.w3.org/2001/XMLSchema
+ String
+ java.lang.String
+
+
+ mime-typeType
+ https://jakarta.ee/xml/ns/jakartaee
+ MimeTypeType
+ java.lang.String
+
+
+ xsdIntegerType
+ https://jakarta.ee/xml/ns/jakartaee
+ XsdIntegerType
+ java.math.BigInteger
+
+
+ servlet-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServletNameType
+ java.lang.String
+
+
+ nonEmptyStringType
+ https://jakarta.ee/xml/ns/jakartaee
+ NonEmptyStringType
+ java.lang.String
+
+
+ load-on-startupType
+ https://jakarta.ee/xml/ns/jakartaee
+ LoadOnStartupType
+ java.math.BigInteger
+
+
+ run-asType
+ https://jakarta.ee/xml/ns/jakartaee
+ RunAs
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.RunAs
+
+
+
+ security-role-refType
+ https://jakarta.ee/xml/ns/jakartaee
+ SecurityRoleRef
+ org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.SecurityRoleRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "RoleName"; }
+
+
+
+ jsp-fileType
+ https://jakarta.ee/xml/ns/jakartaee
+ JspFileType
+ java.lang.String
+
+
+ filter-nameType
+ https://jakarta.ee/xml/ns/jakartaee
+ FilterNameType
+ java.lang.String
+
+
+ dispatcherType
+ https://jakarta.ee/xml/ns/jakartaee
+ DispatcherType
+ java.lang.String
+
+
+ absoluteOrderingType
+ https://jakarta.ee/xml/ns/jakartaee
+ AbsoluteOrdering
+
+ org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering
+
+
+
+ orderingType
+ https://jakarta.ee/xml/ns/jakartaee
+ RelativeOrdering
+
+ org.netbeans.modules.j2ee.dd.api.web.RelativeOrdering
+
+
+
+ ordering-orderingType
+ https://jakarta.ee/xml/ns/jakartaee
+ RelativeOrderingItems
+
+ org.netbeans.modules.j2ee.dd.api.web.RelativeOrderingItems
+
+
+
+ ordering-othersType
+ https://jakarta.ee/xml/ns/jakartaee
+ RelativeOrderingOthersItem
+
+ org.netbeans.modules.j2ee.dd.api.web.RelativeOrderingOthersItem
+
+
+
+
+
+
+ handlerType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandler
+ org.netbeans.modules.j2ee.dd.impl.common.Comparator
+ org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple
+
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean
+
+
+ public String getKeyProperty() { return "HandlerName"; }
+
+
+
+ handler-chainsType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChains
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains
+
+
+ handler-chainType
+ https://jakarta.ee/xml/ns/jakartaee
+ ServiceRefHandlerChainType
+ org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain
+
+
+ dewey-versionType
+ https://jakarta.ee/xml/ns/jakartaee
+ version
+ java.math.BigDecimal
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd
new file mode 100644
index 000000000000..633b1d69f2f5
--- /dev/null
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd
@@ -0,0 +1,316 @@
+
+
+
+
+
+ Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+
+
+
+
+
+
+ ...
+
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Jakarta EE
+ namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/web-fragment_6_1.xsd
+
+ ]]>
+
+
+
+
+
+
+ The following conventions apply to all Jakarta EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The web-fragment element is the root of the deployment
+ descriptor for a web fragment. Note that the sub-elements
+ of this element can be in the arbitrary order. Because of
+ that, the multiplicity of the elements of distributable,
+ session-config, welcome-file-list, jsp-config, login-config,
+ and locale-encoding-mapping-list was changed from "?" to "*"
+ in this schema. However, the deployment descriptor instance
+ file must not contain multiple elements of session-config,
+ jsp-config, and login-config. When there are multiple elements of
+ welcome-file-list or locale-encoding-mapping-list, the container
+ must concatenate the element contents. The multiple occurence
+ of the element distributable is redundant and the container
+ treats that case exactly in the same way when there is only
+ one distributable.
+
+
+
+
+
+
+
+ The servlet element contains the name of a servlet.
+ The name must be unique within the web application.
+
+
+
+
+
+
+
+
+
+
+ The filter element contains the name of a filter.
+ The name must be unique within the web application.
+
+
+
+
+
+
+
+
+
+
+ The ejb-local-ref-name element contains the name of an
+ enterprise bean reference. The enterprise bean reference
+ is an entry in the web application's environment and is relative
+ to the java:comp/env context. The name must be unique within
+ the web application.
+
+ It is recommended that name is prefixed with "ejb/".
+
+
+
+
+
+
+
+
+
+
+ The ejb-ref-name element contains the name of an
+ enterprise bean reference. The enterprise bean reference
+ is an entry in the web application's environment and is relative
+ to the java:comp/env context. The name must be unique within
+ the web application.
+
+ It is recommended that name is prefixed with "ejb/".
+
+
+
+
+
+
+
+
+
+
+ The resource-env-ref-name element specifies the name of
+ a resource environment reference; its value is the
+ environment entry name used in the web application code.
+ The name is a JNDI name relative to the java:comp/env
+ context and must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+ The message-destination-ref-name element specifies the name of
+ a message destination reference; its value is the
+ environment entry name used in the web application code.
+ The name is a JNDI name relative to the java:comp/env
+ context and must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+ The res-ref-name element specifies the name of a
+ resource manager connection factory reference. The name
+ is a JNDI name relative to the java:comp/env context.
+ The name must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+ The env-entry-name element contains the name of a web
+ application's environment entry. The name is a JNDI
+ name relative to the java:comp/env context. The name
+ must be unique within a web application.
+
+
+
+
+
+
+
+
+
+
+ A role-name-key is specified to allow the references
+ from the security-role-refs.
+
+
+
+
+
+
+
+
+
+
+ The keyref indicates the references from
+ security-role-ref to a specified role-name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Please see section 8.2.2 of the specification for details.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This element contains a sequence of "name" elements, each of
+ which
+ refers to an application configuration resource by the "name"
+ declared on its web.xml fragment. This element can also contain
+ a single "others" element which specifies that this document
+ comes
+ before or after other documents within the application.
+ See section 8.2.2 of the specification for details.
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java
index 2e7b533b7554..e28016222cba 100644
--- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java
+++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java
@@ -960,6 +960,9 @@ public Object clone() {
} else if (WebApp.VERSION_6_0.equals(version)) {
((org.netbeans.modules.j2ee.dd.impl.web.model_6_0.WebApp)clonedWebApp)._setSchemaLocation
("https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd");
+ } else if (WebApp.VERSION_6_1.equals(version)) {
+ ((org.netbeans.modules.j2ee.dd.impl.web.model_6_1.WebApp)clonedWebApp)._setSchemaLocation
+ ("https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd");
}
}
proxy.setError(error);
diff --git a/enterprise/j2ee.ddloaders/nbproject/project.properties b/enterprise/j2ee.ddloaders/nbproject/project.properties
index 8b1a7e90e80b..3d220e48b9ff 100644
--- a/enterprise/j2ee.ddloaders/nbproject/project.properties
+++ b/enterprise/j2ee.ddloaders/nbproject/project.properties
@@ -17,7 +17,7 @@
javac.compilerargs=-Xlint:all -Xlint:-serial
javac.source=1.8
-spec.version.base=1.60.0
+spec.version.base=1.62.0
javadoc.arch=${basedir}/arch.xml
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties
index 080f26ff6038..d6ea216e8080 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties
@@ -30,6 +30,8 @@ Loaders/text/x-dd-application6.0/Factories/org-netbeans-modules-j2ee-ddloaders-w
Loaders/text/x-dd-application7.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-application8.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-application9.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
+Loaders/text/x-dd-application10.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
+Loaders/text/x-dd-application11.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-client1.3/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-client1.4/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-client5.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
@@ -38,6 +40,7 @@ Loaders/text/x-dd-client7.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DD
Loaders/text/x-dd-client8.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-client9.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-client10.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
+Loaders/text/x-dd-client11.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-ejbjar2.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-ejbjar2.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-ejbjar3.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
@@ -53,11 +56,13 @@ Loaders/text/x-dd-servlet3.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-D
Loaders/text/x-dd-servlet4.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet5.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet6.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
+Loaders/text/x-dd-servlet6.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet-fragment3.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet-fragment3.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet-fragment4.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet-fragment5.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-servlet-fragment6.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
+Loaders/text/x-dd-servlet-fragment6.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-web2.5/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd-web3.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
Loaders/text/x-dd/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java
index ec7cdefa3f52..37db80826b09 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java
@@ -49,6 +49,8 @@ public class EarDataLoader extends UniFileLoader {
private static final String REQUIRED_MIME_PREFIX_6 = "text/x-dd-application9.0"; // NOI18N
private static final String REQUIRED_MIME_PREFIX_7 = "text/x-dd-application10.0"; // NOI18N
+
+ private static final String REQUIRED_MIME_PREFIX_8 = "text/x-dd-application11.0"; // NOI18N
public EarDataLoader () {
super ("org.netbeans.modules.j2ee.ddloaders.app.EarDataObject"); // NOI18N
@@ -75,6 +77,7 @@ protected void initialize () {
getExtensions().addMimeType(REQUIRED_MIME_PREFIX_5);
getExtensions().addMimeType(REQUIRED_MIME_PREFIX_6);
getExtensions().addMimeType(REQUIRED_MIME_PREFIX_7);
+ getExtensions().addMimeType(REQUIRED_MIME_PREFIX_8);
}
@Override
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataNode.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataNode.java
index 0ca4caacd36e..55104f5ed05c 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataNode.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataNode.java
@@ -91,7 +91,7 @@ public Action[] getActions(boolean context) {
}
actions.add(origActions[i]);
}
- filteredActions = actions.toArray(new Action[actions.size()]);
+ filteredActions = actions.toArray(new Action[0]);
}
return filteredActions;
}
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java
index a5f93135a269..ca44a5355870 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java
@@ -49,7 +49,7 @@ public final class EnterpriseCatalog implements CatalogReader, CatalogDescriptor
private static final String JAKARTAEE_NS = "https://jakarta.ee/xml/ns/jakartaee"; //NOI18N
private static final String RESOURCE_PATH = "nbres:/org/netbeans/modules/j2ee/dd/impl/resources/"; //NO18N
- private List schemas = new ArrayList<>();
+ private List schemas = new ArrayList<>(256);
private static final Logger LOGGER = Logger.getLogger(EnterpriseCatalog.class.getName());
@@ -67,6 +67,8 @@ private void initialize(){
schemas.add(new SchemaInfo("application-client_7.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("application-client_8.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("application-client_9.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("application-client_10.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("application-client_11.xsd", JAKARTAEE_NS));
// Application schema
schemas.add(new SchemaInfo("application_1_4.xsd", J2EE_NS));
schemas.add(new SchemaInfo("application_5.xsd", JAVAEE_NS));
@@ -74,6 +76,8 @@ private void initialize(){
schemas.add(new SchemaInfo("application_7.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("application_8.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("application_9.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("application_10.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("application_11.xsd", JAKARTAEE_NS));
// Web services schema
schemas.add(new SchemaInfo("j2ee_web_services_1_1.xsd", J2EE_NS));
schemas.add(new SchemaInfo("javaee_web_services_1_2.xsd", JAVAEE_NS));
@@ -91,6 +95,7 @@ private void initialize(){
schemas.add(new SchemaInfo("connector_1_6.xsd", JAVAEE_NS));
schemas.add(new SchemaInfo("connector_1_7.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("connector_2_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("connector_2_1.xsd", JAKARTAEE_NS));
// Enterprise JavaBeans Deployment Descriptor Schema
schemas.add(new SchemaInfo("ejb-jar_2_1.xsd", J2EE_NS));
schemas.add(new SchemaInfo("ejb-jar_3_0.xsd", JAVAEE_NS));
@@ -104,22 +109,30 @@ private void initialize(){
schemas.add(new SchemaInfo("web-app_3_1.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("web-app_4_0.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("web-app_5_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("web-app_6_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("web-app_6_1.xsd", JAKARTAEE_NS));
// Web Application Deployment Descriptor common definitions schema
schemas.add(new SchemaInfo("web-common_3_0.xsd", JAVAEE_NS));
schemas.add(new SchemaInfo("web-common_3_1.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("web-common_4_0.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("web-common_5_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("web-common_6_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("web-common_6_1.xsd", JAKARTAEE_NS));
// Web Application Deployment Descriptor fragment schema
schemas.add(new SchemaInfo("web-fragment_3_0.xsd", JAVAEE_NS));
schemas.add(new SchemaInfo("web-fragment_3_1.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("web-fragment_4_0.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("web-fragment_5_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("web-fragment_6_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("web-fragment_6_1.xsd", JAKARTAEE_NS));
// JavaServer Pages Deployment Descriptor schema
schemas.add(new SchemaInfo("jsp_2_0.xsd", J2EE_NS));
schemas.add(new SchemaInfo("jsp_2_1.xsd", JAVAEE_NS));
schemas.add(new SchemaInfo("jsp_2_2.xsd", JAVAEE_NS));
schemas.add(new SchemaInfo("jsp_2_3.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("jsp_3_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("jsp_3_1.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("jsp_4_0.xsd", JAKARTAEE_NS));
// J2EE and Java EE definitions file that contains common schema components
schemas.add(new SchemaInfo("j2ee_1_4.xsd", J2EE_NS));
schemas.add(new SchemaInfo("javaee_5.xsd", JAVAEE_NS));
@@ -127,6 +140,8 @@ private void initialize(){
schemas.add(new SchemaInfo("javaee_7.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("javaee_8.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("jakartaee_9.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("jakartaee_10.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("jakartaee_11.xsd", JAKARTAEE_NS));
// web 2.2 and 2.3 dtds
schemas.add(new SchemaInfo("web-app_2_2.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", true)); //NO18N
schemas.add(new SchemaInfo("web-app_2_3.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", true)); //NO18N
@@ -135,9 +150,12 @@ private void initialize(){
schemas.add(new SchemaInfo("beans_1_1.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("beans_2_0.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("beans_3_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("beans_4_0.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("beans_4_1.xsd", JAKARTAEE_NS));
// Java EE application permissions schema
schemas.add(new SchemaInfo("permissions_7.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("permissions_9.xsd", JAKARTAEE_NS));
+ schemas.add(new SchemaInfo("permissions_10.xsd", JAKARTAEE_NS));
// Schema for batch.xml-based artifact loading in Java Batch
schemas.add(new SchemaInfo("batchXML_1_0.xsd", NEW_JAVAEE_NS));
schemas.add(new SchemaInfo("batchXML_2_0.xsd", JAKARTAEE_NS));
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java
index 257adaa87e7c..d2ab62e606b9 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java
@@ -42,6 +42,7 @@ public class ClientDataLoader extends UniFileLoader {
private static final String REQUIRED_MIME_PREFIX_6 = "text/x-dd-client8.0"; // NOI18N
private static final String REQUIRED_MIME_PREFIX_7 = "text/x-dd-client9.0"; // NOI18N
private static final String REQUIRED_MIME_PREFIX_8 = "text/x-dd-client10.0"; // NOI18N
+ private static final String REQUIRED_MIME_PREFIX_9 = "text/x-dd-client11.0"; // NOI18N
public ClientDataLoader() {
super("org.netbeans.modules.j2ee.ddloaders.client.ClientDataObject"); // NOI18N
@@ -68,6 +69,7 @@ protected void initialize() {
getExtensions().addMimeType(REQUIRED_MIME_PREFIX_6);
getExtensions().addMimeType(REQUIRED_MIME_PREFIX_7);
getExtensions().addMimeType(REQUIRED_MIME_PREFIX_8);
+ getExtensions().addMimeType(REQUIRED_MIME_PREFIX_9);
}
@Override
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml
index 35deb028adaa..c1ae1b7aca7d 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml
@@ -95,6 +95,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -145,6 +155,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -281,6 +301,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -351,4 +381,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml
index 52c09ec79e46..2707d1bc15c6 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml
@@ -24,6 +24,9 @@
+
+
+
@@ -45,6 +48,9 @@
+
+
+
@@ -114,6 +120,9 @@
+
+
+
@@ -129,6 +138,9 @@
+
+
+
@@ -153,6 +165,8 @@
+
+
@@ -637,6 +651,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1047,6 +1143,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1346,6 +1524,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1406,6 +1596,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1526,6 +1728,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1610,6 +1824,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java
index fb6e01d5f21b..53ce8a87bf8e 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java
@@ -129,7 +129,8 @@ protected int associateLookup() {
DDWeb30DataLoader.REQUIRED_MIME_31, DDWebFragment30DataLoader.REQUIRED_MIME_31,
DDWeb40DataLoader.REQUIRED_MIME_40, DDWebFragment40DataLoader.REQUIRED_MIME_40,
DDWeb50DataLoader.REQUIRED_MIME_50, DDWebFragment50DataLoader.REQUIRED_MIME_50,
- DDWeb60DataLoader.REQUIRED_MIME_60, DDWebFragment60DataLoader.REQUIRED_MIME_60},
+ DDWeb60DataLoader.REQUIRED_MIME_60, DDWebFragment60DataLoader.REQUIRED_MIME_60,
+ DDWeb60DataLoader.REQUIRED_MIME_61, DDWebFragment60DataLoader.REQUIRED_MIME_61},
iconBase="org/netbeans/modules/j2ee/ddloaders/web/resources/DDDataIcon.gif",
persistenceType=TopComponent.PERSISTENCE_ONLY_OPENED,
preferredID="multiview_xml",
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java
index e8623d2f886d..4e3f612484c4 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java
@@ -27,12 +27,14 @@
* A data loader for web.xml version 6.0. Required for providing
* a different action context than for older versions - see #85570.
*
+ * @author Jose Contreras
*/
public class DDWeb60DataLoader extends DDDataLoader {
private static final long serialVersionUID = 1L;
public static final String REQUIRED_MIME_60 = "text/x-dd-servlet6.0"; // NOI18N
+ public static final String REQUIRED_MIME_61 = "text/x-dd-servlet6.1"; // NOI18N
public DDWeb60DataLoader() {
super("org.netbeans.modules.j2ee.ddloaders.web.DDDataObject"); // NOI18N
@@ -45,7 +47,7 @@ protected String actionsContext() {
@Override
protected String[] getSupportedMimeTypes() {
- return new String[]{REQUIRED_MIME_60};
+ return new String[]{REQUIRED_MIME_60, REQUIRED_MIME_61};
}
@Override
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java
index e3bed5a27601..0ccbdecc0157 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java
@@ -27,13 +27,14 @@
* A data loader for web-fragment.xml version 6.0. Required for providing
* a different action context than for older versions - see #85570.
*
- * @author pepness
+ * @author Jose Contreras
*/
public class DDWebFragment60DataLoader extends DDDataLoader {
private static final long serialVersionUID = 1L;
public static final String REQUIRED_MIME_60 = "text/x-dd-servlet-fragment6.0"; // NOI18N
+ public static final String REQUIRED_MIME_61 = "text/x-dd-servlet-fragment6.1"; // NOI18N
public DDWebFragment60DataLoader() {
super("org.netbeans.modules.j2ee.ddloaders.web.DDFragmentDataObject"); // NOI18N
@@ -46,7 +47,7 @@ protected String actionsContext() {
@Override
protected String[] getSupportedMimeTypes() {
- return new String[]{REQUIRED_MIME_60};
+ return new String[]{REQUIRED_MIME_60, REQUIRED_MIME_61};
}
@Override
diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/multiview/DDUtils.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/multiview/DDUtils.java
index c99a3d622744..07af1f872a50 100644
--- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/multiview/DDUtils.java
+++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/multiview/DDUtils.java
@@ -176,7 +176,7 @@ public static FilterMapping[] getFilterMappings(WebApp webApp, Servlet servlet)
maps.add(fm);
}
}
- return (FilterMapping[]) maps.toArray(new FilterMapping[maps.size()]);
+ return (FilterMapping[]) maps.toArray(new FilterMapping[0]);
}
private static List getServletMappingList(WebApp webApp, Servlet servlet) {
diff --git a/enterprise/j2ee.earproject/manifest.mf b/enterprise/j2ee.earproject/manifest.mf
index 84dc2f673024..2f7ef38ea9cd 100644
--- a/enterprise/j2ee.earproject/manifest.mf
+++ b/enterprise/j2ee.earproject/manifest.mf
@@ -2,6 +2,6 @@ Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.j2ee.earproject
OpenIDE-Module-Layer: org/netbeans/modules/j2ee/earproject/ui/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/earproject/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.74
+OpenIDE-Module-Specification-Version: 1.76
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java
index 75220aa6e4a8..e56eed9d0a3c 100644
--- a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java
+++ b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java
@@ -321,7 +321,7 @@ private void addUserModules(EarProject p, final Map user
assert false : "Unknown module type: " + type;
}
}
- Project[] webAndCarsArray = webAndCars.toArray(new Project[webAndCars.size()]);
+ Project[] webAndCarsArray = webAndCars.toArray(new Project[0]);
for (Project ejb : ejbs) {
addEJBToClassPaths(ejb, webAndCarsArray); // #74123
}
diff --git a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java
index af662456c255..6db2395ed80f 100644
--- a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java
+++ b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java
@@ -310,7 +310,9 @@ public String getModuleVersion () {
if (p == null) {
p = Profile.JAVA_EE_7_FULL;
}
- if (Profile.JAKARTA_EE_10_FULL.equals(p) || Profile.JAKARTA_EE_10_FULL.equals(p)) {
+ if (Profile.JAKARTA_EE_11_FULL.equals(p)) {
+ return Application.VERSION_11;
+ } else if (Profile.JAKARTA_EE_10_FULL.equals(p)) {
return Application.VERSION_10;
} else if (Profile.JAKARTA_EE_9_1_FULL.equals(p) || Profile.JAKARTA_EE_9_FULL.equals(p)) {
return Application.VERSION_9;
diff --git a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/actions/AddModuleAction.java b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/actions/AddModuleAction.java
index a837c96193e8..d8a24c59eab9 100644
--- a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/actions/AddModuleAction.java
+++ b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/actions/AddModuleAction.java
@@ -108,7 +108,7 @@ private Project[] getSelectedProjects(FileObject projDir) throws UserCancelExcep
}
}
Children.Array children = new Children.Array();
- children.add(moduleProjectNodes.toArray(new Node[moduleProjectNodes.size()]));
+ children.add(moduleProjectNodes.toArray(new Node[0]));
final AbstractNode root = new AbstractNode(children);
String moduleSelector = NbBundle.getMessage(AddModuleAction.class, "LBL_ModuleSelectorTitle");
diff --git a/enterprise/j2ee.ejbcore/manifest.mf b/enterprise/j2ee.ejbcore/manifest.mf
index d9577477f3e6..945b5d294ddf 100644
--- a/enterprise/j2ee.ejbcore/manifest.mf
+++ b/enterprise/j2ee.ejbcore/manifest.mf
@@ -3,5 +3,5 @@ OpenIDE-Module: org.netbeans.modules.j2ee.ejbcore
OpenIDE-Module-Layer: org/netbeans/modules/j2ee/ejbcore/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/ejbcore/Bundle.properties
OpenIDE-Module-Needs: javax.script.ScriptEngine.freemarker
-OpenIDE-Module-Specification-Version: 1.74
+OpenIDE-Module-Specification-Version: 1.76
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/j2ee.ejbcore/nbproject/org-netbeans-modules-j2ee-ejbcore.sig b/enterprise/j2ee.ejbcore/nbproject/org-netbeans-modules-j2ee-ejbcore.sig
index e5b798fefe9b..e84a03877d6b 100644
--- a/enterprise/j2ee.ejbcore/nbproject/org-netbeans-modules-j2ee-ejbcore.sig
+++ b/enterprise/j2ee.ejbcore/nbproject/org-netbeans-modules-j2ee-ejbcore.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.73
+#Version 1.74
CLSS public abstract java.awt.Component
cons protected init()
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/EjbGenerationUtil.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/EjbGenerationUtil.java
index 45bb44a84253..371c885659c5 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/EjbGenerationUtil.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/EjbGenerationUtil.java
@@ -62,7 +62,7 @@ public static String[] getPackages(Project project) {
for (int i = 0; i < groups.length; i++) {
findPackages(groups[i].getRootFolder(),"", pkgs);
}
- return pkgs.toArray(new String[pkgs.size()]);
+ return pkgs.toArray(new String[0]);
}
private static void findPackages (FileObject root, String curPkg, Set pkgs) {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java
index b3ca3d2f905b..e73d072a8989 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java
@@ -241,8 +241,8 @@ public void run(WorkingCopy workingCopy) throws IOException {
// call ejb should not make this check, all should be handled in EnterpriseReferenceContainer
boolean isCallerFreeform = enterpriseProject.getClass().getName().equals("org.netbeans.modules.ant.freeform.FreeformProject");
- boolean isCallerEE6WebProject = isEE6WebProject(enterpriseProject);
- boolean isCallerEE10WebProject = isEE10WebProject(enterpriseProject);
+ final boolean isEjb31LiteSupported = isEjb31LiteSupported(enterpriseProject);
+ final boolean isEjb40LiteSupported = isEjb40LiteSupported(enterpriseProject);
List filteredResults = new ArrayList(allProjects.length);
for (int i = 0; i < allProjects.length; i++) {
@@ -253,14 +253,8 @@ public void run(WorkingCopy workingCopy) throws IOException {
EjbJar[] ejbJars = EjbJar.getEjbJars(allProjects[i]);
Profile profile = ejbJars.length > 0 ? ejbJars[0].getJ2eeProfile() : null;
- if (J2eeModule.Type.EJB.equals(type) || (J2eeModule.Type.WAR.equals(type)
- && (Profile.JAVA_EE_6_WEB.equals(profile) || Profile.JAVA_EE_6_FULL.equals(profile)
- || Profile.JAVA_EE_7_WEB.equals(profile) || Profile.JAVA_EE_7_FULL.equals(profile)
- || Profile.JAVA_EE_8_WEB.equals(profile) || Profile.JAVA_EE_8_FULL.equals(profile)
- || Profile.JAKARTA_EE_8_WEB.equals(profile) || Profile.JAKARTA_EE_8_FULL.equals(profile)
- || Profile.JAKARTA_EE_9_WEB.equals(profile) || Profile.JAKARTA_EE_9_FULL.equals(profile)
- || Profile.JAKARTA_EE_9_1_WEB.equals(profile) || Profile.JAKARTA_EE_9_1_FULL.equals(profile)
- || Profile.JAKARTA_EE_10_WEB.equals(profile) || Profile.JAKARTA_EE_10_FULL.equals(profile)))) {
+ if (J2eeModule.Type.EJB.equals(type) ||
+ (J2eeModule.Type.WAR.equals(type) && profile.isAtLeast(Profile.JAVA_EE_6_WEB))) {
isEJBModule = true;
}
}
@@ -269,18 +263,18 @@ public void run(WorkingCopy workingCopy) throws IOException {
// If the caller project is a freeform project, include caller itself only
// If the caller project is a Java EE 6 web project, include itself in the list
if ((isEJBModule && !isCallerFreeform) ||
- (enterpriseProject.equals(allProjects[i]) && (isCallerFreeform || isCallerEE6WebProject || isCallerEE10WebProject) ) ) {
+ (enterpriseProject.equals(allProjects[i]) && (isCallerFreeform || isEjb31LiteSupported || isEjb40LiteSupported) ) ) {
filteredResults.add(allProjects[i]);
}
}
return filteredResults.toArray(new Project[0]);
}
- public static boolean isEE6WebProject(Project enterpriseProject) {
+ public static boolean isEjb31LiteSupported(Project enterpriseProject) {
return J2eeProjectCapabilities.forProject(enterpriseProject).isEjb31LiteSupported();
}
- public static boolean isEE10WebProject(Project enterpriseProject) {
+ public static boolean isEjb40LiteSupported(Project enterpriseProject) {
return J2eeProjectCapabilities.forProject(enterpriseProject).isEjb40LiteSupported();
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java
index a0bf95e329be..b443e325d4c3 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java
@@ -94,11 +94,11 @@ public Set instantiate() throws IOException {
String resource;
// see #213631 - caused by fact that EJB DD schemas have different numbering than WEB DD schemas
// (so Java EE6 Web-DD is of the version 3.0, but Ejb-DD is of the version 3.1)
- if (j2eeProfile == Profile.JAKARTA_EE_9_WEB || j2eeProfile == Profile.JAKARTA_EE_9_1_WEB || j2eeProfile == Profile.JAKARTA_EE_10_WEB) {
+ if (j2eeProfile.isAtLeast(Profile.JAKARTA_EE_9_WEB)) {
resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-4.0.xml";
- } else if (j2eeProfile == Profile.JAVA_EE_7_WEB || j2eeProfile == Profile.JAVA_EE_8_WEB || j2eeProfile == Profile.JAKARTA_EE_8_WEB) {
+ } else if (j2eeProfile.isAtLeast(Profile.JAVA_EE_7_WEB)) {
resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-3.2.xml";
- } else if (j2eeProfile == Profile.JAVA_EE_6_WEB) {
+ } else if (j2eeProfile.isAtLeast(Profile.JAVA_EE_6_WEB)) {
// ee6 web module is of the version 3.0 but the ee6 deployment descriptor schema should be of version 3.1
resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-3.1.xml";
} else {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/AppServerValidationPanel.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/AppServerValidationPanel.java
index e6ff0b5e7272..8939f597c6a1 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/AppServerValidationPanel.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/AppServerValidationPanel.java
@@ -89,10 +89,10 @@ private static boolean isSessionBeanCodeGenerationAlowed(Project project) {
ClassPath classpath = ClassPath.getClassPath(project.getProjectDirectory(), ClassPath.COMPILE);
return !(classpath.findResource("jakarta/ejb/Stateless.class") == null //NOI18N
|| classpath.findResource("jakarta/ejb/Stateful.class") == null //NOI18N
- || classpath.findResource("jakarta/ejb/Singleton.class") == null //NOI18N
+ || classpath.findResource("jakarta/ejb/Singleton.class") == null) //NOI18N
|| //NOI18N
!(classpath.findResource("javax/ejb/Stateless.class") == null //NOI18N
|| classpath.findResource("javax/ejb/Stateful.class") == null //NOI18N
- || classpath.findResource("javax/ejb/Singleton.class") == null)); //NOI18N
+ || classpath.findResource("javax/ejb/Singleton.class") == null); //NOI18N
}
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java
index e5adb1dfc6f3..31bc8d64c4c3 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java
@@ -76,7 +76,8 @@ public EjbFacadeVisualPanel2(Project project, WizardDescriptor wizard) {
ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_8_FULL);
boolean serverSupportsEJB40 = ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_FULL)
|| ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_1_FULL)
- || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_10_FULL);
+ || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_10_FULL)
+ || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_11_FULL);
if (!projectCap.isEjb31Supported() && !serverSupportsEJB31
&& !projectCap.isEjb40Supported()&& !serverSupportsEJB40){
remoteCheckBox.setVisible(false);
@@ -98,7 +99,7 @@ private void updateInProjectCombo(boolean show) {
inProjectCombo.setVisible(show);
if (show && projectsList == null) {
List projects = SessionEJBWizardPanel.getProjectsList(project);
- projectsList = new DefaultComboBoxModel(projects.toArray(new Project[projects.size()]));
+ projectsList = new DefaultComboBoxModel(projects.toArray(new Project[0]));
final ListCellRenderer defaultRenderer = inProjectCombo.getRenderer();
if (!projects.isEmpty()){
inProjectCombo.setRenderer(new ListCellRenderer() {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardIterator.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardIterator.java
index 0758eaf6dbb1..85d87cf97cb8 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardIterator.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardIterator.java
@@ -117,8 +117,11 @@ public final class EjbFacadeWizardIterator implements WizardDescriptor.ProgressI
private static final String FACADE_REMOTE_SUFFIX = FACADE_SUFFIX + "Remote"; //NOI18N
private static final String FACADE_LOCAL_SUFFIX = FACADE_SUFFIX + "Local"; //NOI18N
private static final String EJB_LOCAL = "javax.ejb.Local"; //NOI18N
+ private static final String EJB_LOCAL_JAKARTA = "jakarta.ejb.Local"; //NOI18N
private static final String EJB_REMOTE = "javax.ejb.Remote"; //NOI18N
+ private static final String EJB_REMOTE_JAKARTA = "jakarta.ejb.Remote"; //NOI18N
protected static final String EJB_STATELESS = "javax.ejb.Stateless"; //NOI18N
+ protected static final String EJB_STATELESS_JAKARTA = "jakarta.ejb.Stateless"; //NOI18N
private int index;
private WizardDescriptor wizard;
@@ -232,6 +235,16 @@ Set generate(final Project project, final FileObject targetFolder, f
final String entitySimpleName = JavaIdentifiers.unqualify(entityFQN);
final String variableName = entitySimpleName.toLowerCase().charAt(0) + entitySimpleName.substring(1);
+ final boolean jakartaVariant;
+ final ClassPath targetClassPath = ClassPath.getClassPath(targetFolder, ClassPath.COMPILE);
+ if (targetClassPath != null) {
+ final FileObject javaxStatelessFo = targetClassPath.findResource(EJB_STATELESS.replace(".", "/") + ".class");
+ final FileObject jakartaStatelessFo = targetClassPath.findResource(EJB_STATELESS_JAKARTA.replace(".", "/") + ".class");
+ jakartaVariant = javaxStatelessFo == null || jakartaStatelessFo != null;
+ } else {
+ jakartaVariant = true;
+ }
+
//create the abstract facade class
Task waiter = null;
final String afName = pkg.isEmpty() ? FACADE_ABSTRACT : pkg + "." + FACADE_ABSTRACT; //NOI18N
@@ -253,7 +266,7 @@ public void run(WorkingCopy workingCopy) throws Exception {
TypeElement classElement = (TypeElement)workingCopy.getTrees().getElement(classTreePath);
String genericsTypeName = "T"; //NOI18N
- List methodOptions = getAbstractFacadeMethodOptions(genericsTypeName, "entity"); //NOI18N
+ List methodOptions = getAbstractFacadeMethodOptions(genericsTypeName, "entity", jakartaVariant); //NOI18N
List members = new ArrayList();
String entityClassVar = "entityClass"; //NOI18N
Tree classObjectTree = genUtils.createType("java.lang.Class<" + genericsTypeName + ">", classElement); //NOI18N
@@ -333,7 +346,7 @@ public void run(CompilationController cc) throws Exception {
// generate methods for the facade
EntityManagerGenerator generator = new EntityManagerGenerator(facade, entityFQN);
- List methodOptions = getMethodOptions(entityFQN, variableName);
+ List methodOptions = getMethodOptions(entityFQN, variableName, jakartaVariant);
for (GenerationOptions each : methodOptions){
generator.generate(each, strategyClass);
}
@@ -342,12 +355,12 @@ public void run(CompilationController cc) throws Exception {
final String localInterfaceFQN = pkg + "." + getUniqueClassName(entitySimpleName + FACADE_LOCAL_SUFFIX, targetFolder);
final String remoteInterfaceFQN = pkg + "." + getUniqueClassName(entitySimpleName + FACADE_REMOTE_SUFFIX, targetFolder);
- List intfOptions = getAbstractFacadeMethodOptions(entityFQN, variableName);
+ List intfOptions = getAbstractFacadeMethodOptions(entityFQN, variableName, jakartaVariant);
if (hasLocal) {
final SourceGroup[] groups = ProjectUtils.getSources(project).getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
String simpleName = JavaIdentifiers.unqualify(localInterfaceFQN);
if (!interfaceExists(groups, pkg, simpleName)) {
- FileObject local = createInterface(simpleName, EJB_LOCAL, targetFolder);
+ FileObject local = createInterface(simpleName, jakartaVariant ? EJB_LOCAL_JAKARTA : EJB_LOCAL, targetFolder);
addMethodToInterface(intfOptions, local);
createdFiles.add(local);
}
@@ -357,7 +370,7 @@ public void run(CompilationController cc) throws Exception {
String simpleName = JavaIdentifiers.unqualify(remoteInterfaceFQN);
if (!interfaceExists(groups, pkg, simpleName)) {
FileObject remotePackage = SessionGenerator.createRemoteInterfacePackage(remoteProject, pkg, targetFolder);
- FileObject remote = createInterface(simpleName, EJB_REMOTE, remotePackage);
+ FileObject remote = createInterface(simpleName, jakartaVariant ? EJB_REMOTE_JAKARTA : EJB_REMOTE, remotePackage);
addMethodToInterface(intfOptions, remote);
createdFiles.add(remote);
if (entityProject != null && !entityProject.getProjectDirectory().equals(remoteProject.getProjectDirectory())) {
@@ -434,7 +447,7 @@ public void run(WorkingCopy wc) throws Exception {
DeclaredType declaredType = wc.getTypes().getDeclaredType(abstactFacadeElement, entityElement.asType());
Tree extendsClause = maker.Type(declaredType);
ClassTree newClassTree = maker.Class(
- maker.addModifiersAnnotation(classTree.getModifiers(), genUtils.createAnnotation(EJB_STATELESS)),
+ maker.addModifiersAnnotation(classTree.getModifiers(), genUtils.createAnnotation(jakartaVariant ? EJB_STATELESS_JAKARTA : EJB_STATELESS)),
classTree.getSimpleName(),
classTree.getTypeParameters(),
extendsClause,
@@ -476,24 +489,24 @@ public void run(WorkingCopy wc) throws Exception {
* @return the options representing the methods for a facade, i.e. create/edit/
* find/remove/findAll.
*/
- private List getMethodOptions(String entityFQN, String variableName){
+ private List getMethodOptions(String entityFQN, String variableName, boolean jakartaVariant){
GenerationOptions getEMOptions = new GenerationOptions();
getEMOptions.setAnnotation("java.lang.Override"); //NOI18N
getEMOptions.setMethodName("getEntityManager"); //NOI18N
getEMOptions.setOperation(GenerationOptions.Operation.GET_EM);
- getEMOptions.setReturnType("javax.persistence.EntityManager");//NOI18N
+ getEMOptions.setReturnType(jakartaVariant ? "jakarta.persistence.EntityManager" : "javax.persistence.EntityManager");//NOI18N
getEMOptions.setModifiers(EnumSet.of(Modifier.PROTECTED));
return Arrays.asList(getEMOptions);
}
- private List getAbstractFacadeMethodOptions(String entityFQN, String variableName){
+ private List getAbstractFacadeMethodOptions(String entityFQN, String variableName, boolean jakartaVariant){
//abstract methods
GenerationOptions getEMOptions = new GenerationOptions();
getEMOptions.setMethodName("getEntityManager"); //NOI18N
- getEMOptions.setReturnType("javax.persistence.EntityManager");//NOI18N
+ getEMOptions.setReturnType(jakartaVariant ? "jakarta.persistence.EntityManager" : "javax.persistence.EntityManager");//NOI18N
getEMOptions.setModifiers(EnumSet.of(Modifier.PROTECTED, Modifier.ABSTRACT));
//implemented methods
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardPanel2.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardPanel2.java
index 4cd7cda32307..0d178cda0c6b 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardPanel2.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeWizardPanel2.java
@@ -45,6 +45,9 @@
import org.openide.util.NbBundle;
import org.openide.util.Utilities;
+import static org.netbeans.modules.j2ee.ejbcore.ejb.wizard.jpa.dao.EjbFacadeWizardIterator.EJB_STATELESS;
+import static org.netbeans.modules.j2ee.ejbcore.ejb.wizard.jpa.dao.EjbFacadeWizardIterator.EJB_STATELESS_JAKARTA;
+
public class EjbFacadeWizardPanel2 implements WizardDescriptor.Panel, ChangeListener {
/**
@@ -120,8 +123,11 @@ public boolean isValid() {
}
if (!statelessIfaceOnProjectCP()) {
wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
- NbBundle.getMessage(EjbFacadeWizardPanel2.class, "ERR_SessionIfaceNotOnProjectClasspath", //NOI18N
- EjbFacadeWizardIterator.EJB_STATELESS));
+ NbBundle.getMessage(
+ EjbFacadeWizardPanel2.class,
+ "ERR_SessionIfaceNotOnProjectClasspath", //NOI18N
+ EJB_STATELESS_JAKARTA + "/" + EJB_STATELESS_JAKARTA //NOI18N
+ ));
return false;
}
@@ -231,13 +237,12 @@ public Project getEntityProject() {
private boolean statelessIfaceOnProjectCP() {
ClassPath cp = ClassPath.getClassPath(project.getProjectDirectory(), ClassPath.COMPILE);
- ClassLoader cl = cp.getClassLoader(true);
- try {
- Class.forName(EjbFacadeWizardIterator.EJB_STATELESS, false, cl);
- } catch (ClassNotFoundException cnfe) {
+ if(cp == null) {
return false;
}
- return true;
+ FileObject javaxStatelessFo = cp.findResource(EJB_STATELESS.replace(".", "/") + ".class");
+ FileObject jakartaStatelessFo = cp.findResource(EJB_STATELESS_JAKARTA.replace(".", "/") + ".class");
+ return javaxStatelessFo != null || jakartaStatelessFo != null;
}
private static boolean isValidPackageName(String str) {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java
index fa47cd849830..7d6b1599861a 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java
@@ -75,6 +75,7 @@ public final class MdbWizard implements WizardDescriptor.InstantiatingIterator {
"jakarta.jakartaee-web-api-9.0.0", //NOI18N
"jakarta.jakartaee-web-api-9.1.0", //NOI18N
"jakarta.jakartaee-web-api-10.0.0", //NOI18N
+ "jakarta.jakartaee-web-api-11.0.0" //NOI18N
};
private static final String[] SESSION_STEPS = new String[]{
NbBundle.getMessage(MdbWizard.class, "LBL_SpecifyEJBInfo"), //NOI18N
@@ -89,6 +90,7 @@ public final class MdbWizard implements WizardDescriptor.InstantiatingIterator {
MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_9_FULL, "jakarta.jakartaee-api-9.0.0"); //NOI18N
MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_9_1_FULL, "jakarta.jakartaee-api-9.1.0"); //NOI18N
MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_10_FULL, "jakarta.jakartaee-api-10.0.0"); //NOI18N
+ MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_11_FULL, "jakarta.jakartaee-api-11.0.0"); //NOI18N
}
@Override
@@ -186,7 +188,9 @@ private boolean isJmsOnClasspath() throws IOException {
private Profile getTargetFullProfile() {
Profile profile = JavaEEProjectSettings.getProfile(Templates.getProject(wiz));
if (profile != null) {
- if (profile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) {
+ if (profile.isAtLeast(Profile.JAKARTA_EE_11_WEB)) {
+ return Profile.JAKARTA_EE_11_FULL;
+ } else if (profile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) {
return Profile.JAKARTA_EE_10_FULL;
} else if (profile.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)) {
return Profile.JAKARTA_EE_9_1_FULL;
@@ -217,7 +221,7 @@ private boolean removeWebApiJarsFromClasspath() throws IOException {
toRemove.add(library);
}
}
- return Utils.removeLibraryFromClasspath(Templates.getProject(wiz), toRemove.toArray(new Library[toRemove.size()]));
+ return Utils.removeLibraryFromClasspath(Templates.getProject(wiz), toRemove.toArray(new Library[0]));
}
private void enhanceProjectClasspath(Profile targetProfile) throws IOException {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MessageDestinationUiSupport.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MessageDestinationUiSupport.java
index bc3642ec5160..61db0f69f5af 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MessageDestinationUiSupport.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MessageDestinationUiSupport.java
@@ -121,7 +121,7 @@ public static void populateDestinations(final Set destinatio
comboBox.setRenderer(new MessageDestinationListCellRenderer());
List sortedDestinations = new ArrayList(destinations);
- Collections.sort(sortedDestinations, new MessageDestinationComparator());
+ sortedDestinations.sort(new MessageDestinationComparator());
comboBox.removeAllItems();
for (MessageDestination d : sortedDestinations) {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/SessionEJBWizardPanel.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/SessionEJBWizardPanel.java
index ff2bc2f95802..8e5c85c5727f 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/SessionEJBWizardPanel.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/SessionEJBWizardPanel.java
@@ -153,7 +153,7 @@ private void updateInProjectCombo(boolean show) {
inProjectCombo.setVisible(show);
if (show && projectsList == null) {
List projects = SessionEJBWizardPanel.getProjectsList(project);
- projectsList = new DefaultComboBoxModel(projects.toArray(new Project[projects.size()]));
+ projectsList = new DefaultComboBoxModel(projects.toArray(new Project[0]));
final ListCellRenderer defaultRenderer = inProjectCombo.getRenderer();
if (!projects.isEmpty()){
inProjectCombo.setRenderer(new ListCellRenderer() {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/TimerOptions.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/TimerOptions.java
index 6d1f2be0f578..b0a78c5a01da 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/TimerOptions.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/session/TimerOptions.java
@@ -116,7 +116,7 @@ private static String[] splitScheduleSections(String scheduleValue) {
if (!"".equals(sb.toString())) {
finalSections.add(sb.toString());
}
- return finalSections.toArray(new String[finalSections.size()]);
+ return finalSections.toArray(new String[0]);
}
private static int getCountOfQuotes(String string) {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AbstractAddMethodStrategy.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AbstractAddMethodStrategy.java
index 75a810fdd759..e04a4dc86a10 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AbstractAddMethodStrategy.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AbstractAddMethodStrategy.java
@@ -21,6 +21,7 @@
import java.io.IOException;
import javax.lang.model.element.TypeElement;
+import org.netbeans.api.java.classpath.ClassPath;
import org.netbeans.api.java.source.CompilationController;
import org.netbeans.api.java.source.ui.ScanDialog;
import org.netbeans.modules.j2ee.api.ejbjar.EjbJar;
@@ -49,7 +50,7 @@ public AbstractAddMethodStrategy(String name) {
this.name = name;
}
- protected abstract MethodModel getPrototypeMethod();
+ protected abstract MethodModel getPrototypeMethod(boolean jakartaVariant);
/** Describes method type handled by this action. */
public abstract MethodType.Kind getPrototypeMethodKind();
@@ -69,7 +70,14 @@ public void addMethod(final FileObject fileObject, final String className) throw
if (className == null) {
return;
}
- final MethodModel methodModel = getPrototypeMethod();
+
+ boolean jakartaVariant = true;
+ ClassPath cp = ClassPath.getClassPath(fileObject, ClassPath.COMPILE);
+ if (cp != null) {
+ jakartaVariant = cp.findResource("javax/ejb/Stateless.class") == null // NOI18N
+ || cp.findResource("jakarta/ejb/Stateless.class") != null; // NOI18N
+ }
+ final MethodModel methodModel = getPrototypeMethod(jakartaVariant);
ScanDialog.runWhenScanFinished(new Runnable() {
@Override
public void run() {
@@ -106,18 +114,16 @@ protected static MethodsNode getMethodsNode() {
* Gets whether the type of given {@code TypeElement} is Entity bean.
* @param compilationController compilationController
* @param typeElement examined element
- * @return {@code true} if the element is subtype of {@code javax.ejb.EntityBean}, {@code false} otherwise
+ * @return {@code true} if the element is subtype of {@code jakarta.ejb.EntityBean} or {@code javax.ejb.EntityBean}, {@code false} otherwise
*/
protected static boolean isEntity(CompilationController compilationController, TypeElement typeElement) {
Parameters.notNull("compilationController", compilationController);
Parameters.notNull("typeElement", typeElement);
TypeElement entity = compilationController.getElements().getTypeElement("javax.ejb.EntityBean");
- if (entity != null) {
- typeElement.getKind().getDeclaringClass().isAssignableFrom(entity.getKind().getDeclaringClass());
- return (compilationController.getTypes().isSubtype(typeElement.asType(), entity.asType()));
- }
- return false;
+ TypeElement entityJakarta = compilationController.getElements().getTypeElement("jakarta.ejb.EntityBean");
+ return (entity != null && (compilationController.getTypes().isSubtype(typeElement.asType(), entity.asType())))
+ || (entityJakarta != null && (compilationController.getTypes().isSubtype(typeElement.asType(), entityJakarta.asType())));
}
/**
@@ -134,12 +140,15 @@ protected static boolean isSession(CompilationController compilationController,
TypeElement stateless = compilationController.getElements().getTypeElement("javax.ejb.Stateless");
TypeElement stateful = compilationController.getElements().getTypeElement("javax.ejb.Stateful");
TypeElement singleton = compilationController.getElements().getTypeElement("javax.ejb.Singleton");
- if (stateful != null && stateless != null && singleton != null) {
- return (compilationController.getTypes().isSubtype(typeElement.asType(), stateless.asType())
- || compilationController.getTypes().isSubtype(typeElement.asType(), stateful.asType())
- || compilationController.getTypes().isSubtype(typeElement.asType(), singleton.asType()));
- }
- return false;
+ TypeElement statelessJakarta = compilationController.getElements().getTypeElement("jakarta.ejb.Stateless");
+ TypeElement statefulJakarta = compilationController.getElements().getTypeElement("jakarta.ejb.Stateful");
+ TypeElement singletonJakarta = compilationController.getElements().getTypeElement("jakarta.ejb.Singleton");
+ return (stateless != null && compilationController.getTypes().isSubtype(typeElement.asType(), stateless.asType()))
+ || (stateful != null && compilationController.getTypes().isSubtype(typeElement.asType(), stateful.asType()))
+ || (singleton != null && compilationController.getTypes().isSubtype(typeElement.asType(), singleton.asType()))
+ || (statelessJakarta != null && compilationController.getTypes().isSubtype(typeElement.asType(), statelessJakarta.asType()))
+ || (statefulJakarta != null && compilationController.getTypes().isSubtype(typeElement.asType(), statefulJakarta.asType()))
+ || (singletonJakarta != null && compilationController.getTypes().isSubtype(typeElement.asType(), singletonJakarta.asType()));
}
/**
@@ -153,10 +162,9 @@ protected static boolean isStateful(CompilationController compilationController,
Parameters.notNull("typeElement", typeElement);
TypeElement stateful = compilationController.getElements().getTypeElement("javax.ejb.Stateful");
- if (stateful != null) {
- return (compilationController.getTypes().isSubtype(typeElement.asType(), stateful.asType()));
- }
- return false;
+ TypeElement statefulJakarta = compilationController.getElements().getTypeElement("jakarta.ejb.Stateful");
+ return (stateful != null && compilationController.getTypes().isSubtype(typeElement.asType(), stateful.asType()))
+ || (statefulJakarta != null && compilationController.getTypes().isSubtype(typeElement.asType(), statefulJakarta.asType()));
}
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddBusinessMethodStrategy.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddBusinessMethodStrategy.java
index 9768b57269e4..a1c56997b439 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddBusinessMethodStrategy.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddBusinessMethodStrategy.java
@@ -65,7 +65,7 @@ public AddBusinessMethodStrategy() {
super(NbBundle.getMessage(AddBusinessMethodStrategy.class, "LBL_AddBusinessMethodAction"));
}
- protected MethodModel getPrototypeMethod() {
+ protected MethodModel getPrototypeMethod(boolean jakartaVariant) {
return MethodModel.create(
"businessMethod",
"void",
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddCreateMethodStrategy.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddCreateMethodStrategy.java
index 5ca03870f358..2e582dfbcee5 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddCreateMethodStrategy.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddCreateMethodStrategy.java
@@ -64,13 +64,13 @@ public AddCreateMethodStrategy() {
super(NbBundle.getMessage(AddCreateMethodStrategy.class, "LBL_AddCreateMethodAction"));
}
- protected MethodModel getPrototypeMethod() {
+ protected MethodModel getPrototypeMethod(boolean jakartaVariant) {
return MethodModel.create(
"create",
"void",
"",
Collections.emptyList(),
- Collections.singletonList("javax.ejb.CreateException"),
+ Collections.singletonList(jakartaVariant ? "jakarta.ejb.CreateException" : "javax.ejb.CreateException"),
Collections.emptySet()
);
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddFinderMethodStrategy.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddFinderMethodStrategy.java
index 28e67efd7b4a..2bfedd3b76a2 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddFinderMethodStrategy.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddFinderMethodStrategy.java
@@ -62,8 +62,8 @@ public AddFinderMethodStrategy () {
super (NbBundle.getMessage(AddFinderMethodStrategy.class, "LBL_AddFinderMethodAction"));
}
- protected MethodModel getPrototypeMethod() {
- return getFinderPrototypeMethod();
+ protected MethodModel getPrototypeMethod(boolean jakartaVariant) {
+ return getFinderPrototypeMethod(jakartaVariant);
}
protected MethodCustomizer createDialog(FileObject fileObject, final MethodModel methodModel) throws IOException {
@@ -127,13 +127,13 @@ public void run(CompilationController cc) throws Exception {
return isEntity.get();
}
- private static MethodModel getFinderPrototypeMethod() {
+ private static MethodModel getFinderPrototypeMethod(boolean jakartaVariant) {
return MethodModel.create(
"findBy",
"void",
"",
Collections.emptyList(),
- Collections.singletonList("javax.ejb.FinderException"),
+ Collections.singletonList(jakartaVariant ? "jakarta.ejb.FinderException" : "javax.ejb.FinderException"),
Collections.emptySet()
);
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddHomeMethodStrategy.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddHomeMethodStrategy.java
index a9f0edb03779..919dac90239a 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddHomeMethodStrategy.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddHomeMethodStrategy.java
@@ -63,7 +63,7 @@ public AddHomeMethodStrategy () {
super(NbBundle.getMessage(AddHomeMethodStrategy.class, "LBL_AddHomeMethodAction"));
}
- protected MethodModel getPrototypeMethod() {
+ protected MethodModel getPrototypeMethod(boolean jakartaVariant) {
return MethodModel.create(
"homeMethod",
"void",
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddSelectMethodStrategy.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddSelectMethodStrategy.java
index 26bfd414a3f0..bee3d175862b 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddSelectMethodStrategy.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/AddSelectMethodStrategy.java
@@ -65,14 +65,14 @@ public AddSelectMethodStrategy(String name) {
}
@Override
- public MethodModel getPrototypeMethod() {
+ public MethodModel getPrototypeMethod(boolean jakartaVariant) {
Set modifiers = EnumSet.of(Modifier.PUBLIC, Modifier.ABSTRACT);
return MethodModel.create(
"ejbSelectBy",
"int",
"",
Collections.emptyList(),
- Collections.singletonList("javax.ejb.FinderException"),
+ Collections.singletonList(jakartaVariant ? "jakarta.ejb.FinderException" : "javax.ejb.FinderException"),
modifiers
);
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/GoToSourceActionGroup.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/GoToSourceActionGroup.java
index 7916fada6c56..60171c3bf5a2 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/GoToSourceActionGroup.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/action/GoToSourceActionGroup.java
@@ -121,7 +121,7 @@ public Void run(EjbJarMetadata metadata) {
actions.add(new GoToSourceAction(results[LOCAL_HOME], NbBundle.getMessage(GoToSourceActionGroup.class, "LBL_GoTo_LocalHomeInterface")));
}
- return actions.toArray(new Action[actions.size()]);
+ return actions.toArray(new Action[0]);
}
public HelpCtx getHelpCtx() {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/session/SessionNode.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/session/SessionNode.java
index 613d7bbe129b..fad215c2e706 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/session/SessionNode.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/session/SessionNode.java
@@ -126,7 +126,7 @@ public Action[] getActions(boolean context) {
list.add(null);
list.add(SystemAction.get(GoToSourceActionGroup.class));
}
- return list.toArray(new SystemAction[list.size()]);
+ return list.toArray(new SystemAction[0]);
}
public HelpCtx getHelpCtx() {
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/ComponentMethodModel.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/ComponentMethodModel.java
index 02811af3e0fe..4f9be5145a1b 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/ComponentMethodModel.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/ComponentMethodModel.java
@@ -121,7 +121,8 @@ public boolean accept(Element e, TypeMirror type) {
TypeElement parent = elementUtilities.enclosingTypeElement(e);
boolean isInInterface = ElementKind.INTERFACE == parent.getKind();
boolean isFromJavaxEjb = parent.getQualifiedName().toString().startsWith("javax.ejb."); // NOI18N
- return isInInterface && !isFromJavaxEjb && ElementKind.METHOD == e.getKind();
+ boolean isFromJakartaEjb = parent.getQualifiedName().toString().startsWith("jakarta.ejb."); // NOI18N
+ return isInInterface && !isFromJavaxEjb && !isFromJakartaEjb && ElementKind.METHOD == e.getKind();
}
});
for (Element method : methods) {
@@ -164,7 +165,8 @@ public Boolean run(EjbJarMetadata metadata) throws Exception {
String ifaceFqn = typeMirror.toString();
if (!ifaceFqn.equals("java.io.Serializable") //NOI18N
&& !ifaceFqn.equals("java.io.Externalizable") //NOI18N
- && !ifaceFqn.startsWith("javax.ejb.")) { //NOI18N
+ && !ifaceFqn.startsWith("javax.ejb.") //NOI18N
+ && !ifaceFqn.startsWith("jakarta.ejb.")) { //NOI18N
return false;
}
}
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/MethodNode.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/MethodNode.java
index 70be43e2f927..c6d3464a6078 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/MethodNode.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/MethodNode.java
@@ -152,9 +152,13 @@ public void run(CompilationController controller) throws IOException {
controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);
Elements elements = controller.getElements();
TypeElement entityBean = elements.getTypeElement("javax.ejb.EntityBean"); // NOI18N
+ TypeElement entityBeanJakarta = elements.getTypeElement("jakarta.ejb.EntityBean"); // NOI18N
TypeElement implBeanElement = elements.getTypeElement(implBean);
if (implBeanElement != null && entityBean != null) {
- result[0] = controller.getTypes().isSubtype(implBeanElement.asType(), entityBean.asType());
+ result[0] |= controller.getTypes().isSubtype(implBeanElement.asType(), entityBean.asType());
+ }
+ if (implBeanElement != null && entityBeanJakarta != null) {
+ result[0] |= controller.getTypes().isSubtype(implBeanElement.asType(), entityBeanJakarta.asType());
}
}
}, true);
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/CallEjbDialog.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/CallEjbDialog.java
index a9119a06f490..fbc306876a58 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/CallEjbDialog.java
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/CallEjbDialog.java
@@ -78,7 +78,7 @@ public Action[] getActions(boolean context) {
}
Children.Array children = new Children.Array();
- children.add(ejbProjectNodes.toArray(new Node[ejbProjectNodes.size()]));
+ children.add(ejbProjectNodes.toArray(new Node[0]));
Node root = new AbstractNode(children);
root.setDisplayName(NbBundle.getMessage(CallEjbDialog.class, "LBL_EJBModules"));
EnterpriseReferenceContainer erc = enterpriseProject.getLookup().lookup(EnterpriseReferenceContainer.class);
diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/DataSourceReferencePanel.form b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/DataSourceReferencePanel.form
index 487b3e3897e4..42eda6660b68 100644
--- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/DataSourceReferencePanel.form
+++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entries/DataSourceReferencePanel.form
@@ -1,4 +1,4 @@
-
+
+
+ Builds, tests, and runs the project org.netbeans.modules.jakartaee11.api
+
+
diff --git a/enterprise/jakartaee11.api/external/binaries-list b/enterprise/jakartaee11.api/external/binaries-list
new file mode 100644
index 000000000000..52ecb1598e03
--- /dev/null
+++ b/enterprise/jakartaee11.api/external/binaries-list
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+3D3471C64C8500880D0C0C6DA265F19194CE8304 jakarta.platform:jakarta.jakartaee-api:11.0.0-M1
+F0117F7D79657E795020A64CE01359962452694A jakarta.platform:jakarta.jakartaee-web-api:11.0.0-M1
\ No newline at end of file
diff --git a/enterprise/jakartaee11.api/external/jakarta.jakartaee-api-11.0.0-license.txt b/enterprise/jakartaee11.api/external/jakarta.jakartaee-api-11.0.0-license.txt
new file mode 100644
index 000000000000..57178c4f03d3
--- /dev/null
+++ b/enterprise/jakartaee11.api/external/jakarta.jakartaee-api-11.0.0-license.txt
@@ -0,0 +1,93 @@
+Name: JakartaEE API 11.0.0
+Version: 11.0.0
+License: EPL-v20
+Description: JakartaEE API 11.0.0
+Origin: Eclipse Foundation (https://mvnrepository.com/artifact/jakarta.platform/jakarta.jakartaee-api/11.0.0-M1)
+Files: jakarta.jakartaee-api-11.0.0-M1.jar
+
+Eclipse Public License - v 2.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. Definitions
+“Contribution” means:
+
+a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.
+“Contributor” means any person or entity that Distributes the Program.
+
+“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+“Program” means the Contributions Distributed in accordance with this Agreement.
+
+“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.
+
+“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
+
+“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.
+
+“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.
+
+“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.
+
+2. Grant of Rights
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).
+
+3. Requirements
+3.1 If a Contributor Distributes the Program in any form, then:
+
+a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
+
+b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
+
+i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
+iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
+3.2 When the Program is Distributed as Source Code:
+
+a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
+b) a copy of this Agreement must be included with each copy of the Program.
+3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
+
+4. Commercial Distribution
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. No Warranty
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. Disclaimer of Liability
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. General
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.”
+
+Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.
+
+If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
+
+You may add additional accurate notices of copyright ownership.
diff --git a/enterprise/jakartaee11.api/external/jakarta.jakartaee-web-api-11.0.0-license.txt b/enterprise/jakartaee11.api/external/jakarta.jakartaee-web-api-11.0.0-license.txt
new file mode 100644
index 000000000000..62b3c3cee0b4
--- /dev/null
+++ b/enterprise/jakartaee11.api/external/jakarta.jakartaee-web-api-11.0.0-license.txt
@@ -0,0 +1,93 @@
+Name: JakartaEE Web API 11.0.0
+Version: 11.0.0
+License: EPL-v20
+Description: JakartaEE Web API 11.0.0
+Origin: Eclipse Foundation (https://mvnrepository.com/artifact/jakarta.platform/jakarta.jakartaee-web-api/11.0.0-M1)
+Files: jakarta.jakartaee-web-api-11.0.0-M1.jar
+
+Eclipse Public License - v 2.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. Definitions
+“Contribution” means:
+
+a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.
+“Contributor” means any person or entity that Distributes the Program.
+
+“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+“Program” means the Contributions Distributed in accordance with this Agreement.
+
+“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.
+
+“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
+
+“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.
+
+“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.
+
+“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.
+
+2. Grant of Rights
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).
+
+3. Requirements
+3.1 If a Contributor Distributes the Program in any form, then:
+
+a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
+
+b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
+
+i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
+iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
+3.2 When the Program is Distributed as Source Code:
+
+a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
+b) a copy of this Agreement must be included with each copy of the Program.
+3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
+
+4. Commercial Distribution
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. No Warranty
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. Disclaimer of Liability
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. General
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.”
+
+Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.
+
+If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
+
+You may add additional accurate notices of copyright ownership.
diff --git a/enterprise/jakartaee11.api/manifest.mf b/enterprise/jakartaee11.api/manifest.mf
new file mode 100644
index 000000000000..0eb45622633b
--- /dev/null
+++ b/enterprise/jakartaee11.api/manifest.mf
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: false
+OpenIDE-Module: org.netbeans.modules.jakartaee11.api
+OpenIDE-Module-Layer: org/netbeans/modules/jakartaee11/api/layer.xml
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee11/api/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.24
+OpenIDE-Module-Java-Dependencies: Java > 11
+OpenIDE-Module-Provides: jakartaee11.api
diff --git a/enterprise/jakartaee11.api/nbproject/project.properties b/enterprise/jakartaee11.api/nbproject/project.properties
new file mode 100644
index 000000000000..b5953f675824
--- /dev/null
+++ b/enterprise/jakartaee11.api/nbproject/project.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+is.autoload=true
+javac.source=1.8
+release.external/jakarta.jakartaee-api-11.0.0-M1.jar=modules/ext/jakarta.jakartaee-api-11.0.0.jar
+release.external/jakarta.jakartaee-web-api-11.0.0-M1.jar=modules/ext/jakarta.jakartaee-web-api-11.0.0.jar
diff --git a/enterprise/jakartaee11.api/nbproject/project.xml b/enterprise/jakartaee11.api/nbproject/project.xml
new file mode 100644
index 000000000000..c1991274e907
--- /dev/null
+++ b/enterprise/jakartaee11.api/nbproject/project.xml
@@ -0,0 +1,31 @@
+
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ org.netbeans.modules.jakartaee11.api
+
+
+
+
+
diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/Bundle.properties b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/Bundle.properties
new file mode 100644
index 000000000000..651b2584897b
--- /dev/null
+++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/Bundle.properties
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+OpenIDE-Module-Display-Category=Jakarta EE
+OpenIDE-Module-Long-Description=\
+ Library wrapper which provides JakartaEE 11 API (full API and web profile API)
+OpenIDE-Module-Name=Jakarta EE 11 API Library
+OpenIDE-Module-Short-Description=Jakarta EE 11 API Library
+
+#library display name
+jakartaee-api-11.0=Jakarta EE 11 API Library
+jakartaee-web-api-11.0=Jakarta EE Web 11 API Library
diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-api-11.0.xml b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-api-11.0.xml
new file mode 100644
index 000000000000..d148946875ba
--- /dev/null
+++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-api-11.0.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ jakartaee-api-11.0
+ j2se
+ org/netbeans/modules/jakartaee11/api/Bundle
+
+ classpath
+ jar:nbinst://org.netbeans.modules.jakartaee11.api/modules/ext/jakarta.jakartaee-api-11.0.0.jar!/
+
+
+ javadoc
+ jar:nbinst://org.netbeans.modules.jakartaee11.platform/docs/jakartaee11-doc-api.jar!/
+
+
+
+ maven-dependencies
+ jakarta.platform:jakarta.jakartaee-api:11.0.0-M1:jar
+
+
+
diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-web-api-11.0.xml b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-web-api-11.0.xml
new file mode 100644
index 000000000000..2d7da18fa36c
--- /dev/null
+++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-web-api-11.0.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ jakartaee-web-api-11.0
+ j2se
+ org/netbeans/modules/jakartaee11/api/Bundle
+
+ classpath
+ jar:nbinst://org.netbeans.modules.jakartaee11.api/modules/ext/jakarta.jakartaee-web-api-11.0.0.jar!/
+
+
+ javadoc
+ jar:nbinst://org.netbeans.modules.jakartaee11.platform/docs/jakartaee11-doc-api.jar!/
+
+
+
+ maven-dependencies
+ jakarta.platform:jakarta.jakartaee-web-api:11.0.0-M1:jar
+
+
+
diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/layer.xml b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/layer.xml
new file mode 100644
index 000000000000..10d26d377bab
--- /dev/null
+++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/layer.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/jakartaee11.platform/arch.xml b/enterprise/jakartaee11.platform/arch.xml
new file mode 100644
index 000000000000..067007a2456f
--- /dev/null
+++ b/enterprise/jakartaee11.platform/arch.xml
@@ -0,0 +1,908 @@
+
+
+
+]>
+
+
+
+ &api-questions;
+
+
+
+
+
+ This module is an empty module, it only contains javahelp documentation for jakartaee functionality.
+
+
+
+
diff --git a/enterprise/jakartaee11.platform/build.xml b/enterprise/jakartaee11.platform/build.xml
new file mode 100644
index 000000000000..57ecf544f309
--- /dev/null
+++ b/enterprise/jakartaee11.platform/build.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/enterprise/jakartaee11.platform/external/binaries-list b/enterprise/jakartaee11.platform/external/binaries-list
new file mode 100644
index 000000000000..5fbe81d7f9ea
--- /dev/null
+++ b/enterprise/jakartaee11.platform/external/binaries-list
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+4165DFDD7B817AF41113E8A5C5DB80A348DB21CA jakarta.platform:jakarta.jakartaee-api:11.0.0-M1:javadoc
diff --git a/enterprise/jakartaee11.platform/external/generated-jakarta.jakartaee-api-11.0.0-javadoc-license.txt b/enterprise/jakartaee11.platform/external/generated-jakarta.jakartaee-api-11.0.0-javadoc-license.txt
new file mode 100644
index 000000000000..5d03fc5d2739
--- /dev/null
+++ b/enterprise/jakartaee11.platform/external/generated-jakarta.jakartaee-api-11.0.0-javadoc-license.txt
@@ -0,0 +1,93 @@
+Name: JakartaEE API 11.0.0 Documentation
+Version: 11.0.0
+License: EPL-v20
+Description: JakartaEE API 11.0.0 Documentation
+Origin: Generated from jakarta.jakartaee-api-11.0.0-M1-javadoc.jar
+Type: generated
+
+Eclipse Public License - v 2.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. Definitions
+“Contribution” means:
+
+a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.
+“Contributor” means any person or entity that Distributes the Program.
+
+“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+“Program” means the Contributions Distributed in accordance with this Agreement.
+
+“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.
+
+“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
+
+“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.
+
+“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.
+
+“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.
+
+2. Grant of Rights
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).
+
+3. Requirements
+3.1 If a Contributor Distributes the Program in any form, then:
+
+a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
+
+b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
+
+i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
+iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
+3.2 When the Program is Distributed as Source Code:
+
+a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
+b) a copy of this Agreement must be included with each copy of the Program.
+3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
+
+4. Commercial Distribution
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. No Warranty
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. Disclaimer of Liability
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. General
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.”
+
+Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.
+
+If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
+
+You may add additional accurate notices of copyright ownership.
diff --git a/enterprise/jakartaee11.platform/external/jakarta.jakartaee-api-11.0.0-javadoc-license.txt b/enterprise/jakartaee11.platform/external/jakarta.jakartaee-api-11.0.0-javadoc-license.txt
new file mode 100644
index 000000000000..6c205499e823
--- /dev/null
+++ b/enterprise/jakartaee11.platform/external/jakarta.jakartaee-api-11.0.0-javadoc-license.txt
@@ -0,0 +1,93 @@
+Name: JakartaEE API 11.0.0 Documentation
+Version: 11.0.0
+License: EPL-v20
+Description: JakartaEE API 11.0.0 Documentation
+Origin: Eclipse Foundation (https://mvnrepository.com/artifact/jakarta.platform/jakarta.jakartaee-api/11.0.0-M1)
+Files: jakarta.jakartaee-api-11.0.0-M1-javadoc.jar
+
+Eclipse Public License - v 2.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. Definitions
+“Contribution” means:
+
+a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.
+“Contributor” means any person or entity that Distributes the Program.
+
+“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+“Program” means the Contributions Distributed in accordance with this Agreement.
+
+“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.
+
+“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
+
+“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.
+
+“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.
+
+“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.
+
+2. Grant of Rights
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).
+
+3. Requirements
+3.1 If a Contributor Distributes the Program in any form, then:
+
+a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
+
+b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
+
+i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
+iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
+3.2 When the Program is Distributed as Source Code:
+
+a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
+b) a copy of this Agreement must be included with each copy of the Program.
+3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
+
+4. Commercial Distribution
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. No Warranty
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. Disclaimer of Liability
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. General
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.”
+
+Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.
+
+If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
+
+You may add additional accurate notices of copyright ownership.
diff --git a/enterprise/jakartaee11.platform/manifest.mf b/enterprise/jakartaee11.platform/manifest.mf
new file mode 100644
index 000000000000..bd8cc2a4fcaa
--- /dev/null
+++ b/enterprise/jakartaee11.platform/manifest.mf
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.jakartaee11.platform/1
+OpenIDE-Module-Specification-Version: 1.24
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee11/platform/Bundle.properties
+AutoUpdate-Show-In-Client: false
+OpenIDE-Module-Java-Dependencies: Java > 11
+OpenIDE-Module-Provides: jakartaee11.platform
diff --git a/enterprise/jakartaee11.platform/nbproject/project.properties b/enterprise/jakartaee11.platform/nbproject/project.properties
new file mode 100644
index 000000000000..9888b7c58d0a
--- /dev/null
+++ b/enterprise/jakartaee11.platform/nbproject/project.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+is.autoload=true
+javac.compilerargs=-Xlint:all -Xlint:-serial
+javac.source=1.8
+release.external/generated-jakarta.jakartaee-api-11.0.0-javadoc.jar=docs/jakartaee11-doc-api.jar
+
+javadoc.arch=${basedir}/arch.xml
diff --git a/enterprise/jakartaee11.platform/nbproject/project.xml b/enterprise/jakartaee11.platform/nbproject/project.xml
new file mode 100644
index 000000000000..dedfb5387837
--- /dev/null
+++ b/enterprise/jakartaee11.platform/nbproject/project.xml
@@ -0,0 +1,32 @@
+
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ org.netbeans.modules.jakartaee11.platform
+
+
+
+
+
+
diff --git a/enterprise/jakartaee11.platform/src/org/netbeans/modules/jakartaee11/platform/Bundle.properties b/enterprise/jakartaee11.platform/src/org/netbeans/modules/jakartaee11/platform/Bundle.properties
new file mode 100644
index 000000000000..2824262415fd
--- /dev/null
+++ b/enterprise/jakartaee11.platform/src/org/netbeans/modules/jakartaee11/platform/Bundle.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# module description
+OpenIDE-Module-Name=Jakarta EE 11 Documentation
+OpenIDE-Module-Display-Category=Jakarta EE
+OpenIDE-Module-Short-Description=Jakarta EE 11 Documentation
+OpenIDE-Module-Long-Description=\
+ Documentation for the NetBeans Jakarta EE 11 support and Jakarta EE 11 Javadoc
diff --git a/enterprise/jakartaee8.api/manifest.mf b/enterprise/jakartaee8.api/manifest.mf
index 9f524eb40f46..401e2977680e 100644
--- a/enterprise/jakartaee8.api/manifest.mf
+++ b/enterprise/jakartaee8.api/manifest.mf
@@ -3,4 +3,4 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.jakartaee8.api
OpenIDE-Module-Layer: org/netbeans/modules/jakartaee8/api/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee8/api/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.24
+OpenIDE-Module-Specification-Version: 1.26
diff --git a/enterprise/jakartaee8.platform/manifest.mf b/enterprise/jakartaee8.platform/manifest.mf
index 9bc722834215..f9a02e4a98f8 100644
--- a/enterprise/jakartaee8.platform/manifest.mf
+++ b/enterprise/jakartaee8.platform/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.jakartaee8.platform/1
-OpenIDE-Module-Specification-Version: 1.24
+OpenIDE-Module-Specification-Version: 1.26
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee8/platform/Bundle.properties
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/jakartaee9.api/manifest.mf b/enterprise/jakartaee9.api/manifest.mf
index 95f85350b7e7..1c6ffa565695 100644
--- a/enterprise/jakartaee9.api/manifest.mf
+++ b/enterprise/jakartaee9.api/manifest.mf
@@ -3,4 +3,4 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.jakartaee9.api
OpenIDE-Module-Layer: org/netbeans/modules/jakartaee9/api/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee9/api/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.23
+OpenIDE-Module-Specification-Version: 1.25
diff --git a/enterprise/jakartaee9.platform/manifest.mf b/enterprise/jakartaee9.platform/manifest.mf
index 7f1890ca00dd..0b4465385092 100644
--- a/enterprise/jakartaee9.platform/manifest.mf
+++ b/enterprise/jakartaee9.platform/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.jakartaee9.platform/1
-OpenIDE-Module-Specification-Version: 1.23
+OpenIDE-Module-Specification-Version: 1.25
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee9/platform/Bundle.properties
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/javaee.api/manifest.mf b/enterprise/javaee.api/manifest.mf
index 7b8fdadbbfc7..5d54cb8b7514 100644
--- a/enterprise/javaee.api/manifest.mf
+++ b/enterprise/javaee.api/manifest.mf
@@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.javaee.api
OpenIDE-Module-Layer: org/netbeans/modules/javaee/api/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javaee/api/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.43
+OpenIDE-Module-Specification-Version: 1.45
diff --git a/enterprise/javaee.beanvalidation/manifest.mf b/enterprise/javaee.beanvalidation/manifest.mf
index 7b9f7350128c..ebac9270e182 100644
--- a/enterprise/javaee.beanvalidation/manifest.mf
+++ b/enterprise/javaee.beanvalidation/manifest.mf
@@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.javaee.beanvalidation
OpenIDE-Module-Layer: org/netbeans/modules/javaee/beanvalidation/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javaee/beanvalidation/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.42
+OpenIDE-Module-Specification-Version: 1.44
diff --git a/enterprise/javaee.project/manifest.mf b/enterprise/javaee.project/manifest.mf
index dfc1537e766a..d7d36456bacc 100644
--- a/enterprise/javaee.project/manifest.mf
+++ b/enterprise/javaee.project/manifest.mf
@@ -2,6 +2,6 @@ Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.javaee.project
OpenIDE-Module-Layer: org/netbeans/modules/javaee/project/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javaee/project/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.42
+OpenIDE-Module-Specification-Version: 1.44
AutoUpdate-Show-In-Client: false
diff --git a/enterprise/javaee.project/nbproject/org-netbeans-modules-javaee-project.sig b/enterprise/javaee.project/nbproject/org-netbeans-modules-javaee-project.sig
index a5c056fcb90c..76e32640352a 100644
--- a/enterprise/javaee.project/nbproject/org-netbeans-modules-javaee-project.sig
+++ b/enterprise/javaee.project/nbproject/org-netbeans-modules-javaee-project.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.41
+#Version 1.42
CLSS public abstract interface java.awt.event.ActionListener
intf java.util.EventListener
diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java
index 66626693e292..cd26eaec77aa 100644
--- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java
+++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java
@@ -20,7 +20,6 @@
package org.netbeans.modules.javaee.project.api;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -72,7 +71,7 @@ public List getSupportedProviders() {
return findPersistenceProviders(null);
}
}
-
+
private List findPersistenceProviders(J2eePlatform platform) {
final List providers = new ArrayList();
boolean lessEE7 = true;//we may not know platform
@@ -80,13 +79,13 @@ private List findPersistenceProviders(J2eePlatform platform) {
final Map jpaProviderMap = createProviderMap(platform);
boolean defaultFound = false; // see issue #225071
-
- lessEE7 = !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_10_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_10_FULL)
- && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_1_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_1_FULL)
- && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_FULL)
- && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_8_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_8_FULL)
- && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_8_WEB) && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_8_FULL)
- && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_7_WEB) && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_7_FULL);//we know gf4 do not support old providers, #233726
+ for (Profile profile: platform.getSupportedProfiles()) {
+ if (profile.isAtLeast(Profile.JAVA_EE_7_WEB)) {
+ lessEE7 = false; //we know gf4 do not support old providers, #233726
+ break;
+ }
+ }
+
// Here we are mapping the JpaProvider to the correct Provider
for (Provider provider : ProviderUtil.getAllProviders()) {
@@ -95,6 +94,7 @@ private List findPersistenceProviders(J2eePlatform platform) {
if (jpa != null) {
String version = ProviderUtil.getVersion(provider);
if (version == null
+ || (version.equals(Persistence.VERSION_3_2) && jpa.isJpa32Supported())
|| (version.equals(Persistence.VERSION_3_1) && jpa.isJpa31Supported())
|| (version.equals(Persistence.VERSION_3_0) && jpa.isJpa30Supported())
|| (version.equals(Persistence.VERSION_2_2) && jpa.isJpa22Supported())
@@ -123,11 +123,13 @@ private List findPersistenceProviders(J2eePlatform platform) {
}
if (!found){
String version = ProviderUtil.getVersion(each);
+ // we know gf4 do not support old providers, #233726, todo, we need to get supported from gf plugin instead
if(lessEE7 || version == null
|| version.equals(Persistence.VERSION_2_1)
|| version.equals(Persistence.VERSION_2_2)
|| version.equals(Persistence.VERSION_3_0)
- || version.equals(Persistence.VERSION_3_1)) {//we know gf4 do not support old providers, #233726, todo, we need to get supported from gf plugin instead
+ || version.equals(Persistence.VERSION_3_1)
+ || version.equals(Persistence.VERSION_3_2)) {
providers.add(each);
}
}
diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/J2EEProjectProperties.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/J2EEProjectProperties.java
index eddb92fd5695..1315cffc3659 100644
--- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/J2EEProjectProperties.java
+++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/J2EEProjectProperties.java
@@ -514,7 +514,7 @@ private static String toClasspathString(URL[] classpathEntries, MapNote: JDK 11 will be used for Jakarta EE 9.1 an
MSG_RecommendationSetSourceLevel11=Note: Source Level 11 will be set for Jakarta EE 9.1 and Jakarta EE 10 project.
MSG_RecommendationJDK11=Recommendation: JDK 11 should be used for Jakarta EE 9.1 and Jakarta EE 10 projects.
+MSG_RecommendationSetJdk21=Note: JDK 21 will be used for Jakarta EE 11 projects.
+MSG_RecommendationSetSourceLevel21=Note: Source Level 21 will be set for Jakarta EE 11 project.
+MSG_RecommendationJDK21=Recommendation: JDK 21 should be used for Jakarta EE 11 projects.
+
#Import wizard - existing sources
LBL_IW_ImportTitle=Add Existing Sources
LBL_IW_LocationSrcDesc=Select the folder that contains all the sources for your application.
diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java
index eb71051e61c4..8ed5611bc056 100644
--- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java
+++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java
@@ -42,17 +42,20 @@ final class J2eeVersionWarningPanel extends javax.swing.JPanel {
public static final String WARN_SET_JDK_7 = "warnSetJdk7"; // NOI18N
public static final String WARN_SET_JDK_8 = "warnSetJdk8"; // NOI18N
public static final String WARN_SET_JDK_11 = "warnSetJdk11"; // NOI18N
+ public static final String WARN_SET_JDK_21 = "warnSetJdk21"; // NOI18N
public static final String WARN_SET_SOURCE_LEVEL_15 = "warnSetSourceLevel15"; // NOI18N
public static final String WARN_SET_SOURCE_LEVEL_6 = "warnSetSourceLevel6"; // NOI18N
public static final String WARN_SET_SOURCE_LEVEL_7 = "warnSetSourceLevel7"; // NOI18N
public static final String WARN_SET_SOURCE_LEVEL_8 = "warnSetSourceLevel8"; // NOI18N
public static final String WARN_SET_SOURCE_LEVEL_11 = "warnSetSourceLevel11"; // NOI18N
+ public static final String WARN_SET_SOURCE_LEVEL_21 = "warnSetSourceLevel21"; // NOI18N
public static final String WARN_JDK_6_REQUIRED = "warnJdk6Required"; // NOI18N
public static final String WARN_JDK_7_REQUIRED = "warnJdk7Required"; // NOI18N
public static final String WARN_JDK_8_REQUIRED = "warnJdk8Required"; // NOI18N
public static final String WARN_JDK_11_REQUIRED = "warnJdk11Required"; // NOI18N
+ public static final String WARN_JDK_21_REQUIRED = "warnJdk21Required"; // NOI18N
private String warningType;
@@ -85,6 +88,9 @@ public void setWarningType(String warningType) {
case WARN_SET_JDK_11:
labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetJdk11");
break;
+ case WARN_SET_JDK_21:
+ labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetJdk21");
+ break;
case WARN_SET_SOURCE_LEVEL_15:
labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetSourceLevel15");
break;
@@ -100,6 +106,9 @@ public void setWarningType(String warningType) {
case WARN_SET_SOURCE_LEVEL_11:
labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetSourceLevel11");
break;
+ case WARN_SET_SOURCE_LEVEL_21:
+ labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetSourceLevel21");
+ break;
case WARN_JDK_6_REQUIRED:
labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationJDK6");
break;
@@ -112,6 +121,9 @@ public void setWarningType(String warningType) {
case WARN_JDK_11_REQUIRED:
labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationJDK11");
break;
+ case WARN_JDK_21_REQUIRED:
+ labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationJDK21");
+ break;
default:
break;
}
@@ -145,6 +157,10 @@ public String getSuggestedJavaPlatformName() {
JavaPlatform[] javaPlatforms = getJavaPlatforms("11");
return getPreferredPlatform(javaPlatforms).getDisplayName();
}
+ case WARN_SET_JDK_21: {
+ JavaPlatform[] javaPlatforms = getJavaPlatforms("21");
+ return getPreferredPlatform(javaPlatforms).getDisplayName();
+ }
default:
return JavaPlatform.getDefault().getDisplayName();
}
@@ -177,6 +193,10 @@ public Specification getSuggestedJavaPlatformSpecification() {
JavaPlatform[] javaPlatforms = getJavaPlatforms("11");
return getPreferredPlatform(javaPlatforms).getSpecification();
}
+ case WARN_SET_JDK_21: {
+ JavaPlatform[] javaPlatforms = getJavaPlatforms("21");
+ return getPreferredPlatform(javaPlatforms).getSpecification();
+ }
default:
return JavaPlatform.getDefault().getSpecification();
}
@@ -241,6 +261,12 @@ public static String findWarningType(Profile j2eeProfile, Set acceptableSourceLe
return null;
}
+ // no warning if 21 is the default for jakartaee11
+ if ((j2eeProfile == Profile.JAKARTA_EE_11_FULL || j2eeProfile == Profile.JAKARTA_EE_11_WEB) &&
+ isAcceptableSourceLevel("21", sourceLevel, acceptableSourceLevels)) { // NOI18N
+ return null;
+ }
+
if (j2eeProfile == Profile.JAVA_EE_5) {
JavaPlatform[] java15Platforms = getJavaPlatforms("1.5"); //NOI18N
if (java15Platforms.length > 0) {
@@ -295,6 +321,17 @@ public static String findWarningType(Profile j2eeProfile, Set acceptableSourceLe
return WARN_JDK_11_REQUIRED;
}
}
+ } else if (j2eeProfile == Profile.JAKARTA_EE_11_FULL || j2eeProfile == Profile.JAKARTA_EE_11_WEB) {
+ JavaPlatform[] java21Platforms = getJavaPlatforms("21"); //NOI18N
+ if (java21Platforms.length > 0) {
+ return WARN_SET_JDK_21;
+ } else {
+ if (canSetSourceLevel("21")) {
+ return WARN_SET_SOURCE_LEVEL_21;
+ } else {
+ return WARN_JDK_21_REQUIRED;
+ }
+ }
} else {
return null;
}
diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java
index 971bd510a141..bcfbf5dd9f7a 100644
--- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java
+++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java
@@ -426,23 +426,17 @@ private void serverInstanceComboBoxActionPerformed(java.awt.event.ActionEvent ev
Set profiles = new TreeSet<>(Profile.UI_COMPARATOR);
profiles.addAll(j2eePlatform.getSupportedProfiles(j2eeModuleType));
for (Profile profile : profiles) {
- // j2ee 1.3 and 1.4 is not supported anymore
+ // j2ee 1.3 and 1.4 are not supported anymore
if (Profile.J2EE_13.equals(profile) || Profile.J2EE_14.equals(profile)) {
continue;
}
if (j2eeModuleType == J2eeModule.Type.WAR) {
- if (Profile.JAVA_EE_6_FULL.equals(profile) || Profile.JAVA_EE_7_FULL.equals(profile)
- || Profile.JAVA_EE_8_FULL.equals(profile) || Profile.JAKARTA_EE_8_FULL.equals(profile)
- || Profile.JAKARTA_EE_9_FULL.equals(profile) || Profile.JAKARTA_EE_9_1_FULL.equals(profile)
- || Profile.JAKARTA_EE_10_FULL.equals(profile)) {
+ if (profile.isFullProfile() && profile.isAtLeast(Profile.JAVA_EE_6_FULL)) {
// for web apps always offer only JAVA_EE_6_WEB profile and skip full one
continue;
}
} else {
- if (Profile.JAVA_EE_6_WEB.equals(profile) || Profile.JAVA_EE_7_WEB.equals(profile)
- || Profile.JAVA_EE_8_WEB.equals(profile) || Profile.JAKARTA_EE_8_WEB.equals(profile)
- || Profile.JAKARTA_EE_9_WEB.equals(profile) || Profile.JAKARTA_EE_9_1_WEB.equals(profile)
- || Profile.JAKARTA_EE_10_WEB.equals(profile)) {
+ if (profile.isWebProfile() && profile.isAtLeast(Profile.JAVA_EE_6_WEB)) {
// for EE apps always skip web profile
continue;
}
@@ -617,7 +611,9 @@ private String getSourceLevel(WizardDescriptor d, String serverInstanceId, Profi
Set jdks = j2eePlatform.getSupportedJavaPlatformVersions();
// make sure that chosen source level is suported by server:
if (jdks != null && !jdks.contains(sourceLevel)) { // workaround for #212146 when jdks == null
- if ("11".equals(sourceLevel) && jdks.contains("1.8")) {
+ if ("21".equals(sourceLevel) && jdks.contains("11")) {
+ sourceLevel = "11";
+ } else if ("11".equals(sourceLevel) && jdks.contains("1.8")) {
sourceLevel = "1.8";
} else if ("1.8".equals(sourceLevel) && jdks.contains("1.7")) {
sourceLevel = "1.7";
@@ -638,6 +634,9 @@ private String getSourceLevel(WizardDescriptor d, String serverInstanceId, Profi
String warningType = warningPanel.getWarningType();
if (warningType != null) {
switch (warningType) {
+ case J2eeVersionWarningPanel.WARN_SET_SOURCE_LEVEL_21:
+ sourceLevel = "21"; //NOI18N
+ break;
case J2eeVersionWarningPanel.WARN_SET_SOURCE_LEVEL_11:
sourceLevel = "11"; //NOI18N
break;
@@ -987,6 +986,8 @@ private void checkACXmlJ2eeVersion(FileObject appClientXML) {
j2eeSpecComboBox.setSelectedItem(new ProfileItem(Profile.JAKARTA_EE_9_FULL));
} else if(new BigDecimal(org.netbeans.modules.j2ee.dd.api.client.AppClient.VERSION_10_0).equals(version)) {
j2eeSpecComboBox.setSelectedItem(new ProfileItem(Profile.JAKARTA_EE_10_FULL));
+ } else if(new BigDecimal(org.netbeans.modules.j2ee.dd.api.client.AppClient.VERSION_11_0).equals(version)) {
+ j2eeSpecComboBox.setSelectedItem(new ProfileItem(Profile.JAKARTA_EE_11_FULL));
}
} catch (IOException e) {
String message = NbBundle.getMessage(ProjectServerPanel.class, "MSG_AppClientXmlCorrupted"); // NOI18N
diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ui/utils/J2eePlatformUiSupport.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ui/utils/J2eePlatformUiSupport.java
index f015653a7cb7..16b429fb3b53 100644
--- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ui/utils/J2eePlatformUiSupport.java
+++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ui/utils/J2eePlatformUiSupport.java
@@ -132,7 +132,7 @@ private synchronized J2eePlatformAdapter[] getJ2eePlatforms(J2eeModule.Type modu
}
}
}
- j2eePlatforms = orderedNames.toArray(new J2eePlatformAdapter[orderedNames.size()]);
+ j2eePlatforms = orderedNames.toArray(new J2eePlatformAdapter[0]);
}
return j2eePlatforms;
}
@@ -187,7 +187,7 @@ public J2eeSpecVersionComboBoxModel(Profile j2eeProfile) {
orderedListItems.add(0, new J2eePlatformComboBoxItem(Profile.J2EE_13));
}
- j2eeSpecVersions = orderedListItems.toArray(new J2eePlatformComboBoxItem[orderedListItems.size()]);
+ j2eeSpecVersions = orderedListItems.toArray(new J2eePlatformComboBoxItem[0]);
selectedJ2eeSpecVersion = initialJ2eeSpecVersion;
}
diff --git a/enterprise/javaee.resources/manifest.mf b/enterprise/javaee.resources/manifest.mf
index 52b93c16ab89..75449bc30e29 100644
--- a/enterprise/javaee.resources/manifest.mf
+++ b/enterprise/javaee.resources/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.javaee.resources
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javaee/resources/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.33
+OpenIDE-Module-Specification-Version: 1.35
diff --git a/enterprise/javaee.resources/nbproject/org-netbeans-modules-javaee-resources.sig b/enterprise/javaee.resources/nbproject/org-netbeans-modules-javaee-resources.sig
index 84884095f99a..8e80fc9ecafb 100644
--- a/enterprise/javaee.resources/nbproject/org-netbeans-modules-javaee-resources.sig
+++ b/enterprise/javaee.resources/nbproject/org-netbeans-modules-javaee-resources.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.32
+#Version 1.33
CLSS public abstract interface java.io.Serializable
diff --git a/enterprise/javaee.specs.support/manifest.mf b/enterprise/javaee.specs.support/manifest.mf
index 1ac654973ea6..d79222ae578f 100644
--- a/enterprise/javaee.specs.support/manifest.mf
+++ b/enterprise/javaee.specs.support/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.javaee.specs.support/0
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javaee/specs/support/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.48
+OpenIDE-Module-Specification-Version: 1.50
diff --git a/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig b/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig
index 9515932eabf9..405c0ac97d7a 100644
--- a/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig
+++ b/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig
@@ -1,5 +1,5 @@
#Signature file v4.1
-#Version 1.47
+#Version 1.49
CLSS public abstract interface java.io.Serializable
@@ -169,6 +169,7 @@ meth public boolean isJpa22Supported()
meth public boolean isJpa2Supported()
meth public boolean isJpa30Supported()
meth public boolean isJpa31Supported()
+meth public boolean isJpa32Supported()
meth public java.lang.String getClassName()
supr java.lang.Object
hfds impl
@@ -221,7 +222,7 @@ meth public abstract java.lang.String activationConfigProperty()
CLSS public final org.netbeans.modules.javaee.specs.support.spi.JpaProviderFactory
cons public init()
innr public abstract static Accessor
-meth public static org.netbeans.modules.javaee.specs.support.api.JpaProvider createJpaProvider(java.lang.String,boolean,boolean,boolean,boolean,boolean,boolean,boolean)
+meth public static org.netbeans.modules.javaee.specs.support.api.JpaProvider createJpaProvider(java.lang.String,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean)
meth public static org.netbeans.modules.javaee.specs.support.api.JpaProvider createJpaProvider(org.netbeans.modules.javaee.specs.support.spi.JpaProviderImplementation)
supr java.lang.Object
@@ -242,6 +243,7 @@ meth public abstract boolean isJpa22Supported()
meth public abstract boolean isJpa2Supported()
meth public abstract boolean isJpa30Supported()
meth public abstract boolean isJpa31Supported()
+meth public abstract boolean isJpa32Supported()
meth public abstract java.lang.String getClassName()
CLSS public abstract interface org.netbeans.modules.javaee.specs.support.spi.JpaSupportImplementation
diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java
index 46e2fe616625..b2b37eaf8238 100644
--- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java
+++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java
@@ -66,6 +66,10 @@ public boolean isJpa30Supported() {
public boolean isJpa31Supported() {
return impl.isJpa31Supported();
}
+
+ public boolean isJpa32Supported() {
+ return impl.isJpa32Supported();
+ }
public boolean isDefault() {
return impl.isDefault();
diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java
index d2b6ad9a7f62..5cabb0e6bcea 100644
--- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java
+++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java
@@ -69,30 +69,41 @@ public Set getProviders() {
|| platform.isToolSupported(JPAModuleInfo.JPAVERSIONPREFIX + Persistence.VERSION_3_0);
boolean jpa31 = !check
|| platform.isToolSupported(JPAModuleInfo.JPAVERSIONPREFIX + Persistence.VERSION_3_1);
+ boolean jpa32 = !check
+ || platform.isToolSupported(JPAModuleInfo.JPAVERSIONPREFIX + Persistence.VERSION_3_2);
for (Map.Entry entry : getPossibleContainerProviders().entrySet()) {
Provider provider = entry.getKey();
if (platform.isToolSupported(provider.getProviderClass())) {
JpaProvider jpaProvider = JpaProviderFactory.createJpaProvider(
- provider.getProviderClass(), platform.isToolSupported(entry.getValue()), jpa1, jpa2, jpa21, jpa22, jpa30, jpa31);
+ provider.getProviderClass(),
+ platform.isToolSupported(entry.getValue()),
+ jpa1, jpa2, jpa21, jpa22, jpa30, jpa31, jpa32);
result.add(jpaProvider);
}
}
return result;
}
+ // TODO: Add missing JPA 3.x providers
private static Map getPossibleContainerProviders() {
- Map candidates = new HashMap();
+ Map candidates = new HashMap<>();
candidates.put(ProviderUtil.HIBERNATE_PROVIDER1_0, "hibernatePersistenceProviderIsDefault1.0"); // NOI18N
candidates.put(ProviderUtil.HIBERNATE_PROVIDER2_0, "hibernatePersistenceProviderIsDefault2.0"); // NOI18N
candidates.put(ProviderUtil.HIBERNATE_PROVIDER2_1, "hibernatePersistenceProviderIsDefault2.1"); // NOI18N
candidates.put(ProviderUtil.HIBERNATE_PROVIDER2_2, "hibernatePersistenceProviderIsDefault2.2"); // NOI18N
+ candidates.put(ProviderUtil.HIBERNATE_PROVIDER3_0, "hibernatePersistenceProviderIsDefault3.0"); // NOI18N
+ candidates.put(ProviderUtil.HIBERNATE_PROVIDER3_1, "hibernatePersistenceProviderIsDefault3.1"); // NOI18N
+ candidates.put(ProviderUtil.HIBERNATE_PROVIDER3_2, "hibernatePersistenceProviderIsDefault3.2"); // NOI18N
candidates.put(ProviderUtil.TOPLINK_PROVIDER1_0, "toplinkPersistenceProviderIsDefault"); // NOI18N
candidates.put(ProviderUtil.KODO_PROVIDER, "kodoPersistenceProviderIsDefault"); // NOI18N
- candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_2, "dataNucleusPersistenceProviderIsDefault2.2"); // NOI18N
- candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_1, "dataNucleusPersistenceProviderIsDefault2.1"); // NOI18N
- candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_0, "dataNucleusPersistenceProviderIsDefault2.0"); // NOI18N
candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER1_0, "dataNucleusPersistenceProviderIsDefault1.0"); // NOI18N
+ candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_0, "dataNucleusPersistenceProviderIsDefault2.0"); // NOI18N
+ candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_1, "dataNucleusPersistenceProviderIsDefault2.1"); // NOI18N
+ candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_2, "dataNucleusPersistenceProviderIsDefault2.2"); // NOI18N
+ candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER3_0, "dataNucleusPersistenceProviderIsDefault3.0"); // NOI18N
+ candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER3_1, "dataNucleusPersistenceProviderIsDefault3.1"); // NOI18N
+ candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER3_2, "dataNucleusPersistenceProviderIsDefault3.2"); // NOI18N
candidates.put(ProviderUtil.OPENJPA_PROVIDER1_0, "openJpaPersistenceProviderIsDefault1.0"); // NOI18N
candidates.put(ProviderUtil.OPENJPA_PROVIDER2_0, "openJpaPersistenceProviderIsDefault2.0"); // NOI18N
candidates.put(ProviderUtil.OPENJPA_PROVIDER2_1, "openJpaPersistenceProviderIsDefault2.1"); // NOI18N
@@ -103,6 +114,7 @@ private static Map getPossibleContainerProviders() {
candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER2_2, "eclipseLinkPersistenceProviderIsDefault2.2"); // NOI18N
candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER3_0, "eclipseLinkPersistenceProviderIsDefault3.0"); // NOI18N
candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER3_1, "eclipseLinkPersistenceProviderIsDefault3.1"); // NOI18N
+ candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER3_2, "eclipseLinkPersistenceProviderIsDefault3.2"); // NOI18N
return candidates;
}
}
diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/IdeJaxRsSupportImpl.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/IdeJaxRsSupportImpl.java
index 460a8a5fdb78..2461b70905fe 100644
--- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/IdeJaxRsSupportImpl.java
+++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/IdeJaxRsSupportImpl.java
@@ -23,11 +23,9 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.netbeans.api.j2ee.core.Profile;
import org.netbeans.api.java.classpath.ClassPath;
import org.netbeans.api.java.project.JavaProjectConstants;
import org.netbeans.api.java.project.classpath.ProjectClassPathModifier;
@@ -103,8 +101,7 @@ public void removeJaxRsLibraries( Project project ) {
String[] classPathTypes = new String[]{ ClassPath.COMPILE , ClassPath.EXECUTE };
for (String type : classPathTypes) {
try {
- ProjectClassPathModifier.removeLibraries(libraries.toArray(
- new Library[ libraries.size()]), sourceRoot, type);
+ ProjectClassPathModifier.removeLibraries(libraries.toArray(new Library[0]), sourceRoot, type);
}
catch(UnsupportedOperationException ex) {
Logger.getLogger( IdeJaxRsSupportImpl.class.getName() ).log(
diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java
index fa139fb5912f..4610185dcd34 100644
--- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java
+++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java
@@ -33,7 +33,8 @@ public static JpaProvider createJpaProvider(JpaProviderImplementation impl) {
public static JpaProvider createJpaProvider(final String className, final boolean isDefault,
final boolean isJpa1Supported, final boolean isJpa2Supported, final boolean isJpa21Supported,
- final boolean isJpa22Supported, final boolean isJpa30Supported, final boolean isJpa31Supported) {
+ final boolean isJpa22Supported, final boolean isJpa30Supported, final boolean isJpa31Supported,
+ final boolean isJpa32Supported) {
return Accessor.getDefault().createJpaProvider(new JpaProviderImplementation() {
@Override
@@ -66,6 +67,11 @@ public boolean isJpa31Supported() {
return isJpa31Supported;
}
+ @Override
+ public boolean isJpa32Supported() {
+ return isJpa32Supported;
+ }
+
@Override
public boolean isDefault() {
return isDefault;
diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java
index ddb0cdb6086f..87208738f972 100644
--- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java
+++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java
@@ -36,6 +36,8 @@ public interface JpaProviderImplementation {
boolean isJpa31Supported();
+ boolean isJpa32Supported();
+
boolean isDefault();
String getClassName();
diff --git a/enterprise/javaee.wildfly/manifest.mf b/enterprise/javaee.wildfly/manifest.mf
index 8318ac44a1eb..58ceea6df0be 100644
--- a/enterprise/javaee.wildfly/manifest.mf
+++ b/enterprise/javaee.wildfly/manifest.mf
@@ -4,4 +4,4 @@ OpenIDE-Module: org.netbeans.modules.javaee.wildfly/1
OpenIDE-Module-Layer: org/netbeans/modules/javaee/wildfly/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javaee/wildfly/resources/Bundle.properties
OpenIDE-Module-Provides: org.netbeans.modules.serverplugins.javaee
-OpenIDE-Module-Specification-Version: 2.15
+OpenIDE-Module-Specification-Version: 2.17
diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyDeploymentManager.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyDeploymentManager.java
index 5cac76b37c54..9236f6f52881 100644
--- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyDeploymentManager.java
+++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyDeploymentManager.java
@@ -23,11 +23,11 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import java.util.Locale;
+import java.util.Map;
import java.util.WeakHashMap;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.enterprise.deploy.model.DeployableObject;
@@ -83,8 +83,8 @@ public class WildflyDeploymentManager implements DeploymentManager2 {
* server instance bcs instance properties are also removed along with
* instance.
*/
- private static final ConcurrentMap PROPERTIES_TO_IS_RUNNING
- = new ConcurrentHashMap(new WeakHashMap());
+ private static final Map PROPERTIES_TO_IS_RUNNING
+ = Collections.synchronizedMap(new WeakHashMap());
private final DeploymentFactory df;
@@ -233,7 +233,7 @@ public TargetModuleID[] getRunningModules(ModuleType mt, Target[] targets) throw
LOGGER.log(Level.INFO, null, ex);
return new TargetModuleID[]{};
}
- return result.toArray(new TargetModuleID[result.size()]);
+ return result.toArray(new TargetModuleID[0]);
}
@Override
@@ -274,7 +274,7 @@ public TargetModuleID[] getAvailableModules(ModuleType mt, Target[] targets) thr
LOGGER.log(Level.INFO, null, ex);
return new TargetModuleID[]{};
}
- return result.toArray(new TargetModuleID[result.size()]);
+ return result.toArray(new TargetModuleID[0]);
}
@Override
diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyTargetModuleID.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyTargetModuleID.java
index d03ae2304c53..c883952bcccc 100644
--- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyTargetModuleID.java
+++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/WildflyTargetModuleID.java
@@ -112,7 +112,7 @@ public void addChild(WildflyTargetModuleID child) {
@Override
public TargetModuleID[] getChildTargetModuleID() {
- return (TargetModuleID[]) childs.toArray(new TargetModuleID[childs.size()]);
+ return (TargetModuleID[]) childs.toArray(new TargetModuleID[0]);
}
//Retrieve a list of identifiers of the children of this deployed module.
diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java
index fdd0cf2b9777..863f9166545a 100644
--- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java
+++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java
@@ -38,7 +38,7 @@ public JpaSupportImpl(WildflyJ2eePlatformFactory.J2eePlatformImplImpl platformIm
@Override
public JpaProvider getDefaultProvider() {
String defaultProvider = platformImpl.getDefaultJpaProvider();
- return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, true, true, true, true, true);
+ return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, true, true, true, true, true, true);
}
@Override
@@ -47,13 +47,16 @@ public Set getProviders() {
boolean jpa2 = true;
Set providers = new HashSet();
if (platformImpl.containsPersistenceProvider(WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER)) {
- providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER, WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, true, true, true, true));
+ providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER,
+ WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, true, true, true, true, true));
}
if (platformImpl.containsPersistenceProvider(WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER)) {
- providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER, WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false));
+ providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER,
+ WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false));
}
if (platformImpl.containsPersistenceProvider(WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER)) {
- providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER, WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false));
+ providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER,
+ WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false));
}
return providers;
}
diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java
index c2bef086c7fe..be40e1ece72e 100644
--- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java
+++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java
@@ -72,7 +72,7 @@ public class WildflyJ2eePlatformFactory extends J2eePlatformFactory {
static final String KODO_JPA_PROVIDER = "kodo.persistence.PersistenceProviderImpl";
- private static final WeakHashMap instanceCache = new WeakHashMap();
+ private static final WeakHashMap instanceCache = new WeakHashMap<>();
@Override
public synchronized J2eePlatformImpl getJ2eePlatformImpl(DeploymentManager dm) {
@@ -91,7 +91,7 @@ public synchronized J2eePlatformImpl getJ2eePlatformImpl(DeploymentManager dm) {
public static class J2eePlatformImplImpl extends J2eePlatformImpl2 {
- private static final Set MODULE_TYPES = new HashSet(8);
+ private static final Set MODULE_TYPES = new HashSet<>(8);
static {
MODULE_TYPES.add(Type.EAR);
@@ -101,7 +101,7 @@ public static class J2eePlatformImplImpl extends J2eePlatformImpl2 {
MODULE_TYPES.add(Type.CAR);
}
- private static final Set WILDFLY_PROFILES = new HashSet(16);
+ private static final Set WILDFLY_PROFILES = new HashSet<>(16);
static {
WILDFLY_PROFILES.add(Profile.JAVA_EE_6_WEB);
@@ -112,21 +112,22 @@ public static class J2eePlatformImplImpl extends J2eePlatformImpl2 {
WILDFLY_PROFILES.add(Profile.JAVA_EE_8_FULL);
WILDFLY_PROFILES.add(Profile.JAKARTA_EE_8_FULL);
}
- private static final Set JAKARTAEE_FULL_PROFILES = new HashSet(8);
+ private static final Set JAKARTAEE_FULL_PROFILES = new HashSet<>(8);
static {
JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_9_FULL);
JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_9_1_FULL);
JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_10_FULL);
+ JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_11_FULL);
}
- private static final Set EAP6_PROFILES = new HashSet(4);
+ private static final Set EAP6_PROFILES = new HashSet<>(4);
static {
EAP6_PROFILES.add(Profile.JAVA_EE_6_WEB);
EAP6_PROFILES.add(Profile.JAVA_EE_6_FULL);
}
- private static final Set WILDFLY_WEB_PROFILES = new HashSet(16);
+ private static final Set WILDFLY_WEB_PROFILES = new HashSet<>(16);
static {
WILDFLY_WEB_PROFILES.add(Profile.JAVA_EE_6_WEB);
@@ -136,14 +137,16 @@ public static class J2eePlatformImplImpl extends J2eePlatformImpl2 {
WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_9_WEB);
WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_9_1_WEB);
WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_10_WEB);
+ WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_11_WEB);
}
- private static final Set JAKARTAEE_WEB_PROFILES = new HashSet(8);
+ private static final Set JAKARTAEE_WEB_PROFILES = new HashSet<>(8);
static {
JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_9_WEB);
JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_9_1_WEB);
JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_10_WEB);
+ JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_11_WEB);
}
private LibraryImplementation[] libraries;
@@ -189,7 +192,7 @@ public Set getSupportedTypes() {
@Override
public Set getSupportedJavaPlatformVersions() {
- Set versions = new HashSet();
+ Set versions = new HashSet<>();
versions.add("1.7"); // NOI18N
versions.add("1.8"); // NOI18N
versions.add("1.8"); // NOI18N
@@ -334,21 +337,13 @@ String getDefaultJpaProvider() {
}
private boolean containsJaxWsLibraries() {
- File[] jaxWsAPILib = new File(properties.getModulePath("org/jboss/ws/api/main")).listFiles(new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- return name.startsWith("jbossws-api") && name.endsWith("jar");
- }
- }); // NOI18N
+ File[] jaxWsAPILib = new File(properties.getModulePath("org/jboss/ws/api/main")) // NOI18N
+ .listFiles((File dir, String name) -> name.startsWith("jbossws-api") && name.endsWith("jar")); // NOI18N
if (jaxWsAPILib != null && jaxWsAPILib.length == 1 && jaxWsAPILib[0].exists()) {
return true;
}
- jaxWsAPILib = new File(properties.getModulePath("javax/xml/ws/api/main")).listFiles(new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- return name.startsWith("jboss-jaxws-api") && name.endsWith("jar");
- }
- }); // NOI18N
+ jaxWsAPILib = new File(properties.getModulePath("javax/xml/ws/api/main")) // NOI18N
+ .listFiles((File dir, String name) -> name.startsWith("jboss-jaxws-api") && name.endsWith("jar")); // NOI18N
if (jaxWsAPILib != null && jaxWsAPILib.length == 1 && jaxWsAPILib[0].exists()) {
return true;
}
@@ -385,6 +380,7 @@ private static boolean containsService(LibraryImplementation library, String ser
return false;
}
+ @SuppressWarnings("NestedAssignment")
private static boolean containsService(FileObject serviceFO, String serviceName, String serviceImplName) {
try (BufferedReader br = new BufferedReader(new InputStreamReader(serviceFO.getInputStream()))) {
String line;
@@ -522,7 +518,7 @@ public Lookup getLookup() {
private class JaxRsStackSupportImpl implements JaxRsStackSupportImplementation {
private static final String JAX_RS_APPLICATION_CLASS = "javax.ws.rs.core.Application"; //NOI18N
- private J2eePlatformImplImpl j2eePlatform;
+ private final J2eePlatformImplImpl j2eePlatform;
JaxRsStackSupportImpl(J2eePlatformImplImpl j2eePlatform) {
this.j2eePlatform = j2eePlatform;
diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java
index 58d9ea5d67b3..de4dc79037d1 100644
--- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java
+++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java
@@ -27,6 +27,7 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -452,11 +453,11 @@ String getRunFileName() {
boolean needChangeConf = matcherConf != null && matcherConf.matches();
try {
if (needChangeRun || needChangeConf) {
- File startBat = File.createTempFile(RUN_FILE_NAME, ".bat"); // NOI18N
+ File startBat = Files.createTempFile(RUN_FILE_NAME, ".bat").toFile(); // NOI18N
File confBat = null;
if (contentConf != null) {
- confBat = File.createTempFile(CONF_FILE_NAME, ".bat", // NOI18N
- startBat.getParentFile()); // NOI18N
+ confBat = Files.createTempFile(// NOI18N
+ startBat.getParentFile().toPath(), CONF_FILE_NAME, ".bat").toFile(); // NOI18N
}
startBat.deleteOnExit();
contentRun = replaceJavaOpts(contentRun, matcherRun);
diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/commands/WildflyClient.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/commands/WildflyClient.java
index c963e52d921d..9bd8eb9665f2 100644
--- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/commands/WildflyClient.java
+++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/commands/WildflyClient.java
@@ -205,7 +205,7 @@ private String resolvePath(WildflyClassLoader cl, LinkedHashMap