Add build-checkpoints shell wrappers.

This commit is contained in:
Andreas Schildbach 2015-08-07 17:01:11 +02:00
parent 16465d9310
commit 0e7819d1bf
3 changed files with 55 additions and 6 deletions

13
tools/build-checkpoints Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
set -e
# Check if the jar has been built.
if [ ! -e target/build-checkpoints.jar ]; then
echo "Compiling BuildCheckpoints to a JAR"
cd ..
mvn package -DskipTests
cd tools
fi
java -jar target/build-checkpoints.jar "$@"

View file

@ -0,0 +1,18 @@
@echo off
rem Check if the jar has been built.
set TARGET_JAR=build-checkpoints.jar
if not exist "target/%TARGET_JAR%" goto BUILD
goto RUN
:BUILD
echo Compiling BuildCheckpoints to a JAR
cd ..
call mvn package -DskipTests
cd tools
:RUN
for /R "target/" %%F in (%TARGET_JAR%) do set JAR_NAME=%%~nxF
java -jar "target/%JAR_NAME%" %1 %2 %3 %4 %5 %6 %7 %8

View file

@ -52,19 +52,37 @@
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.bitcoinj.tools.WalletTool</mainClass>
</transformer>
</transformers>
<outputFile>target/wallet-tool.jar</outputFile>
</configuration>
<executions>
<execution>
<id>shade-wallet-tool</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.bitcoinj.tools.WalletTool</mainClass>
</transformer>
</transformers>
<outputFile>target/wallet-tool.jar</outputFile>
</configuration>
</execution>
<execution>
<id>shade-build-checkpoints</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.bitcoinj.tools.BuildCheckpoints</mainClass>
</transformer>
</transformers>
<outputFile>target/build-checkpoints.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>