Create a lightly optimised, dedicated JAR for wallet-tool instead of the oddly named bitcoinj-tools-0.12.jar

This commit is contained in:
Mike Hearn 2014-08-05 15:42:29 +02:00
parent 918665a6e4
commit 6778a51d45
3 changed files with 12 additions and 12 deletions

View file

@ -33,13 +33,15 @@
<build>
<plugins>
<!-- Create wallet-tool.jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Remove dead classes -->
<minimizeJar>false</minimizeJar>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<!-- exclude signatures, the bundling process breaks them for some reason -->
@ -56,6 +58,7 @@
<mainClass>com.google.bitcoin.tools.WalletTool</mainClass>
</transformer>
</transformers>
<outputFile>target/wallet-tool.jar</outputFile>
</configuration>
<executions>
<execution>
@ -66,6 +69,7 @@
</execution>
</executions>
</plugin>
</plugins>
</build>

View file

@ -3,13 +3,11 @@
set -e
# Check if the jar has been built.
if [ ! -e target/bitcoinj-tools-*.jar ] || [[ "$ALWAYS_BUILD_WALLETTOOL" != "" ]]; then
if [ ! -e target/wallet-tool.jar ] || [[ "$ALWAYS_BUILD_WALLETTOOL" != "" ]]; then
echo "Compiling WalletTool to a JAR"
cd ../core
mvn install -DskipTests
cd ../tools
[ -e target/bitcoinj-tools-*.jar ] && rm target/bitcoinj-tools-*.jar
cd ..
mvn package -DskipTests
cd tools
fi
java -jar target/bitcoinj-tools-*.jar "$@"
java -jar target/wallet-tool.jar "$@"

View file

@ -1,6 +1,6 @@
@echo off
rem Check if the jar has been built.
set TARGET_JAR=bitcoinj-tools-*.jar
set TARGET_JAR=wallet-tool.jar
if not exist "target/%TARGET_JAR%" goto BUILD
if defined ALWAYS_BUILD_WALLETTOOL goto BUILD
@ -9,11 +9,9 @@ goto RUN
:BUILD
echo Compiling WalletTool to a JAR
cd ../core
call mvn install -DskipTests
cd ../tools
if exist "target/%TARGET_JAR%" del "target\%TARGET_JAR%"
cd ..
call mvn package -DskipTests
cd tools
:RUN