aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-feed-client-cli
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-06-14 16:42:18 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2021-06-14 16:42:18 +0200
commit92b628bcf0976673756566054566ca3a3476cb66 (patch)
treebda5612c3316eea78997a9ccb929fb69c5f68869 /vespa-feed-client-cli
parent5f2365e439a4e15b901397a1fcd2c0e79843fd43 (diff)
Package client with start script as zip artifact
Diffstat (limited to 'vespa-feed-client-cli')
-rw-r--r--vespa-feed-client-cli/pom.xml37
-rwxr-xr-xvespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh9
-rw-r--r--vespa-feed-client-cli/src/maven/create-zip.xml24
3 files changed, 58 insertions, 12 deletions
diff --git a/vespa-feed-client-cli/pom.xml b/vespa-feed-client-cli/pom.xml
index 9fd59f1cfa4..ebbea35f4a4 100644
--- a/vespa-feed-client-cli/pom.xml
+++ b/vespa-feed-client-cli/pom.xml
@@ -71,25 +71,38 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>ai.vespa.feed.client.CliClient</mainClass>
- </manifest>
- </archive>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <appendAssemblyId>false</appendAssemblyId>
- </configuration>
<executions>
<execution>
- <id>make-assembly</id>
+ <id>make-fatjar</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <attach>false</attach>
+ <archive>
+ <manifest>
+ <mainClass>ai.vespa.feed.client.CliClient</mainClass>
+ </manifest>
+ </archive>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ </execution>
+ <execution>
+ <id>make-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/maven/create-zip.xml</descriptor>
+ </descriptors>
+ </configuration>
</execution>
</executions>
</plugin>
diff --git a/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh b/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh
new file mode 100755
index 00000000000..57077205d18
--- /dev/null
+++ b/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+exec java \
+-Djava.awt.headless=true \
+-Xms128m -Xmx2048m \
+--add-opens=java.base/sun.security.ssl=ALL-UNNAMED \
+-Djava.util.logging.config.file=logging.properties \
+-cp vespa-feed-client-cli-jar-with-dependencies.jar ai.vespa.feed.client.CliClient "$@"
diff --git a/vespa-feed-client-cli/src/maven/create-zip.xml b/vespa-feed-client-cli/src/maven/create-zip.xml
new file mode 100644
index 00000000000..45bbbea9f2d
--- /dev/null
+++ b/vespa-feed-client-cli/src/maven/create-zip.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright Verizon Media. 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.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>zip</id>
+ <includeBaseDirectory>true</includeBaseDirectory>
+
+ <formats>
+ <format>zip</format>
+ </formats>
+ <files>
+ <file>
+ <source>${project.build.directory}/${project.artifactId}-jar-with-dependencies.jar</source>
+ </file>
+ <file>
+ <source>${project.basedir}/src/main/sh/vespa-feed-client-standalone.sh</source>
+ <destName>vespa-feed-client</destName>
+ </file>
+ <file>
+ <source>${project.basedir}/src/main/resources/logging.properties</source>
+ </file>
+ </files>
+</assembly>