-
Notifications
You must be signed in to change notification settings - Fork 380
Add Java 21 compile time support #1275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
0a00dc5
a16e822
70538db
efe09b5
49dc772
78dd5d4
5df8155
a6d4f93
231d3a4
71d68b0
a5f388e
c6adad3
b631d7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| org.wso2.carbon.registry.app.PropertyExtensionFactory |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| <!-- | ||
| ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
| ~ | ||
| ~ WSO2 Inc. 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. | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
|
||
| <modelVersion>4.0.0</modelVersion> | ||
| <groupId>org.apache.abdera.wso2</groupId> | ||
| <artifactId>abdera-jdk21</artifactId> | ||
| <packaging>bundle</packaging> | ||
| <name>abdera.wso2</name> | ||
| <version>1.0.0.wso2v1</version> | ||
| <description> | ||
| org.wso2.carbon.abdera. This bundle will represent abdera | ||
| </description> | ||
| <url>http://wso2.org</url> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.apache.abdera</groupId> | ||
| <artifactId>abdera-client</artifactId> | ||
| <version>${version.abdera}</version> | ||
| <optional>true</optional> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.abdera</groupId> | ||
| <artifactId>abdera-core</artifactId> | ||
| <version>${version.abdera}</version> | ||
| <optional>true</optional> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.abdera</groupId> | ||
| <artifactId>abdera-parser</artifactId> | ||
| <version>${version.abdera}</version> | ||
| <optional>true</optional> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.abdera</groupId> | ||
| <artifactId>abdera-server</artifactId> | ||
| <version>${version.abdera}</version> | ||
| <optional>true</optional> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.abdera</groupId> | ||
| <artifactId>abdera-i18n</artifactId> | ||
| <version>${version.abdera}</version> | ||
| <optional>true</optional> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.felix</groupId> | ||
| <artifactId>maven-bundle-plugin</artifactId> | ||
| <version>${maven.bundle.plugin.version}</version> | ||
| <extensions>true</extensions> | ||
| <configuration> | ||
| <instructions> | ||
| <Bundle-Name>${project.artifactId}</Bundle-Name> | ||
| <Bundle-Vendor>WSO2 Inc</Bundle-Vendor> | ||
| <Bundle-Description>${project.description}</Bundle-Description> | ||
| <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
| <Export-Package> | ||
| org.apache.abdera.*;version="${project.version}" | ||
| </Export-Package> | ||
| <Import-Package> | ||
| !org.apache.abdera.*, | ||
| javax.xml.stream.*; version="1.0.1", | ||
| javax.activation.*; version="[0.0.0,2.0.0)", | ||
| *;resolution:=optional | ||
| </Import-Package> | ||
| <Include-Resource> | ||
| META-INF/services/org.apache.abdera.factory.ExtensionFactory=META-INF/services/org.apache.abdera.factory.ExtensionFactory, | ||
| @abdera-core-${version.abdera}.jar!/META-INF/services/org.apache.abdera.factory.ExtensionFactory.example, | ||
| @abdera-core-${version.abdera}.jar!/abderamessages.properties, | ||
| @abdera-parser-${version.abdera}.jar!/META-INF/services/org.apache.abdera.writer.NamedWriter | ||
| </Include-Resource> | ||
| <DynamicImport-Package>*</DynamicImport-Package> | ||
| <Embed-Dependency> | ||
| abdera-client|abdera-core|abdera-parser|abdera-server|abdera-i18n;scope=compile|runtime;inline=true | ||
| </Embed-Dependency> | ||
| </instructions> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| <properties> | ||
| <version.abdera>1.0-wso2v2</version.abdera> | ||
| <maven.bundle.plugin.version>5.1.9</maven.bundle.plugin.version> | ||
| </properties> | ||
|
|
||
| <repositories> | ||
| <repository> | ||
| <id>wso2-nexus</id> | ||
| <name>WSO2 internal Repository</name> | ||
| <url>https://maven.wso2.org/nexus/content/groups/wso2-public/</url> | ||
| <releases> | ||
| <enabled>true</enabled> | ||
| <updatePolicy>daily</updatePolicy> | ||
| <checksumPolicy>ignore</checksumPolicy> | ||
| </releases> | ||
| </repository> | ||
| </repositories> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- | ||
| ~ Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). | ||
| ~ | ||
| ~ WSO2 LLC. 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. | ||
| --> | ||
|
|
||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
|
||
| <modelVersion>4.0.0</modelVersion> | ||
| <groupId>org.wso2.orbit.org.bouncycastle</groupId> | ||
| <artifactId>bcpg-jdk18on</artifactId> | ||
| <packaging>bundle</packaging> | ||
| <name>bcpg</name> | ||
| <version>1.83.0.wso2v1</version> | ||
| <description> | ||
| This bundle will represent bouncycastle 1.83 | ||
| </description> | ||
| <url>http://wso2.org</url> | ||
|
|
||
| <distributionManagement> | ||
| <repository> | ||
| <id>wso2.releases</id> | ||
| <name>WSO2 internal Repository</name> | ||
| <url>https://maven.wso2.org/nexus/content/repositories/releases/</url> | ||
| </repository> | ||
|
|
||
| <snapshotRepository> | ||
| <id>wso2.snapshots</id> | ||
| <name>Apache Snapshot Repository</name> | ||
| <url>https://maven.wso2.org/nexus/content/repositories/snapshots/</url> | ||
| </snapshotRepository> | ||
| </distributionManagement> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.bouncycastle</groupId> | ||
| <artifactId>bcpg-jdk18on</artifactId> | ||
| <version>${version.bcpg}</version> | ||
| <!-- By setting optional false, dependent projects of this orbit bundle will be able to see bcpg-jdk18on | ||
| library as a transitive dependency. This is required because we are embedding bcpg-jdk18on library inside | ||
| this orbit bundle without extracting the content, because bcpg-jdk18on library is signed. If you embed a | ||
| dependency and set optional to true, then dependent projects will not be able to compile their source with | ||
| this orbit bundle.--> | ||
| <optional>false</optional> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.felix</groupId> | ||
| <artifactId>maven-bundle-plugin</artifactId> | ||
| <version>3.5.0</version> | ||
| <extensions>true</extensions> | ||
|
Comment on lines
+65
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
Recommendation: Upgrade the Felix Maven Bundle Plugin to a much newer line (Central shows versions up to 6.0.0, published 2024-11-25) to pick up a newer bndlib with support for modern Java classfile versions. [4] Sources
🌐 Web query:
💡 Result: Minimum org.apache.felix:maven-bundle-plugin version to use for Java 21 projects: 6.0.0 (released 2024-11-25). It upgrades the embedded bndlib from 6.3.1 → 7.0.0 [2] and the plugin itself requires JDK 17+ to run (so it runs fine on JDK 21) [1]. bnd 7.0.0 is the major line that moved to Java 17+ and added/expanded modern-JDK handling (for example multi-release JAR support) [3]. Sources: Citations:
🌐 Web query:
💡 Result: Maven Bundle Plugin (org.apache.felix:maven-bundle-plugin) — release notes / changelog + Java 21 angleWhere to read the upstream changelog (release notes):
Key recent release relevant to Java 21 builds/runs:
Why that matters for Java 21:
Related note (release notes completeness):
Practical takeaway for “Java 21”
Sources: Upgrade maven-bundle-plugin 3.5.0 — does not support Java 21 classfiles. The bundled bndlib 3.5.0 cannot parse Java 21's class file major version 65. Upgrade to 6.0.0 or later, which embeds bndlib 7.0.0 with proper Java 21 bytecode support. 🤖 Prompt for AI Agents |
||
| <configuration> | ||
| <instructions> | ||
| <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
| <Bundle-Name>${project.artifactId}</Bundle-Name> | ||
| <Import-Package> | ||
| !org.bouncycastle.* | ||
| </Import-Package> | ||
| <Export-Package> | ||
| org.bouncycastle.*;version="${exp.pkg.version.bcpg}" | ||
| </Export-Package> | ||
| <Embed-Dependency>bcpg-jdk18on;scope=compile|runtime;inline=false</Embed-Dependency> | ||
| <DynamicImport-Package>*</DynamicImport-Package> | ||
| </instructions> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| <properties> | ||
| <exp.pkg.version.bcpg>1.83.0</exp.pkg.version.bcpg> | ||
| <version.bcpg>1.83</version.bcpg> | ||
| </properties> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,129 @@ | ||||||||||||||
| <?xml version="1.0" encoding="utf-8"?> | ||||||||||||||
| <!-- | ||||||||||||||
| ~ Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). | ||||||||||||||
| ~ | ||||||||||||||
| ~ WSO2 LLC. 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. | ||||||||||||||
| --> | ||||||||||||||
|
|
||||||||||||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||||||||||||||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||||||||||||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||||||||||||||
|
|
||||||||||||||
| <modelVersion>4.0.0</modelVersion> | ||||||||||||||
| <groupId>org.wso2.orbit.org.bouncycastle</groupId> | ||||||||||||||
| <artifactId>bctls-jdk18on</artifactId> | ||||||||||||||
| <packaging>bundle</packaging> | ||||||||||||||
| <name>bctls</name> | ||||||||||||||
| <version>1.83.0.wso2v1</version> | ||||||||||||||
| <description> | ||||||||||||||
| This bundle will represent bouncycastle TLS 1.80 | ||||||||||||||
| </description> | ||||||||||||||
|
Comment on lines
+30
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix incorrect version in description. The description states "TLS 1.80" but the bundle version is 1.83.0. This appears to be a copy-paste error from a previous version. 📝 Proposed fix <description>
- This bundle will represent bouncycastle TLS 1.80
+ This bundle will represent bouncycastle TLS 1.83
</description>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| <url>http://wso2.org</url> | ||||||||||||||
|
|
||||||||||||||
| <distributionManagement> | ||||||||||||||
| <repository> | ||||||||||||||
| <id>wso2.releases</id> | ||||||||||||||
| <name>WSO2 internal Repository</name> | ||||||||||||||
| <url>https://maven.wso2.org/nexus/content/repositories/releases/</url> | ||||||||||||||
| </repository> | ||||||||||||||
|
|
||||||||||||||
| <snapshotRepository> | ||||||||||||||
| <id>wso2.snapshots</id> | ||||||||||||||
| <name>Apache Snapshot Repository</name> | ||||||||||||||
| <url>https://maven.wso2.org/nexus/content/repositories/snapshots/</url> | ||||||||||||||
| </snapshotRepository> | ||||||||||||||
| </distributionManagement> | ||||||||||||||
|
|
||||||||||||||
| <dependencies> | ||||||||||||||
| <dependency> | ||||||||||||||
| <groupId>org.bouncycastle</groupId> | ||||||||||||||
| <artifactId>bctls-jdk18on</artifactId> | ||||||||||||||
| <version>${version.bc}</version> | ||||||||||||||
| <!-- By setting optional false, dependent projects of this orbit bundle will be able to see bcutil-jdk18on | ||||||||||||||
| library as a transitive dependency. This is required because we are embedding bcutil-jdk18on library inside | ||||||||||||||
| this orbit bundle without extracting the content, because bcutil-jdk18on library is signed. If you embed a | ||||||||||||||
| dependency and set optional to true, then dependent projects will not be able to compile their source with | ||||||||||||||
| this orbit bundle.--> | ||||||||||||||
| <optional>false</optional> | ||||||||||||||
| </dependency> | ||||||||||||||
| <dependency> | ||||||||||||||
| <groupId>org.bouncycastle</groupId> | ||||||||||||||
| <artifactId>bcutil-jdk18on</artifactId> | ||||||||||||||
| <version>${version.bc}</version> | ||||||||||||||
| <!-- By setting optional false, dependent projects of this orbit bundle will be able to see bcutil-jdk18on | ||||||||||||||
| library as a transitive dependency. This is required because we are embedding bcutil-jdk18on library inside | ||||||||||||||
| this orbit bundle without extracting the content, because bcutil-jdk18on library is signed. If you embed a | ||||||||||||||
| dependency and set optional to true, then dependent projects will not be able to compile their source | ||||||||||||||
| with this orbit bundle.--> | ||||||||||||||
| <optional>false</optional> | ||||||||||||||
| </dependency> | ||||||||||||||
| </dependencies> | ||||||||||||||
|
|
||||||||||||||
| <build> | ||||||||||||||
| <plugins> | ||||||||||||||
| <plugin> | ||||||||||||||
| <groupId>org.apache.felix</groupId> | ||||||||||||||
| <artifactId>maven-bundle-plugin</artifactId> | ||||||||||||||
| <version>3.5.0</version> | ||||||||||||||
| <extensions>true</extensions> | ||||||||||||||
| <configuration> | ||||||||||||||
| <instructions> | ||||||||||||||
| <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||||||||||||||
| <Bundle-Name>${project.artifactId}</Bundle-Name> | ||||||||||||||
| <Import-Package> | ||||||||||||||
| org.bouncycastle.util*;version="${imp.pkg.version.range}", | ||||||||||||||
| org.bouncycastle.pqc.*;version="${imp.pkg.version.range}", | ||||||||||||||
| org.bouncycastle.math.*;version="${imp.pkg.version.range}", | ||||||||||||||
| org.bouncycastle.jce.*;version="${imp.pkg.version.range}", | ||||||||||||||
| org.bouncycastle.jcajce.*;version="${imp.pkg.version.range}", | ||||||||||||||
| org.bouncycastle.asn1.*;version="${imp.pkg.version.range}", | ||||||||||||||
| org.bouncycastle.crypto.*;version="${imp.pkg.version.range}", | ||||||||||||||
| *;resolution:=optional | ||||||||||||||
| </Import-Package> | ||||||||||||||
| <Export-Package> | ||||||||||||||
| org.bouncycastle.jsse;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.jsse.java.security;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.jsse.provider;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.jsse.util;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.tls;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.tls.crypto;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.tls.crypto.impl;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.tls.crypto.impl.bc;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.tls.crypto.impl.jcajce;version="${exp.pkg.version.bctls}", | ||||||||||||||
| org.bouncycastle.tls.crypto.impl.jcajce.srp;version="${exp.pkg.version.bctls}", | ||||||||||||||
| !org.bouncycastle.util, | ||||||||||||||
| !org.bouncycastle.pqc, | ||||||||||||||
| !org.bouncycastle.math, | ||||||||||||||
| !org.bouncycastle.jce, | ||||||||||||||
| !org.bouncycastle.jcajce, | ||||||||||||||
| !org.bouncycastle.crypto, | ||||||||||||||
| !org.bouncycastle.asn1 | ||||||||||||||
| </Export-Package> | ||||||||||||||
| <Embed-Dependency> | ||||||||||||||
| bctls-jdk18on;scope=compile|runtime;inline=false, | ||||||||||||||
| bcutil-jdk18on;scope=compile|runtime;inline=false | ||||||||||||||
| </Embed-Dependency> | ||||||||||||||
| </instructions> | ||||||||||||||
| </configuration> | ||||||||||||||
| </plugin> | ||||||||||||||
| </plugins> | ||||||||||||||
| </build> | ||||||||||||||
|
|
||||||||||||||
| <properties> | ||||||||||||||
| <exp.pkg.version.bctls>1.83.0</exp.pkg.version.bctls> | ||||||||||||||
| <imp.pkg.version.range>[1.83.0, 2.0.0)</imp.pkg.version.range> | ||||||||||||||
| <version.bc>1.83</version.bc> | ||||||||||||||
| </properties> | ||||||||||||||
| </project> | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security concern:
checksumPolicyset toignore.Setting
checksumPolicytoignorebypasses checksum verification for downloaded artifacts, which could allow corrupted or tampered artifacts to be used. Consider usingwarnorfailinstead to maintain artifact integrity verification.Proposed fix
<releases> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> - <checksumPolicy>ignore</checksumPolicy> + <checksumPolicy>warn</checksumPolicy> </releases>🤖 Prompt for AI Agents