]> source.dussan.org Git - pf4j.git/commitdiff
Improve run-demo scripts
authordecebals <decebal.suiu@gmail.com>
Tue, 19 Feb 2019 00:28:16 +0000 (02:28 +0200)
committerdecebals <decebal.suiu@gmail.com>
Tue, 19 Feb 2019 00:28:16 +0000 (02:28 +0200)
demo/plugins/pom.xml
run-demo.bat
run-demo.sh

index dc7a8fc01c915113bf094425d8378785c0289a80..446096411f023dad65dcdf92bb40839e9b6a17e9 100644 (file)
@@ -44,7 +44,7 @@
                     <descriptorRefs>
                         <descriptorRef>jar-with-dependencies</descriptorRef>
                     </descriptorRefs>
-                    <finalName>${project.artifactId}-${project.version}-plugin</finalName>
+                    <finalName>${project.artifactId}-${project.version}-all</finalName>
                     <appendAssemblyId>false</appendAssemblyId>
                     <attach>false</attach>
                     <archive>
index 1ef086b1493ab5149ce7219328f342d6056ad49a..6622d90a254ce75a3ddc30f86032f447ef741e9b 100644 (file)
@@ -12,17 +12,19 @@ mkdir demo-dist\plugins
 
 REM copy artifacts to demo-dist folder
 xcopy demo\app\target\pf4j-demo-app-*.zip demo-dist /s /i
-xcopy demo\plugins\plugin1\target\*plugin.jar demo-dist\plugins /s
-xcopy demo\plugins\plugin2\target\*plugin.jar demo-dist\plugins /s
+xcopy demo\plugins\plugin1\target\pf4j-demo-plugin1-*-all.jar demo-dist\plugins /s
+xcopy demo\plugins\plugin2\target\pf4j-demo-plugin2-*-all.jar demo-dist\plugins /s
 xcopy demo\plugins\enabled.txt demo-dist\plugins /s
 xcopy demo\plugins\disabled.txt demo-dist\plugins /s
 
 cd demo-dist
 
 REM unzip app
-unzip pf4j-demo-app-*.zip
-rm pf4j-demo-app-*.zip
+jar xf pf4j-demo-app-*.zip
+del pf4j-demo-app-*.zip
 
 REM run demo
-java -jar pf4j-demo-app-*-SNAPSHOT.jar
+rename pf4j-demo-app-*-SNAPSHOT.jar pf4j-demo.jar
+java -jar pf4j-demo.jar
+
 cd ..
index 01e6073daf40b8210b8ac8ca7f5fe9de72dd60c1..96ba79966ccc85834a06bed192e3f4b9052f6bd2 100755 (executable)
@@ -12,12 +12,20 @@ rm -fr demo-dist
 mkdir -p demo-dist/plugins
 
 # copy artifacts to demo-dist folder
-cp -r demo/app/target/pf4j-demo-*/* demo-dist/
-cp demo/plugins/*/target/*plugin.jar demo-dist/plugins/
+cp demo/app/target/pf4j-demo-*.zip demo-dist/
+cp demo/plugins/plugin1/target/pf4j-demo-plugin1-*-all.jar demo-dist/plugins/
+cp demo/plugins/plugin2/target/pf4j-demo-plugin2-*-all.jar demo-dist/plugins/
 cp demo/plugins/enabled.txt demo-dist/plugins/
 cp demo/plugins/disabled.txt demo-dist/plugins/
 
-# run demo
 cd demo-dist
-java -jar pf4j-demo-app-*-SNAPSHOT.jar
+
+# unzip app
+jar xf pf4j-demo-app-*.zip
+rm pf4j-demo-app-*.zip
+
+# run demo
+mv pf4j-demo-app-*-SNAPSHOT.jar pf4j-demo.jar
+java -jar pf4j-demo.jar
+
 cd -