Skip to content

Commit

Permalink
Switch to Java 22 (no preview needed), deploy snapshots to OSSRH
Browse files Browse the repository at this point in the history
  • Loading branch information
igorzep committed Sep 29, 2024
1 parent 8afa422 commit 771568e
Show file tree
Hide file tree
Showing 11 changed files with 142 additions and 79 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md

name: Java CI with Maven

Expand All @@ -15,10 +16,29 @@ jobs:
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: '21'
java-version: '22'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Update dependency graph # Improve the quality of Dependabot alerts
uses: advanced-security/[email protected]

deploy:
runs-on: ubuntu-latest
needs: build
if: github.repository_owner == 'alveolo' && github.ref == 'refs/heads/main'

steps:
- uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: '22'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_PASSWORD }}
- name: Deploy to Sonatype OSSRH
run: mvn -B deploy --file pom.xml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ target/
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# jenv
.java-version
8 changes: 4 additions & 4 deletions benchmark/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=22
org.eclipse.jdt.core.compiler.compliance=22
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.compiler.source=22
org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
Expand Down
16 changes: 2 additions & 14 deletions benchmark/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-J--enable-preview</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<enablePreview>true</enablePreview>
<fork>true</fork>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<annotationProcessorPaths>
Expand All @@ -38,7 +33,6 @@
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -69,15 +63,9 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.37</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<jmh.version>1.37</jmh.version>
<jnr.version>2.2.16</jnr.version>
<jna.version>5.14.0</jna.version>
</properties>
</project>
18 changes: 4 additions & 14 deletions benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd

<properties>
<jmh.version>1.37</jmh.version>
<jna.version>5.14.0</jna.version>
<jnr.version>2.2.16</jnr.version>
</properties>

<dependencies>
Expand All @@ -32,18 +34,12 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>5.14.0</version>
<version>${jna.version}</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
<version>2.2.16</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
<scope>provided</scope>
<version>${jnr.version}</version>
</dependency>
</dependencies>

Expand All @@ -52,13 +48,8 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-J--enable-preview</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<enablePreview>true</enablePreview>
<fork>true</fork>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<annotationProcessorPaths>
Expand All @@ -78,7 +69,6 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
8 changes: 4 additions & 4 deletions core/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=22
org.eclipse.jdt.core.compiler.compliance=22
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.compiler.source=22
org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
Expand Down
19 changes: 0 additions & 19 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,4 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd

<artifactId>alveolo-ffm-core</artifactId>
<name>Alveolo FFM - Core</name>

<properties>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<enablePreview>true</enablePreview>
<proc>none</proc>
</configuration>
</plugin>
</plugins>
</build>
</project>
68 changes: 59 additions & 9 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,30 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<name>Alveolo FFM - Parent</name>

<properties>
<maven.compiler.release>21</maven.compiler.release>
<maven.compiler.plugin.version>3.12.1</maven.compiler.plugin.version>
<maven.compiler.release>22</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencyManagement>
<dependencies>
<!--
<dependency>
<groupId>io.github.dmlloyd</groupId>
<artifactId>jdk-classfile-preview</artifactId>
<version>22.3.0</version>
<artifactId>jdk-classfile-backport</artifactId>
<version>24.beta4</version>
</dependency>
-->
<dependency>
<groupId>org.glavo</groupId>
<artifactId>classfile</artifactId>
Expand All @@ -39,11 +51,49 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<artifactId>alveolo-ffm-processor</artifactId>
<version>0.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
49 changes: 41 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,42 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
">
<modelVersion>4.0.0</modelVersion>

<groupId>org.alveolo.ffm</groupId>
<artifactId>alveolo-ffm-aggregate</artifactId>
<version>0.0.2-SNAPSHOT</version>
<parent>
<groupId>org.alveolo.ffm</groupId>
<artifactId>alveolo-ffm-parent</artifactId>
<version>0.0.2-SNAPSHOT</version>
<relativePath>parent/pom.xml</relativePath>
</parent>

<artifactId>alveolo-ffm-root</artifactId>
<packaging>pom</packaging>
<name>Alveolo FFM - Root</name>
<description>Alveolo FFM - Root</description>
<url>https://github.com/alveolo/alveolo-ffm</url>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<developers>
<developer>
<name>Igor Malinin</name>
<email>[email protected]</email>
<organization>Alveolo</organization>
<organizationUrl>https://github.com/alveolo/</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/alveolo/alveolo-ffm.git</connection>
<developerConnection>scm:git:ssh://github.com:alveolo/alveolo-ffm.git</developerConnection>
<url>https://github.com/alveolo/alveolo-ffm/tree/main</url>
</scm>

<properties>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -27,11 +55,16 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<enablePreview>true</enablePreview>
<proc>none</proc>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 4 additions & 4 deletions processor/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=22
org.eclipse.jdt.core.compiler.compliance=22
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.compiler.source=22
org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
Expand Down
2 changes: 0 additions & 2 deletions processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<enablePreview>true</enablePreview>
<proc>none</proc>
</configuration>
</plugin>
Expand Down

0 comments on commit 771568e

Please sign in to comment.