diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-01-24 12:54:57 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-01-24 12:56:01 +0100 |
commit | bc588447cfccc10456a1ad0c14fa41e63ec0559b (patch) | |
tree | e9b05b1373022cc82a37e0a889d38632030bac15 /vespaclient-java | |
parent | eec4962db2f6dc302f7195c1b20a6818dbc0178a (diff) |
Build classic fatjar for standalone use
Diffstat (limited to 'vespaclient-java')
-rw-r--r-- | vespaclient-java/assembly.xml | 19 | ||||
-rw-r--r-- | vespaclient-java/pom.xml | 20 | ||||
-rwxr-xr-x | vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh | 2 |
3 files changed, 40 insertions, 1 deletions
diff --git a/vespaclient-java/assembly.xml b/vespaclient-java/assembly.xml new file mode 100644 index 00000000000..0cdfe70324c --- /dev/null +++ b/vespaclient-java/assembly.xml @@ -0,0 +1,19 @@ +<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>fat-with-provided</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <unpack>true</unpack> + <scope>provided</scope> + </dependencySet> + <dependencySet> + <unpack>true</unpack> + <scope>compile</scope> + </dependencySet> + </dependencySets> +</assembly>
\ No newline at end of file diff --git a/vespaclient-java/pom.xml b/vespaclient-java/pom.xml index 39965bd6d3b..3047433473f 100644 --- a/vespaclient-java/pom.xml +++ b/vespaclient-java/pom.xml @@ -97,6 +97,7 @@ <configuration><skip>true</skip></configuration> </plugin> <plugin> + <!-- For installation in vespa-home/lib/jars/ --> <groupId>com.yahoo.vespa</groupId> <artifactId>bundle-plugin</artifactId> <executions> @@ -106,6 +107,25 @@ </execution> </executions> </plugin> + <plugin> + <!-- For local dev usage --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>assembly.xml</descriptor> + </descriptors> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> </project> diff --git a/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh b/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh index 15c71c6938b..f3225d1ba57 100755 --- a/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh +++ b/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh @@ -4,7 +4,7 @@ # Resolve symlink (if any) and normalize path program=$(readlink -f "$0") program_dir=$(dirname "$program") -jarfile=$(readlink -f "$program_dir"/../../../target/vespaclient-java-jar-with-dependencies.jar) +jarfile=$(readlink -f "$program_dir"/../../../target/vespaclient-java-fat-with-provided.jar) if ! test -e "$jarfile" then |