Skip to content

Commit

Permalink
Merge pull request #184 from hgschmie/set-module-name
Browse files Browse the repository at this point in the history
Set an automatic module (JPMS) name
  • Loading branch information
mikebell90 authored Apr 20, 2024
2 parents 348b489 + d746878 commit a24a525
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<basepom.oss.skip-scala-doc>true</basepom.oss.skip-scala-doc>
<basepom.check.skip-javadoc>false</basepom.check.skip-javadoc>
<basepom.check.fail-javadoc>false</basepom.check.fail-javadoc>
<moduleName>com.opentable.components.otj.pg.embedded</moduleName>
</properties>

<licenses>
Expand Down Expand Up @@ -160,6 +161,39 @@
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<!-- add module name to main artifact -->
<configuration>
<archive>
<manifestEntries combine.children="append">
<Automatic-Module-Name>${moduleName}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<id>basepom.default</id>
<!-- add module name with "test" appended to tests artifact -->
<configuration>
<archive>
<manifestEntries combine.children="append">
<Automatic-Module-Name>${moduleName}.tests</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>oss-build</id>
Expand Down Expand Up @@ -337,5 +371,4 @@
</build>
</profile>
</profiles>

</project>

0 comments on commit a24a525

Please sign in to comment.