-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JPMS support #871
Comments
Sure, thanks for bringing this up. Can you let me know how to do this? We already got this in our <packaging>bundle</packaging> What else do I need? |
Hello @fstab, As far as I understand this can be implemented 2 ways: First Option: special entry in here is an idea: diff --git a/pom.xml b/pom.xml
index 2845c00d..2f468daa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <automatic-module-name>--module-name-need-to-be-overriden--</automatic-module-name>
</properties>
<distributionManagement>
@@ -192,6 +193,11 @@
<artifactId>maven-bundle-plugin</artifactId>
<version>2.4.0</version>
<extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>${automatic-module-name}</Automatic-Module-Name>
+ </instructions>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/prometheus-metrics-core/pom.xml b/prometheus-metrics-core/pom.xml
index 25007d1e..a31705c2 100644
--- a/prometheus-metrics-core/pom.xml
+++ b/prometheus-metrics-core/pom.xml
@@ -32,6 +32,9 @@
</developer>
</developers>
+ <properties>
+ <automatic-module-name>io.prometheus.metrics.core</automatic-module-name>
+ </properties>
<dependencies>
<dependency>
<groupId>io.prometheus</groupId> as you can see:
Another Option: IMO first option is faster and lightweight, with second one you will create real modules :) |
Thanks a lot @solomax ,I like option 1. What do people usually choose as a module name? Each module has a unique Java package, so we could use the package name. Or is it more common to use the name of the Maven module? If you like to create a PR for this please go ahead. |
not sure what is DCO :( |
Signed-off-by: Maxim Solodovnik <solomax@apache.org>
@fstab You should use the package name. Maven module names are usually not valid because they have While you are at since I was looking at the manifest you should not have your name in the jar manifest and the bnd timestamp should probably be removed as well. See this: https://maven.apache.org/guides/mini/guide-reproducible-builds.html and this: https://reproducible-builds.org/docs/jvm/ and this: https://github.com/jvm-repo-rebuild/reproducible-central#readme Given how important prometheus is it should be on that list. |
Signed-off-by: Maxim Solodovnik <solomax@apache.org>
Hello,
Would it be possible to release version with
Automati-Module-Name
?to avoid warnings like:
The text was updated successfully, but these errors were encountered: