You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by hi...@apache.org on 2011/09/25 12:43:17 UTC

svn commit: r1175380 - in /incubator/easyant/core/trunk/bin: easyant easyant.bat

Author: hibou
Date: Sun Sep 25 12:43:17 2011
New Revision: 1175380

URL: http://svn.apache.org/viewvc?rev=1175380&view=rev
Log:
IP cleanup: revert of easyant svn commit r517

Modified:
    incubator/easyant/core/trunk/bin/easyant
    incubator/easyant/core/trunk/bin/easyant.bat

Modified: incubator/easyant/core/trunk/bin/easyant
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/bin/easyant?rev=1175380&r1=1175379&r2=1175380&view=diff
==============================================================================
--- incubator/easyant/core/trunk/bin/easyant (original)
+++ incubator/easyant/core/trunk/bin/easyant Sun Sep 25 12:43:17 2011
@@ -21,6 +21,9 @@ if [ -z "$EASYANT_HOME" ]; then
     exit 3
 fi
 
+#set default EASYANT_ARGS
+EASYANT_ARGS="-lib $EASYANT_HOME/lib/easyant-core.jar -lib $EASYANT_HOME/lib/easyant-extra-modules.jar -lib $EASYANT_HOME/lib/ivy.jar -config-file $EASYANT_HOME/easyant-conf.xml -Dbasedir=. -main org.apache.easyant.core.EasyAntMain -Deasyant.home=$EASYANT_HOME $EASYANT_ARGS"
+
 # This part is fully inspirated by ant's script with some easyant customisation
 ant_exec_args=
 no_config=false
@@ -151,46 +154,13 @@ else
 fi
 
 # For Cygwin and Mingw, ensure paths are in UNIX format before
-# anything is touched.  we define a routine called 'normalize_path'
-# that can be used to switch paths to windows format before trying
-# to execute Java commands.
-
+# anything is touched
 if $cygwin ; then
-
   [ -n "$ANT_HOME" ] &&
     ANT_HOME=`cygpath --unix "$ANT_HOME"`
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-
-  # For Cygwin, switch paths to appropriate format before running java
-  # For PATHs convert to unix format first, then to windows format to ensure
-  # both formats are supported. Probably this will fail on directories with ;
-  # in the name in the path. Let's assume that paths containing ; are more
-  # rare than windows style paths on cygwin.
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-
-  normalize_path() {
-    local unix_val
-    if [ -n "$1" ]; then
-      unix_val=`cygpath --path --unix "$1"`
-      echo `cygpath --path --$format "$unix_val"`
-    else
-      echo $1
-    fi
-  }
-
-  CYGHOME=`cygpath --$format "$HOME"`
-else
-  # for other environments, this is just a no-op
-  normalize_path() {
-    echo $1
-  }
 fi
-
 if $mingw ; then
   [ -n "$ANT_HOME" ] &&
     ANT_HOME="`(cd "$ANT_HOME"; pwd)`"
@@ -200,6 +170,8 @@ fi
 
 ANT_LIB="${ANT_HOME}/lib"
 
+
+
 if [ -z "$JAVACMD" ] ; then
 
   # try in JAVA_HOME
@@ -245,12 +217,7 @@ fi
 # request optional jars and their dependencies via the OPT_JAR_LIST
 # variable
 if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
-
-  if $use_custom_ant; then
-    LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis):${EASYANT_BOOTSTRAP_PATH}"
-  else
-    LOCALCLASSPATH=${EASYANT_BOOTSTRAP_PATH}
-  fi
+  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
 
   # If no optional jars have been specified then build the default list
   if [ -z "$OPT_JAR_LIST" ] ; then
@@ -312,9 +279,9 @@ if $rpm_mode && [ -x /usr/bin/build-clas
 else
   # not using rpm_mode; use launcher to determine classpaths
   if [ -z "$LOCALCLASSPATH" ] ; then
-    LOCALCLASSPATH=${EASYANT_BOOTSTRAP_PATH}
+      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
   else
-    LOCALCLASSPATH=${EASYANT_BOOTSTRAP_PATH}:$LOCALCLASSPATH
+      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
   fi
 fi
 
@@ -336,12 +303,28 @@ if $usejikes; then
   ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
 fi
 
-ANT_HOME=$(normalize_path "$ANT_HOME")
-ANT_LIB=$(normalize_path "$ANT_LIB")
-JAVA_HOME=$(normalize_path "$JAVA_HOME")
-LOCALCLASSPATH=$(normalize_path "$LOCALCLASSPATH")
-CLASSPATH=$(normalize_path "$CLASSPATH")
-EASYANT_HOME=$(normalize_path "$EASYANT_HOME")
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+    format=mixed
+  else
+    format=windows
+  fi
+  [ -n "$ANT_HOME" ] && ANT_HOME=`cygpath --$format "$ANT_HOME"`
+  ANT_LIB=`cygpath --$format "$ANT_LIB"`
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+  if [ -n "$CLASSPATH" ] ; then
+    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+  fi
+  CYGHOME=`cygpath --$format "$HOME"`
+fi
 
 # Show script help if requested
 if $show_help ; then

Modified: incubator/easyant/core/trunk/bin/easyant.bat
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/bin/easyant.bat?rev=1175380&r1=1175379&r2=1175380&view=diff
==============================================================================
--- incubator/easyant/core/trunk/bin/easyant.bat (original)
+++ incubator/easyant/core/trunk/bin/easyant.bat Sun Sep 25 12:43:17 2011
@@ -33,7 +33,7 @@ goto end
 
 :run
 rem set the default parameters for easyant
-set EASYANT_ARGS=-Dbasedir=. -main org.apache.easyant.core.EasyAntMain -configfile %EASYANT_HOME%/easyant-conf.xml -Deasyant.home=%EASYANT_HOME% %EASYANT_ARGS%
+set EASYANT_ARGS=-lib "%EASYANT_HOME%\lib\easyant-core.jar" -lib "%EASYANT_HOME%\lib\easyant-extra-modules.jar" -lib "%EASYANT_HOME%\lib\ivy.jar" -Dbasedir=. -main org.apache.easyant.core.EasyAntMain -config-file %EASYANT_HOME%/easyant-conf.xml -Deasyant.home=%EASYANT_HOME% %EASYANT_ARGS%
 
 
 rem This part is fully inspirated by ant's script with some easyant customisation
@@ -119,7 +119,7 @@ goto stripClasspath
 :findAntHome
 rem find ANT_HOME if it does not exist due to either an invalid value passed
 rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%" goto checkJava
+if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
 
 rem check for ant in Program Files
 if not exist "%ProgramFiles%\ant" goto checkSystemDrive
@@ -188,14 +188,14 @@ goto runAntWithJikes
 if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
 
 :runAntWithJikesAndClasspath
-"%_JAVACMD%" %ANT_OPTS% %EASYANT_OPTS% -classpath "%EASYANT_BOOTSTRAP_PATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %EASYANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" %ANT_OPTS% %EASYANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %EASYANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
 rem Check the error code of the Ant build
 if not "%OS%"=="Windows_NT" goto onError
 set ANT_ERROR=%ERRORLEVEL%
 goto end
 
 :runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% %EASYANT_OPTS% -classpath "%EASYANT_BOOTSTRAP_PATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %EASYANT_ARGS% %ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" %ANT_OPTS% %EASYANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %EASYANT_ARGS% %ANT_CMD_LINE_ARGS%
 rem Check the error code of the Ant build
 if not "%OS%"=="Windows_NT" goto onError
 set ANT_ERROR=%ERRORLEVEL%