diff options
author | gjoranv <gjoranv@gmail.com> | 2023-06-05 16:53:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 16:53:21 +0200 |
commit | 3165cf8fac3ef3bb3b8c4bc933aa6d74f38db565 (patch) | |
tree | bbf8a3885b8d0206acde55337cdfaf44e86b26e9 | |
parent | 678fa9ff6d6e363416ec7fe400395c9f3003934e (diff) | |
parent | ac8bef5d5496047f54258a77f1e563386c8ff454 (diff) |
Merge pull request #27287 from vespa-engine/fail-on-warnings-from-bundle-plugin
Fail on warnings from bundle plugin
-rw-r--r-- | application-model/pom.xml | 3 | ||||
-rw-r--r-- | bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java | 14 | ||||
-rw-r--r-- | clustercontroller-utils/pom.xml | 3 | ||||
-rwxr-xr-x | component/pom.xml | 1 | ||||
-rw-r--r-- | config-application-package/pom.xml | 3 | ||||
-rw-r--r-- | config-bundle/pom.xml | 1 | ||||
-rw-r--r-- | config-lib/pom.xml | 1 | ||||
-rwxr-xr-x | config/pom.xml | 1 | ||||
-rw-r--r-- | configdefinitions/pom.xml | 1 | ||||
-rw-r--r-- | container-documentapi/pom.xml | 1 | ||||
-rw-r--r-- | defaults/pom.xml | 1 | ||||
-rw-r--r-- | flags/pom.xml | 3 | ||||
-rw-r--r-- | fsa/pom.xml | 1 | ||||
-rw-r--r-- | http-client/pom.xml | 4 | ||||
-rw-r--r-- | jaxrs_utils/pom.xml | 3 | ||||
-rw-r--r-- | jrt/pom.xml | 1 | ||||
-rw-r--r-- | linguistics/pom.xml | 1 | ||||
-rw-r--r-- | model-integration/pom.xml | 4 | ||||
-rw-r--r-- | openai-client/pom.xml | 5 | ||||
-rw-r--r-- | opennlp-linguistics/pom.xml | 1 | ||||
-rw-r--r-- | orchestrator-restapi/pom.xml | 3 | ||||
-rw-r--r-- | parent/pom.xml | 1 | ||||
-rw-r--r-- | searchlib/pom.xml | 1 | ||||
-rw-r--r-- | vdslib/pom.xml | 1 | ||||
-rw-r--r-- | vespajlib/pom.xml | 1 | ||||
-rw-r--r-- | vespalog/pom.xml | 1 |
26 files changed, 56 insertions, 5 deletions
diff --git a/application-model/pom.xml b/application-model/pom.xml index c47fccc51bc..9f5cd9c23c1 100644 --- a/application-model/pom.xml +++ b/application-model/pom.xml @@ -55,6 +55,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> <plugin> 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() { diff --git a/clustercontroller-utils/pom.xml b/clustercontroller-utils/pom.xml index 381a4c88946..a572ec4c14e 100644 --- a/clustercontroller-utils/pom.xml +++ b/clustercontroller-utils/pom.xml @@ -46,6 +46,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/component/pom.xml b/component/pom.xml index 3c3a84b13d4..7c2c7e68a54 100755 --- a/component/pom.xml +++ b/component/pom.xml @@ -69,6 +69,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/config-application-package/pom.xml b/config-application-package/pom.xml index dc2c8d91db1..ce6dc3987df 100644 --- a/config-application-package/pom.xml +++ b/config-application-package/pom.xml @@ -116,6 +116,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/config-bundle/pom.xml b/config-bundle/pom.xml index 817820c95d5..bf0721ff7e2 100644 --- a/config-bundle/pom.xml +++ b/config-bundle/pom.xml @@ -72,6 +72,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> </plugins> diff --git a/config-lib/pom.xml b/config-lib/pom.xml index dce2092a0e1..2a1bc734956 100644 --- a/config-lib/pom.xml +++ b/config-lib/pom.xml @@ -71,6 +71,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/config/pom.xml b/config/pom.xml index 29323e26b0b..ae80d00923b 100755 --- a/config/pom.xml +++ b/config/pom.xml @@ -178,6 +178,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/configdefinitions/pom.xml b/configdefinitions/pom.xml index d70a595e495..e163f0292b5 100644 --- a/configdefinitions/pom.xml +++ b/configdefinitions/pom.xml @@ -34,6 +34,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/container-documentapi/pom.xml b/container-documentapi/pom.xml index b2b795a35f2..395c91a3df2 100644 --- a/container-documentapi/pom.xml +++ b/container-documentapi/pom.xml @@ -47,6 +47,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> </plugins> diff --git a/defaults/pom.xml b/defaults/pom.xml index 925232d42ec..e7dbc7981ff 100644 --- a/defaults/pom.xml +++ b/defaults/pom.xml @@ -55,6 +55,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/flags/pom.xml b/flags/pom.xml index 0c268fbd644..2c736d04ccb 100644 --- a/flags/pom.xml +++ b/flags/pom.xml @@ -97,6 +97,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/fsa/pom.xml b/fsa/pom.xml index a3ce38fbeb8..374f7ac5e21 100644 --- a/fsa/pom.xml +++ b/fsa/pom.xml @@ -42,6 +42,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/http-client/pom.xml b/http-client/pom.xml index 133da65631c..c8a58330f24 100644 --- a/http-client/pom.xml +++ b/http-client/pom.xml @@ -72,6 +72,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -81,4 +84,3 @@ </build> </project> - diff --git a/jaxrs_utils/pom.xml b/jaxrs_utils/pom.xml index c174fea1092..02d1c1b8915 100644 --- a/jaxrs_utils/pom.xml +++ b/jaxrs_utils/pom.xml @@ -33,6 +33,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> </plugins> </build> diff --git a/jrt/pom.xml b/jrt/pom.xml index 68903ae161d..74d69c4b117 100644 --- a/jrt/pom.xml +++ b/jrt/pom.xml @@ -52,6 +52,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/linguistics/pom.xml b/linguistics/pom.xml index 1ba6e34951e..5db3302b597 100644 --- a/linguistics/pom.xml +++ b/linguistics/pom.xml @@ -67,6 +67,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/model-integration/pom.xml b/model-integration/pom.xml index 519aebe6f79..854e15298c6 100644 --- a/model-integration/pom.xml +++ b/model-integration/pom.xml @@ -134,6 +134,10 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <!-- defines package 'com.yahoo.embedding' which is also defined in 'configdefinitions' --> + <suppressWarningOverlappingPackages>true</suppressWarningOverlappingPackages> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/openai-client/pom.xml b/openai-client/pom.xml index da2252ee1e6..71a31a7b859 100644 --- a/openai-client/pom.xml +++ b/openai-client/pom.xml @@ -48,6 +48,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -69,4 +72,4 @@ </plugins> </build> -</project>
\ No newline at end of file +</project> diff --git a/opennlp-linguistics/pom.xml b/opennlp-linguistics/pom.xml index 90f41c595df..afd06665cf8 100644 --- a/opennlp-linguistics/pom.xml +++ b/opennlp-linguistics/pom.xml @@ -65,6 +65,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/orchestrator-restapi/pom.xml b/orchestrator-restapi/pom.xml index 156e9367760..3b86309f66a 100644 --- a/orchestrator-restapi/pom.xml +++ b/orchestrator-restapi/pom.xml @@ -40,6 +40,9 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <extensions>true</extensions> + <configuration> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> + </configuration> </plugin> </plugins> </build> diff --git a/parent/pom.xml b/parent/pom.xml index f6fdaf20a7a..f68b2d0c068 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -246,6 +246,7 @@ <configuration> <configGenVersion>${project.version}</configGenVersion> <useCommonAssemblyIds>true</useCommonAssemblyIds> + <failOnWarnings>true</failOnWarnings> </configuration> </plugin> <plugin> diff --git a/searchlib/pom.xml b/searchlib/pom.xml index d45ced84cea..bf556772a7c 100644 --- a/searchlib/pom.xml +++ b/searchlib/pom.xml @@ -81,6 +81,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> diff --git a/vdslib/pom.xml b/vdslib/pom.xml index cc0d1788fdd..53fa6275eb1 100644 --- a/vdslib/pom.xml +++ b/vdslib/pom.xml @@ -49,6 +49,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> diff --git a/vespajlib/pom.xml b/vespajlib/pom.xml index 04f044622b2..5ba7f2d2ff2 100644 --- a/vespajlib/pom.xml +++ b/vespajlib/pom.xml @@ -106,6 +106,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> diff --git a/vespalog/pom.xml b/vespalog/pom.xml index cb20f4c8358..6f721f59f38 100644 --- a/vespalog/pom.xml +++ b/vespalog/pom.xml @@ -51,6 +51,7 @@ <extensions>true</extensions> <configuration> <bundleType>CORE</bundleType> + <suppressWarningMissingImportPackages>true</suppressWarningMissingImportPackages> </configuration> </plugin> <plugin> |