summaryrefslogtreecommitdiffstats
path: root/bundle-plugin
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-06-05 13:15:31 +0200
committergjoranv <gv@yahooinc.com>2023-06-05 13:57:48 +0200
commitdcfcac0f53a0cb32644741e5b0e13c155116ab8b (patch)
treed13491a59c98addc56b49d09eba7516d213de617 /bundle-plugin
parentbb8821ac9afffe44e7d47d2573cfaf62a64ed07c (diff)
Make 'com.yahoo.vespa.hosted' groupIds internal by default.
Diffstat (limited to 'bundle-plugin')
-rw-r--r--bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java
index eef74365b92..d217273e42b 100644
--- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java
+++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java
@@ -46,6 +46,8 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo {
USER
}
+ private static final String VESPA_GROUP_ID = "com.yahoo.vespa";
+
@Parameter
private String discApplicationClass = null;
@@ -146,7 +148,7 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo {
private BundleType effectiveBundleType() {
if (bundleType != BundleType.USER) return bundleType;
- return project.getGroupId().equals("com.yahoo.vespa") ? BundleType.INTERNAL : BundleType.USER;
+ return isVespaInternalGroupId(project.getGroupId()) ? BundleType.INTERNAL : BundleType.USER;
}
private void addAdditionalManifestProperties(Map<String, String> manifestContent, PackageTally includedPackages) {
@@ -256,12 +258,18 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo {
}
}
+ private boolean isVespaInternalGroupId(String groupId) {
+ return groupId.equals(VESPA_GROUP_ID)
+ || groupId.equals(VESPA_GROUP_ID + ".hosted")
+ || groupId.equals(VESPA_GROUP_ID + ".hosted.controller");
+ }
+
private boolean isJdiscComponentArtifact(Artifact a) {
- return a.getArtifactId().equals("component") && a.getGroupId().equals("com.yahoo.vespa");
+ return a.getArtifactId().equals("component") && a.getGroupId().equals(VESPA_GROUP_ID);
}
private boolean isContainerDiscArtifact(Artifact a) {
- return a.getArtifactId().equals("container-disc") && a.getGroupId().equals("com.yahoo.vespa");
+ return a.getArtifactId().equals("container-disc") && a.getGroupId().equals(VESPA_GROUP_ID);
}
private PackageTally getProjectClassesTally() {