Skip to content

Commit

Permalink
[Build] Define all MANIFEST.MF entries through the bnd-maven-plugin
Browse files Browse the repository at this point in the history
and derive 'Bundle-SymbolicName' header from the artifactId.

This changes the 'Bundle-SymbolicName' and 'Automatic-Module-Name' for
the following modules:
- maven-resolver-named-locks
	from 'org.apache.maven.resolver.named'
	to 'org.apache.maven.resolver.named.locks'
- maven-resolver-test-util
	from 'org.apache.maven.resolver.testutil'
	to 'org.apache.maven.resolver.test.util'
  • Loading branch information
iils-hwellmann authored and gnodet committed Jun 25, 2024
1 parent 7466cae commit 52b4db3
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 73 deletions.
5 changes: 3 additions & 2 deletions maven-resolver-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
<description>The application programming interface for the repository system.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}.api</Bundle-SymbolicName>
<bnd.instructions.additions><![CDATA[
Automatic-Module-Name: org.apache.maven.resolver
]]></bnd.instructions.additions>
</properties>

<dependencies>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-connector-basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Connector Basic</name>
<description>A repository connector implementation for repositories using URI-based layouts.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.connector.basic</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
4 changes: 0 additions & 4 deletions maven-resolver-demos/maven-resolver-demo-snippets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
<description>A module to demonstrate the usage of Maven Artifact Resolver with Maven repositories
by means of various runnable code snippets.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.demo.snippets</Automatic-Module-Name>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-demos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- This is needed to prevent jar plugin to fail due to a missing manifest and wrong automatic module name. -->
<!-- This is needed to prevent jar plugin to fail due to a missing manifest. -->
<archive combine.self="override" />
</configuration>
</plugin>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Implementation</name>
<description>An implementation of the repository system.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.impl</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-named-locks-hazelcast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Named Locks using Hazelcast</name>
<description>A synchronization utility implementation using Hazelcast.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.named.hazelcast</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-named-locks-redisson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Named Locks using Redisson</name>
<description>A synchronization utility implementation using Redisson.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.named.redisson</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-named-locks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Named Locks</name>
<description>A synchronization utility implementation using Named locks.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.named</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver SPI</name>
<description>The service provider interface for repository system implementations and repository connectors.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.spi</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-supplier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Instance Supplier</name>
<description>A helper module to provide RepositorySystem instances.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.supplier</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-test-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Test Utilities</name>
<description>A collection of utility classes to ease testing of the repository system.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.testutil</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-transport-classpath/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Transport Classpath</name>
<description>A transport implementation for repositories using classpath:// URLs.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.transport.classpath</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-transport-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Transport File</name>
<description>A transport implementation for repositories using file:// URLs.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.transport.file</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
2 changes: 0 additions & 2 deletions maven-resolver-transport-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
<description>A transport implementation for repositories using http:// and https:// URLs.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.transport.http</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
<jettyVersion>9.4.54.v20240208</jettyVersion>
</properties>

Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-transport-wagon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Transport Wagon</name>
<description>A transport implementation based on Maven Wagon.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.transport.wagon</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
5 changes: 0 additions & 5 deletions maven-resolver-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<name>Maven Artifact Resolver Utilities</name>
<description>A collection of utility classes to ease usage of the repository system.</description>

<properties>
<Automatic-Module-Name>org.apache.maven.resolver.util</Automatic-Module-Name>
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<minimalMavenBuildVersion>[3.8.7,)</minimalMavenBuildVersion>
<minimalJavaBuildVersion>[1.8.0-362,)</minimalJavaBuildVersion>
<project.build.outputTimestamp>2024-04-26T10:43:34Z</project.build.outputTimestamp>
<bnd.instructions.additions />
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -471,11 +472,13 @@
<version>6.4.0</version>
<configuration>
<bnd><![CDATA[
Bundle-SymbolicName: ${Bundle-SymbolicName}
Bundle-SymbolicName: org.apache.${replacestring;${project.artifactId};-;.}
Automatic-Module-Name: ${Bundle-SymbolicName}
# Export packages not containing the substring 'internal'
-exportcontents: ${removeall;${packages};${packages;NAMED;*internal*}}
# Reproducible build
-noextraheaders: true
${bnd.instructions.additions}
]]></bnd>
</configuration>
</plugin>
Expand All @@ -485,9 +488,6 @@
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>${Automatic-Module-Name}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
Expand Down

0 comments on commit 52b4db3

Please sign in to comment.