Skip to content

Commit c90e9e2

Browse files
committed
Updating custom jlink plug-in example
- Make things work with current Java - Updating some dependencies - Removing some workarounds needed before
1 parent c51700c commit c90e9e2

File tree

7 files changed

+18
-74
lines changed

7 files changed

+18
-74
lines changed

java9/custom-jlink-plugin/example-a/pom.xml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,5 @@
1616
<packaging>jar</packaging>
1717

1818
<build>
19-
<pluginManagement>
20-
<plugins>
21-
<plugin>
22-
<groupId>org.apache.maven.plugins</groupId>
23-
<artifactId>maven-compiler-plugin</artifactId>
24-
<configuration>
25-
<source>1.8</source>
26-
<target>1.8</target>
27-
</configuration>
28-
</plugin>
29-
</plugins>
30-
</pluginManagement>
31-
<plugins>
32-
<!-- Adding module descriptor via ModiTect so that the classes themselves
33-
can be compiled to Java 8 byte code format, as Jandex 2.0.4 ignores
34-
all files with Java 9 format -->
35-
<plugin>
36-
<groupId>org.moditect</groupId>
37-
<artifactId>moditect-maven-plugin</artifactId>
38-
<executions>
39-
<execution>
40-
<id>add-module-info</id>
41-
<phase>package</phase>
42-
<goals>
43-
<goal>add-module-info</goal>
44-
</goals>
45-
<configuration>
46-
<module>
47-
<moduleInfoSource>
48-
module com.example.a {
49-
exports com.example.a;
50-
}
51-
</moduleInfoSource>>
52-
</module>
53-
</configuration>
54-
</execution>
55-
</executions>
56-
</plugin>
57-
</plugins>
5819
</build>
5920
</project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* License: Apache License, Version 2.0
3+
* See the LICENSE file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
4+
*/
5+
module com.example.a {
6+
exports com.example.a;
7+
}

java9/custom-jlink-plugin/example-b/src/main/java/module-info.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* See the LICENSE file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
44
*/
55
module com.example.b {
6+
exports com.example.b;
67
requires com.example.a;
7-
requires jandex;
8+
requires org.jboss.jandex;
89
}

java9/custom-jlink-plugin/integrationtest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<version>${org.jboss.jandex.version}</version>
9696
</artifact>
9797
<moduleInfo>
98-
<name>jandex</name>
98+
<name>org.jboss.jandex</name>
9999
<exports>
100100
org.jboss.jandex;
101101
</exports>

java9/custom-jlink-plugin/plugin/pom.xml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,6 @@
3333
</compilerArgs>
3434
</configuration>
3535
</plugin>
36-
<plugin>
37-
<groupId>org.moditect</groupId>
38-
<artifactId>moditect-maven-plugin</artifactId>
39-
<executions>
40-
<execution>
41-
<id>add-module-info</id>
42-
<phase>package</phase>
43-
<goals>
44-
<goal>add-module-info</goal>
45-
</goals>
46-
<configuration>
47-
<module>
48-
<moduleInfoSource>
49-
module org.hibernate.demos.jlink {
50-
exports org.hibernate.demos.jlink.plugins;
51-
requires jdk.jlink;
52-
requires jandex;
53-
}
54-
</moduleInfoSource>>
55-
<mainClass>org.hibernate.demos.jlink.JLinkWrapper</mainClass>
56-
</module>
57-
</configuration>
58-
</execution>
59-
</executions>
60-
</plugin>
6136
</plugins>
6237
</build>
6338
</project>

java9/custom-jlink-plugin/plugin/src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
module org.hibernate.demos.jlink {
66
exports org.hibernate.demos.jlink.plugins;
77
requires jdk.jlink;
8-
requires jandex;
8+
requires org.jboss.jandex;
99
}

java9/custom-jlink-plugin/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<properties>
1818
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19-
<org.jboss.jandex.version>2.0.4.Final</org.jboss.jandex.version>
19+
<org.jboss.jandex.version>2.2.2.Final</org.jboss.jandex.version>
2020
</properties>
2121

2222
<build>
@@ -26,11 +26,11 @@
2626
<groupId>org.apache.maven.plugins</groupId>
2727
<artifactId>maven-compiler-plugin</artifactId>
2828
<configuration>
29-
<source>9</source>
30-
<target>9</target>
31-
<!-- <release>9</release> -->
29+
<source>11</source>
30+
<target>11</target>
31+
<!--<release>11</release>-->
3232
</configuration>
33-
<version>3.6.2</version>
33+
<version>3.8.1</version>
3434
</plugin>
3535
<plugin>
3636
<groupId>org.apache.maven.plugins</groupId>
@@ -40,7 +40,7 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-failsafe-plugin</artifactId>
43-
<version>2.20.1</version>
43+
<version>3.0.0-M5</version>
4444
</plugin>
4545
<plugin>
4646
<groupId>org.apache.maven.plugins</groupId>
@@ -50,7 +50,7 @@
5050
<plugin>
5151
<groupId>org.moditect</groupId>
5252
<artifactId>moditect-maven-plugin</artifactId>
53-
<version>1.0.0.Alpha2</version>
53+
<version>1.0.0.RC1</version>
5454
</plugin>
5555
</plugins>
5656
</pluginManagement>

0 commit comments

Comments
 (0)