Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 226f47e

Browse files
author
Rajiv Senthilnathan
committed
Extract m2 cache just before build is started
Signed-off-by: Rajiv Senthilnathan <[email protected]>
1 parent 3372c7f commit 226f47e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/pfe/file-watcher/scripts/springScripts/spring-build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ pkill java
1616

1717
# Run a maven build to generate the new jar
1818
cd /root/app
19+
20+
if [ -f localm2cache.zip ]; then
21+
echo "Extracting maven m2 cache for $PROJECT_NAME"
22+
$JAVA_HOME/bin/jar -xf localm2cache.zip
23+
rm -f localm2cache.zip
24+
echo "Finished extracting maven m2 cache for $PROJECT_NAME"
25+
fi
26+
1927
echo "Running Maven build for $PROJECT_NAME"
2028
echo "mvn -Dmaven.repo.local=/root/app/.m2/repository -f ./pom.xml package -Dmaven.test.skip=true $MAVEN_SETTINGS --log-file "/root/logs/$MAVEN_BUILD.log""
2129
mvn -Dmaven.repo.local=/root/app/.m2/repository -f ./pom.xml package -Dmaven.test.skip=true $MAVEN_SETTINGS --log-file "/root/logs/$MAVEN_BUILD.log"

0 commit comments

Comments
 (0)