[java-identity-provider] branch main updated: Restore ant scripts for installer.

Scott Cantor cantor.2 at osu.edu
Fri May 12 13:54:00 UTC 2023


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=4f31aaaf9bdb40e9d33ed0dab006763e19189286

The following commit(s) were added to refs/heads/main by this push:
     new 4f31aaaf9 Restore ant scripts for installer.
4f31aaaf9 is described below

commit 4f31aaaf9bdb40e9d33ed0dab006763e19189286
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri May 12 09:53:34 2023 -0400

    Restore ant scripts for installer.
---
 idp-distribution/src/main/resources/bin/ant.bat | 40 ++++++++++++
 idp-distribution/src/main/resources/bin/ant.sh  | 84 +++++++++++++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/idp-distribution/src/main/resources/bin/ant.bat b/idp-distribution/src/main/resources/bin/ant.bat
new file mode 100644
index 000000000..c08a94822
--- /dev/null
+++ b/idp-distribution/src/main/resources/bin/ant.bat
@@ -0,0 +1,40 @@
+ at echo off
+setlocal
+
+REM Find the necessary resources
+set ANT_HOME=%~dp0
+
+REM strip trailing backslash - it confuses java.
+REM do it like this because embedding the strip inside an if causes problems if the name has a ")" in it. 
+if "%ANT_HOME:~-1%" NEQ "\" (
+   goto nostrip
+)
+set ANT_HOME=%ANT_HOME:~0,-1%
+:nostrip
+
+if defined INSTALL_LOG_FILE (
+   goto got_log
+)
+set INSTALL_LOG_FILE=%ANT_HOME%\install-log.xml
+:got_log
+
+REM We need a JVM
+if not defined JAVA_HOME  (
+  echo Error: JAVA_HOME is not defined.
+  exit /b
+)
+
+if not defined JAVACMD (
+  set JAVACMD="%JAVA_HOME%\bin\java.exe"
+)
+
+if not exist %JAVACMD% (
+  echo Error: JAVA_HOME is not defined correctly.
+  echo Cannot execute %JAVACMD%
+  exit /b
+)
+
+REM add in the dependency .jar files
+set LOCALCLASSPATH=%ANT_HOME%\..\bin\lib\*;%ANT_HOME%\..\webapp\WEB-INF\lib\*;%ANT_HOME%\..\dist\webapp\WEB-INF\lib\*;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;%CLASSPATH%
+
+%JAVACMD% -cp "%LOCALCLASSPATH%" -Dlogback.configurationFile="%INSTALL_LOG_FILE%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main -e -f "%ANT_HOME%/build.xml" %*
diff --git a/idp-distribution/src/main/resources/bin/ant.sh b/idp-distribution/src/main/resources/bin/ant.sh
new file mode 100755
index 000000000..658f20702
--- /dev/null
+++ b/idp-distribution/src/main/resources/bin/ant.sh
@@ -0,0 +1,84 @@
+#! /bin/sh
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true ;;
+esac
+
+#Find the necessary resources
+ANT_HOME=$0
+ANT_HOME=${ANT_HOME%/*}
+
+if [ -z "$JAVACMD" ] ; then 
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD=$JAVA_HOME/jre/sh/java
+    else
+      JAVACMD=$JAVA_HOME/bin/java
+    fi
+  else
+    JAVACMD=$(which java)
+  fi
+fi
+
+if [ -z "$INSTALL_LOG_FILE" ] ; then
+    INSTALL_LOG_FILE=$ANT_HOME/install-log.xml
+fi
+ 
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+if [ -n "$CLASSPATH" ] ; then
+  LOCALCLASSPATH=$CLASSPATH
+fi
+
+# add in the dependency .jar files
+LOCALCLASSPATH="${ANT_HOME}/../webapp/WEB-INF/lib/*":$LOCALCLASSPATH
+LOCALCLASSPATH="${ANT_HOME}/../dist/webapp/WEB-INF/lib/*":$LOCALCLASSPATH
+LOCALCLASSPATH="${ANT_HOME}/../bin/lib/*":$LOCALCLASSPATH
+
+if [ -n "$JAVA_HOME" ] ; then
+  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
+    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
+  fi
+
+  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
+    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
+  fi
+
+  # OSX hack to make Ant work with jikes
+  if $darwin ; then
+    OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
+    if [ -d ${OSXHACK} ] ; then
+      for i in ${OSXHACK}/*.jar
+      do
+        JIKESPATH=$JIKESPATH:$i
+      done
+    fi
+  fi
+fi
+
+# supply JIKESPATH to Ant as jikes.class.path
+if [ -n "$JIKESPATH" ] ; then
+  if [ -n "$ANT_OPTS" ] ; then
+    ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
+  else
+    ANT_OPTS=-Djikes.class.path=$JIKESPATH
+  fi
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
+  JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
+fi
+
+"$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Dlogback.configurationFile=$INSTALL_LOG_FILE $ANT_OPTS org.apache.tools.ant.Main -e -f "${ANT_HOME}/build.xml" "$@"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list