diff options
author | gjoranv <gv@verizonmedia.com> | 2021-09-28 23:14:32 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2021-09-28 23:14:57 +0200 |
commit | a3f16c9c59fa59e806c6dc9d65e3e9a0e3ca3d10 (patch) | |
tree | ade2b4a16ee22283a91444faf033701af1ec6783 /security-utils | |
parent | 12a415efca5749433fd22424592ddc18f04160f6 (diff) |
Reapply "Build security utils with maven bundle plugin" (#19291)
Diffstat (limited to 'security-utils')
-rw-r--r-- | security-utils/CMakeLists.txt | 2 | ||||
-rw-r--r-- | security-utils/pom.xml | 41 |
2 files changed, 29 insertions, 14 deletions
diff --git a/security-utils/CMakeLists.txt b/security-utils/CMakeLists.txt index a6fe917c322..b701b78e3cc 100644 --- a/security-utils/CMakeLists.txt +++ b/security-utils/CMakeLists.txt @@ -1,2 +1,2 @@ # Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -install_fat_java_artifact(security-utils) +install_java_artifact(security-utils) diff --git a/security-utils/pom.xml b/security-utils/pom.xml index 4796a809293..567174df102 100644 --- a/security-utils/pom.xml +++ b/security-utils/pom.xml @@ -9,7 +9,7 @@ <relativePath>../parent/pom.xml</relativePath> </parent> <artifactId>security-utils</artifactId> - <packaging>container-plugin</packaging> + <packaging>bundle</packaging> <version>7-SNAPSHOT</version> <properties> @@ -26,13 +26,6 @@ <version>${project.version}</version> <scope>provided</scope> </dependency> - <dependency> - <!-- required for bundle-plugin to generate import-package statements for Java's standard library --> - <groupId>com.yahoo.vespa</groupId> - <artifactId>jdisc_core</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> <!-- compile scope --> <dependency> @@ -77,11 +70,6 @@ <build> <plugins> <plugin> - <groupId>com.yahoo.vespa</groupId> - <artifactId>bundle-plugin</artifactId> - <extensions>true</extensions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> @@ -98,6 +86,33 @@ </compilerArgs> </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>parse-version</id> + <goals> + <goal>parse-version</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <!-- Build with maven-bundle-plugin to avoid depending on jdisc_core to get the correct Import-Packages --> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> + <Bundle-Version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</Bundle-Version> + <Export-Package>com.yahoo.security.*;version=1.0.0;-noimport:=true</Export-Package> + <_nouses>true</_nouses> <!-- Don't include 'uses' directives for package exports --> + <_fixupmessages>"Classes found in the wrong directory"</_fixupmessages> <!-- Hide warnings for bouncycastle multi-release jars --> + </instructions> + </configuration> + </plugin> </plugins> </build> </project> |