Skip to content

Commit

Permalink
Add full Java module descriptors
Browse files Browse the repository at this point in the history
Closes cloudevents#555

Signed-off-by: Andres Almiray <[email protected]>
  • Loading branch information
aalmiray committed Feb 13, 2024
1 parent 55fddb3 commit e532206
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 21 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,31 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 11, 17, 21 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
cache: 'maven'
java-version: ${{ matrix.java }}
distribution: 'temurin'
- run: |
./mvnw clean install -DskipTests -B
./mvnw verify -B
./mvnw -ntp -B clean install -DskipTests
./mvnw -ntp -B verify
deploy:
runs-on: ubuntu-latest
name: Deploy
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 8
cache: 'maven'
java-version: 11
distribution: 'temurin'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ jobs:
env:
NEW_VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 8
cache: 'maven'
java-version: 11
distribution: 'temurin'
- name: Bump version using Maven
run: './mvnw versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -B'
run: './mvnw -ntp -B versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false'
- name: Bump version in docs
if: ${{ !endsWith(github.event.inputs.version, 'SNAPSHOT') }}
run: 'find . -type f -name "*.md" -exec sed -i -e "s+<version>[a-zA-Z0-9.-]*<\/version>+<version>$NEW_VERSION</version>+g" {} +'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 11, 17, 21 ]
name: Java ${{ matrix.java }} Test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
cache: 'maven'
java-version: ${{ matrix.java }}
distribution: 'temurin'
- run: |
./mvnw clean install -DskipTests -B
./mvnw verify -B
./mvnw javadoc:javadoc
./mvnw -ntp -B clean install -DskipTests
./mvnw -ntp -B verify
./mvnw -ntp -B javadoc:javadoc
8 changes: 8 additions & 0 deletions amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,12 @@

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
1 change: 0 additions & 1 deletion benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerVersion>${javac.target}</compilerVersion>
<source>${javac.target}</source>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</dependency>
<dependency>
<groupId>io.cloudevents</groupId>
<artifactId>io.cloudevents.sql</artifactId>
<artifactId>cloudevents-sql</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down
4 changes: 4 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
9 changes: 9 additions & 0 deletions formats/json-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,13 @@
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
5 changes: 4 additions & 1 deletion formats/protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -126,5 +130,4 @@
</dependency>

</dependencies>

</project>
8 changes: 8 additions & 0 deletions formats/xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,12 @@

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions http/basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,13 @@
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions http/restful-ws-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
9 changes: 9 additions & 0 deletions http/vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,13 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,14 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

36 changes: 36 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Maven plugins -->
Expand Down Expand Up @@ -123,6 +124,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -134,6 +140,36 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.Final</version>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<overwriteExistingFiles>true</overwriteExistingFiles>
<failOnWarning>false</failOnWarning>
<module>
<moduleInfo>
<name>${module-name}</name>
<!-- export everything -->
<exports>*;</exports>
<!-- declare services consumed by the artifact -->
<addServiceUses>true</addServiceUses>
</moduleInfo>
</module>
<jdepsExtraArgs>
<arg>--multi-release=9</arg>
</jdepsExtraArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.ec4j.maven</groupId>
<artifactId>editorconfig-maven-plugin</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
<listener>true</listener> <!-- TODO do we need the listener? -->
</configuration>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit e532206

Please sign in to comment.