Skip to content

Commit

Permalink
Enable Build with Java 17, use Java 17 for Sonar Analysis (#3)
Browse files Browse the repository at this point in the history
* Enable Build with Java 17, use Java 17 for Sonar Analysis
* Skip Integration tests on Java 17 and 21 until we upgraded to latest Sling Starter
* switch to bnd-maven-plugin
  • Loading branch information
stefanseifert authored Mar 7, 2024
1 parent e030033 commit aacb46c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [11]
java: [11, 17]
os: [ubuntu-latest]
distribution: [temurin]

Expand All @@ -31,6 +31,6 @@ jobs:
os: ${{ matrix.os }}
java-version: ${{ matrix.java }}
sonar-run-on-os: ubuntu-latest
sonar-run-on-java-version: 11
sonar-run-on-java-version: 17
sonar-token: ${{ secrets.SONAR_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 15 additions & 6 deletions examples/aem-caravan-jaxrs-sample/bundles/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<groupId>io.wcm.caravan.samples</groupId>
<artifactId>io.wcm.caravan.samples.aem-caravan-jaxrs-sample.core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<packaging>jar</packaging>

<name>aem-caravan-jaxrs-sample Core</name>

Expand Down Expand Up @@ -70,12 +70,21 @@
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<instructions>
<Caravan-JaxRs-ApplicationPath>/aem-caravan-jaxrs-sample</Caravan-JaxRs-ApplicationPath>
</instructions>
<bnd>
Caravan-JaxRs-ApplicationPath: /aem-caravan-jaxrs-sample
</bnd>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

Expand Down
7 changes: 5 additions & 2 deletions examples/aem-caravan-jaxrs-sample/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>io.wcm.maven</groupId>
<artifactId>io.wcm.maven.aem-global-parent</artifactId>
<version>1.2.34</version>
<version>2.1.16</version>
<relativePath/>
</parent>

Expand All @@ -41,7 +41,10 @@

<!-- Sling instance parameters -->
<sling.url>http://localhost:4502</sling.url>


<!-- Enable reproducible builds -->
<project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp>

</properties>

<dependencies>
Expand Down
12 changes: 12 additions & 0 deletions integration-test/launchpad-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
</execution>
</executions>
<configuration>
<skipLaunchpad>${integrationtests.skip}</skipLaunchpad>
<usePomDependencies>true</usePomDependencies>
<usePomVariables>true</usePomVariables>
<servers>
Expand Down Expand Up @@ -317,6 +318,17 @@
</properties>
</profile>

<!-- Skip Integration tests on Java 17 and 21 until we upgraded to latest Sling Starter -->
<profile>
<id>skip-java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<integrationtests.skip>true</integrationtests.skip>
</properties>
</profile>

</profiles>

</project>

0 comments on commit aacb46c

Please sign in to comment.