Skip to content

Commit e532206

Browse files
committed
Add full Java module descriptors
Closes cloudevents#555 Signed-off-by: Andres Almiray <[email protected]>
1 parent 55fddb3 commit e532206

File tree

17 files changed

+138
-21
lines changed

17 files changed

+138
-21
lines changed

.github/workflows/branch.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,31 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
java: [ 8, 11, 17 ]
16+
java: [ 11, 17, 21 ]
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
- name: Setup java
20-
uses: actions/setup-java@v1
20+
uses: actions/setup-java@v4
2121
with:
22+
cache: 'maven'
2223
java-version: ${{ matrix.java }}
24+
distribution: 'temurin'
2325
- run: |
24-
./mvnw clean install -DskipTests -B
25-
./mvnw verify -B
26+
./mvnw -ntp -B clean install -DskipTests
27+
./mvnw -ntp -B verify
2628
2729
deploy:
2830
runs-on: ubuntu-latest
2931
name: Deploy
3032
needs: test
3133
steps:
32-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3335
- name: Setup java
34-
uses: actions/setup-java@v1
36+
uses: actions/setup-java@v4
3537
with:
36-
java-version: 8
38+
cache: 'maven'
39+
java-version: 11
40+
distribution: 'temurin'
3741
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
3842
server-username: MAVEN_USERNAME # env variable for username in deploy
3943
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy

.github/workflows/bump.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ jobs:
1313
env:
1414
NEW_VERSION: ${{ github.event.inputs.version }}
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Setup java
18-
uses: actions/setup-java@v1
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 8
20+
cache: 'maven'
21+
java-version: 11
22+
distribution: 'temurin'
2123
- name: Bump version using Maven
22-
run: './mvnw versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -B'
24+
run: './mvnw -ntp -B versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false'
2325
- name: Bump version in docs
2426
if: ${{ !endsWith(github.event.inputs.version, 'SNAPSHOT') }}
2527
run: 'find . -type f -name "*.md" -exec sed -i -e "s+<version>[a-zA-Z0-9.-]*<\/version>+<version>$NEW_VERSION</version>+g" {} +'

.github/workflows/pr.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
java: [ 8, 11, 17 ]
15+
java: [ 11, 17, 21 ]
1616
name: Java ${{ matrix.java }} Test
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
- name: Setup java
20-
uses: actions/setup-java@v2
20+
uses: actions/setup-java@v4
2121
with:
2222
cache: 'maven'
2323
java-version: ${{ matrix.java }}
2424
distribution: 'temurin'
2525
- run: |
26-
./mvnw clean install -DskipTests -B
27-
./mvnw verify -B
28-
./mvnw javadoc:javadoc
26+
./mvnw -ntp -B clean install -DskipTests
27+
./mvnw -ntp -B verify
28+
./mvnw -ntp -B javadoc:javadoc

amqp/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,12 @@
6161

6262
</dependencies>
6363

64+
<build>
65+
<plugins>
66+
<plugin>
67+
<groupId>org.moditect</groupId>
68+
<artifactId>moditect-maven-plugin</artifactId>
69+
</plugin>
70+
</plugins>
71+
</build>
6472
</project>

api/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,13 @@
5656
<scope>test</scope>
5757
</dependency>
5858
</dependencies>
59+
60+
<build>
61+
<plugins>
62+
<plugin>
63+
<groupId>org.moditect</groupId>
64+
<artifactId>moditect-maven-plugin</artifactId>
65+
</plugin>
66+
</plugins>
67+
</build>
5968
</project>

benchmarks/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
<plugin>
8484
<groupId>org.apache.maven.plugins</groupId>
8585
<artifactId>maven-compiler-plugin</artifactId>
86-
<version>3.8.0</version>
8786
<configuration>
8887
<compilerVersion>${javac.target}</compilerVersion>
8988
<source>${javac.target}</source>

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
</dependency>
8484
<dependency>
8585
<groupId>io.cloudevents</groupId>
86-
<artifactId>io.cloudevents.sql</artifactId>
86+
<artifactId>cloudevents-sql</artifactId>
8787
<version>${project.version}</version>
8888
</dependency>
8989
</dependencies>

core/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666

6767
<build>
6868
<plugins>
69+
<plugin>
70+
<groupId>org.moditect</groupId>
71+
<artifactId>moditect-maven-plugin</artifactId>
72+
</plugin>
6973
<plugin>
7074
<groupId>org.apache.maven.plugins</groupId>
7175
<artifactId>maven-jar-plugin</artifactId>

formats/json-jackson/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,13 @@
9090
</dependency>
9191

9292
</dependencies>
93+
94+
<build>
95+
<plugins>
96+
<plugin>
97+
<groupId>org.moditect</groupId>
98+
<artifactId>moditect-maven-plugin</artifactId>
99+
</plugin>
100+
</plugins>
101+
</build>
93102
</project>

formats/protobuf/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
6262
</configuration>
6363
</plugin>
64+
<plugin>
65+
<groupId>org.moditect</groupId>
66+
<artifactId>moditect-maven-plugin</artifactId>
67+
</plugin>
6468
</plugins>
6569
</build>
6670

@@ -126,5 +130,4 @@
126130
</dependency>
127131

128132
</dependencies>
129-
130133
</project>

formats/xml/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,12 @@
8484

8585
</dependencies>
8686

87+
<build>
88+
<plugins>
89+
<plugin>
90+
<groupId>org.moditect</groupId>
91+
<artifactId>moditect-maven-plugin</artifactId>
92+
</plugin>
93+
</plugins>
94+
</build>
8795
</project>

http/basic/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,13 @@
6363
</dependency>
6464

6565
</dependencies>
66+
67+
<build>
68+
<plugins>
69+
<plugin>
70+
<groupId>org.moditect</groupId>
71+
<artifactId>moditect-maven-plugin</artifactId>
72+
</plugin>
73+
</plugins>
74+
</build>
6675
</project>

http/restful-ws-jakarta/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
</execution>
9292
</executions>
9393
</plugin>
94+
<plugin>
95+
<groupId>org.moditect</groupId>
96+
<artifactId>moditect-maven-plugin</artifactId>
97+
</plugin>
9498
</plugins>
9599
</build>
96100

http/vertx/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,13 @@
8787
<scope>test</scope>
8888
</dependency>
8989
</dependencies>
90+
91+
<build>
92+
<plugins>
93+
<plugin>
94+
<groupId>org.moditect</groupId>
95+
<artifactId>moditect-maven-plugin</artifactId>
96+
</plugin>
97+
</plugins>
98+
</build>
9099
</project>

kafka/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,14 @@
7676
<scope>test</scope>
7777
</dependency>
7878
</dependencies>
79+
80+
<build>
81+
<plugins>
82+
<plugin>
83+
<groupId>org.moditect</groupId>
84+
<artifactId>moditect-maven-plugin</artifactId>
85+
</plugin>
86+
</plugins>
87+
</build>
7988
</project>
8089

pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<properties>
8888
<maven.compiler.source>8</maven.compiler.source>
8989
<maven.compiler.target>8</maven.compiler.target>
90+
<maven.compiler.release>8</maven.compiler.release>
9091
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
9192

9293
<!-- Maven plugins -->
@@ -123,6 +124,11 @@
123124
<artifactId>maven-surefire-plugin</artifactId>
124125
<version>${maven-surefire-plugin.version}</version>
125126
</plugin>
127+
<plugin>
128+
<groupId>org.apache.maven.plugins</groupId>
129+
<artifactId>maven-compiler-plugin</artifactId>
130+
<version>3.12.1</version>
131+
</plugin>
126132
<plugin>
127133
<groupId>org.apache.maven.plugins</groupId>
128134
<artifactId>maven-jar-plugin</artifactId>
@@ -134,6 +140,36 @@
134140
</archive>
135141
</configuration>
136142
</plugin>
143+
<plugin>
144+
<groupId>org.moditect</groupId>
145+
<artifactId>moditect-maven-plugin</artifactId>
146+
<version>1.0.0.Final</version>
147+
<executions>
148+
<execution>
149+
<id>add-module-infos</id>
150+
<phase>package</phase>
151+
<goals>
152+
<goal>add-module-info</goal>
153+
</goals>
154+
<configuration>
155+
<overwriteExistingFiles>true</overwriteExistingFiles>
156+
<failOnWarning>false</failOnWarning>
157+
<module>
158+
<moduleInfo>
159+
<name>${module-name}</name>
160+
<!-- export everything -->
161+
<exports>*;</exports>
162+
<!-- declare services consumed by the artifact -->
163+
<addServiceUses>true</addServiceUses>
164+
</moduleInfo>
165+
</module>
166+
<jdepsExtraArgs>
167+
<arg>--multi-release=9</arg>
168+
</jdepsExtraArgs>
169+
</configuration>
170+
</execution>
171+
</executions>
172+
</plugin>
137173
<plugin>
138174
<groupId>org.ec4j.maven</groupId>
139175
<artifactId>editorconfig-maven-plugin</artifactId>

sql/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@
8787
<listener>true</listener> <!-- TODO do we need the listener? -->
8888
</configuration>
8989
</plugin>
90+
<plugin>
91+
<groupId>org.moditect</groupId>
92+
<artifactId>moditect-maven-plugin</artifactId>
93+
</plugin>
9094
</plugins>
9195
</build>
9296

0 commit comments

Comments
 (0)