Skip to content

Commit 92e02c6

Browse files
authored
Build with Automatic-Module-Name for compatibility with the Java module system. (#1941)
1 parent f1c525a commit 92e02c6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ javadoc {
141141
options.addBooleanOption("Xdoclint:none", true)
142142
}
143143

144+
jar {
145+
manifest {
146+
attributes (
147+
"Automatic-Module-Name": "net.sf.jsqlparser"
148+
)
149+
}
150+
}
151+
144152
tasks.register('xmldoc', Javadoc) {
145153
def outFile = reporting.file(
146154
version.endsWith("-SNAPSHOT")

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,17 @@
328328
</execution>
329329
</executions>
330330
</plugin>
331+
<plugin>
332+
<groupId>org.apache.maven.plugins</groupId>
333+
<artifactId>maven-jar-plugin</artifactId>
334+
<configuration>
335+
<archive>
336+
<manifestEntries>
337+
<Automatic-Module-Name>net.sf.jsqlparser</Automatic-Module-Name>
338+
</manifestEntries>
339+
</archive>
340+
</configuration>
341+
</plugin>
331342
<plugin>
332343
<artifactId>maven-site-plugin</artifactId>
333344
<version>3.12.1</version>

0 commit comments

Comments
 (0)