Merge branch 'releases/Release_2_11_4_Branch'
[jalview.git] / getdown / src / getdown / mvn_cmd
index 0cd54eb..cd2a39a 100755 (executable)
@@ -3,7 +3,7 @@
 if [ x$JVLVERSION != x ]; then
   export VERSION=$JVLVERSION
 else
-  export VERSION=1.8.3-1.1.8_JVL
+  export VERSION=1.8.3-1.5.3_JVL
 fi
 
 if [ x${VERSION%_JVL} = x$VERSION ]; then
@@ -12,6 +12,18 @@ fi
 
 echo "Setting VERSION to '$VERSION'"
 perl -p -i -e 's|(<version>)[^<]*JVL[^<]*(</version>)|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
+
+echo "Making sure jalview classes are up-to-date"
+for x in $(find core/src/main/java/jalview launcher/src/main/java/jalview -name "*.java")
+do
+  y=${x##*java/}
+  if [ -e "../../../src/${y}" ]; then
+    echo /bin/cp "../../../src/${y}" "${x}"
+    /bin/cp "../../../src/${y}" "${x}"
+  else
+    echo "'../../../src/${y}' doesn't exist, not copying"
+  fi
+done
 mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -Dallow_file_protocol=false -Dconnect_timeout=8 -Dread_timeout=15
 RET=$?
 if [ x$RET = x0 ]; then
@@ -19,6 +31,7 @@ if [ x$RET = x0 ]; then
   cp core/target/getdown-core-$VERSION.jar ../../../getdown/lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to getdown/lib"
   cp core/target/getdown-core-$VERSION.jar ../../../j8lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to j8lib"
   cp core/target/getdown-core-$VERSION.jar ../../../j11lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to j11lib"
+  echo "$VERSION" > ../../../getdown/lib/JVL_VERSION
 fi
 
 VERSION=${VERSION/JVL/FJVL}
@@ -28,4 +41,5 @@ mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -Dallow_file_pr
 RET=$?
 if [ x$RET = x0 ]; then
   cp launcher/target/getdown-launcher-$VERSION.jar ../../../getdown/lib/getdown-launcher-local.jar && echo "Copied getdown-launcher-$VERSION.jar to getdown/lib/getdown-launcher-local.jar"
+  echo "$VERSION" > ../../../getdown/lib/FJVL_VERSION
 fi