Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 48 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:

jobs:
build:
name: build (${{ matrix.os }})
name: build (${{ matrix.os }}, jdk ${{ matrix.java }})

permissions:
contents: read
Expand All @@ -36,29 +36,47 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, windows-latest, macos-latest ]
java: [ '21' ]
# An early-access JDK on Linux only, and only on main. The runner image ships Maven 3.9.x,
# so the Maven 4 this entry asks for is installed by the "Set up Maven" step below.
include: ${{ github.ref == 'refs/heads/main' && fromJSON('[{"os":"ubuntu-26.04","java":"25","maven":"4.0.0-rc-6"}]') || fromJSON('[]') }}

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up JDK 17
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v6
with:
java-version: '17'
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Set up Maven ${{ matrix.maven }}
if: matrix.maven
env:
MAVEN_VERSION: ${{ matrix.maven }}
run: |
url="https://archive.apache.org/dist/maven/maven-4/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"
curl -fsSL -o "${RUNNER_TEMP}/maven.tar.gz" "${url}"
echo "$(curl -fsSL "${url}.sha512") ${RUNNER_TEMP}/maven.tar.gz" | sha512sum -c -
tar -xzf "${RUNNER_TEMP}/maven.tar.gz" -C "${RUNNER_TEMP}"
# fails the step if the layout is not what we expect, rather than silently keeping Maven 3
"${RUNNER_TEMP}/apache-maven-${MAVEN_VERSION}/bin/mvn" -v
echo "${RUNNER_TEMP}/apache-maven-${MAVEN_VERSION}/bin" >> "${GITHUB_PATH}"
- name: Build
run: mvn -U -B -e clean install -Prat -DskipTests "-Dinvoker.skip=true"
run: |
mvn --version
mvn -U -B -e clean install -Prat -DskipTests "-Dinvoker.skip=true"
- name: Save Maven Local Repository
uses: actions/upload-artifact@v7
with:
name: maven-local-repo-${{ matrix.os }}
name: maven-local-repo-${{ matrix.os }}-jdk${{ matrix.java }}
path: ~/.m2/repository
retention-days: 1

test:
name: test (${{ matrix.os }})
name: test (${{ matrix.os }}, jdk ${{ matrix.java }})
needs: build

permissions:
Expand All @@ -68,34 +86,52 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, windows-latest, macos-latest ]
java: [ '21' ]
# An early-access JDK on Linux only, and only on main. The runner image ships Maven 3.9.x,
# so the Maven 4 this entry asks for is installed by the "Set up Maven" step below.
include: ${{ github.ref == 'refs/heads/main' && fromJSON('[{"os":"ubuntu-26.04","java":"25","maven":"4.0.0-rc-6"}]') || fromJSON('[]') }}

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up JDK 17
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v6
with:
java-version: '17'
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Restore Maven Local Repository
uses: actions/download-artifact@v8
with:
name: maven-local-repo-${{ matrix.os }}
name: maven-local-repo-${{ matrix.os }}-jdk${{ matrix.java }}
path: ~/.m2/repository
- name: Set up Maven ${{ matrix.maven }}
if: matrix.maven
env:
MAVEN_VERSION: ${{ matrix.maven }}
run: |
url="https://archive.apache.org/dist/maven/maven-4/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"
curl -fsSL -o "${RUNNER_TEMP}/maven.tar.gz" "${url}"
echo "$(curl -fsSL "${url}.sha512") ${RUNNER_TEMP}/maven.tar.gz" | sha512sum -c -
tar -xzf "${RUNNER_TEMP}/maven.tar.gz" -C "${RUNNER_TEMP}"
# fails the step if the layout is not what we expect, rather than silently keeping Maven 3
"${RUNNER_TEMP}/apache-maven-${MAVEN_VERSION}/bin/mvn" -v
echo "${RUNNER_TEMP}/apache-maven-${MAVEN_VERSION}/bin" >> "${GITHUB_PATH}"
- name: Test
run: mvn -B -e install -Ptest
run: |
mvn --version
mvn -B -e install -Ptest
timeout-minutes: 180
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}
name: test-results-${{ matrix.os }}-jdk${{ matrix.java }}
path: '**/target/surefire-reports/*.xml'
- name: Upload Event File
if: always()
if: always() && matrix.java == '21'
uses: actions/upload-artifact@v7
with:
name: event-file-${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

## Initial Setup

1. Install J2SE 11 SDK (or later)
1. Install J2SE 21 SDK (or later)

2. Make sure that your JAVA_HOME environment variable is set to the newly installed
JDK location, and that your PATH includes `%JAVA_HOME%\bin` (windows) or
`$JAVA_HOME$/bin` (unix).

3. Install Maven 3.8.0 (or later), which can be downloaded from
3. Install Maven 3.8.8 (or later), which can be downloaded from
http://maven.apache.org/download.html. Make sure that your PATH includes
the `$MVN_HOME/bin` directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<!-- minimal distribution -->
<!--<feature>minimal</feature>-->
</bootFeatures>
<javase>17</javase>
<javase>^javaVersion^</javase>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>21</release>
<source>21</source>
<target>21</target>
<maxmem>256M</maxmem>
</configuration>
</plugin>
Expand Down
5 changes: 3 additions & 2 deletions archetypes/bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>21</release>
<source>21</source>
<target>21</target>
<maxmem>256M</maxmem>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>21</release>
<source>21</source>
<target>21</target>
<maxmem>256M</maxmem>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
<inherited>true</inherited>
<version>3.15.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>21</release>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion assemblies/apache-karaf-light/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
</bootFeatures>
<libraries>
</libraries>
<javase>17</javase>
<javase>${javaVersion}</javase>
<generateConsistencyReport>${project.build.directory}</generateConsistencyReport>
<consistencyReportProjectName>Apache Karaf Light</consistencyReportProjectName>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion assemblies/apache-karaf-minimal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
!org.apache.karaf.command.acl.*,
*
</pidsToExtract>
<javase>17</javase>
<javase>${javaVersion}</javase>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion assemblies/apache-karaf-mix/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
</bootFeatures>
<libraries>
</libraries>
<javase>17</javase>
<javase>${javaVersion}</javase>
<generateConsistencyReport>${project.build.directory}</generateConsistencyReport>
<consistencyReportProjectName>Apache Karaf Mix</consistencyReportProjectName>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion assemblies/apache-karaf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
</bootFeatures>
<libraries>
</libraries>
<javase>17</javase>
<javase>${javaVersion}</javase>
<generateConsistencyReport>${project.build.directory}</generateConsistencyReport>
<consistencyReportProjectName>Apache Karaf (full)</consistencyReportProjectName>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,6 @@ setupVendorSepcifics() {
setupDefaults() {
DEFAULT_JAVA_OPTS="-XX:+UnlockDiagnosticVMOptions "

if [ "${VERSION}" -gt "11" ]; then
# TODO revisit EventAdminImpl to avoid use of Subject.getSubject(AccessController.getContext());
# -Djava.security.manager=allow is a workaround for SecurityController deprecation in JDK23+
DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -Djava.security.manager=allow "
fi

setupVendorSepcifics

DEFAULT_JAVA_OPTS="${DEFAULT_JAVA_OPTS} ${JAVA_VENDOR_OPTS}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@ if not exist "%JAVA_HOME%\bin\server\jvm.dll" (
)
set DEFAULT_JAVA_OPTS=-XX:+UnlockDiagnosticVMOptions

if "%JAVA_VERSION%" GTR 11 (
set DEFAULT_JAVA_OPTS=%DEFAULT_JAVA_OPTS% -Djava.security.manager=allow
)

if "%JAVA_OPTS%" == "" set JAVA_OPTS=%DEFAULT_JAVA_OPTS%

if "%EXTRA_JAVA_OPTS%" == "" goto :KARAF_EXTRA_JAVA_OPTS_END
Expand Down
2 changes: 1 addition & 1 deletion assemblies/features/enterprise/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>17</javase>
<javase>${javaVersion}</javase>
<framework>
<feature>framework</feature>
</framework>
Expand Down
2 changes: 1 addition & 1 deletion assemblies/features/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>17</javase>
<javase>${javaVersion}</javase>
<framework>
<feature>framework</feature>
</framework>
Expand Down
4 changes: 2 additions & 2 deletions assemblies/features/specs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>17</javase>
<javase>${javaVersion}</javase>
<framework>
<feature>framework</feature>
</framework>
Expand Down Expand Up @@ -149,4 +149,4 @@
</profile>
</profiles>

</project>
</project>
2 changes: 1 addition & 1 deletion assemblies/features/spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>17</javase>
<javase>${javaVersion}</javase>
<framework>
<feature>framework</feature>
</framework>
Expand Down
4 changes: 2 additions & 2 deletions assemblies/features/standard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>17</javase>
<javase>${javaVersion}</javase>
<framework>
<feature>framework</feature>
</framework>
Expand All @@ -503,7 +503,7 @@
<artifacts>
<artifact>
<file>target/feature/feature.xml</file>
<classifier>features</classifier>
<classifier>features</classifier>
<type>xml</type>
</artifact>
</artifacts>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
</bootFeatures>
<libraries>
</libraries>
<javase>17</javase>
<javase>${javaVersion}</javase>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -194,4 +194,4 @@
</profile>
</profiles>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>
<javase>17</javase>
<javase>${javaVersion}</javase>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<plugin>
Expand Down
Loading
Loading