You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/03/30 15:15:26 UTC

DO NOT REPLY [Bug 46936] New: Launch ant in MSYS/MinGW environment (without Cygwin)

https://issues.apache.org/bugzilla/show_bug.cgi?id=46936

           Summary: Launch ant in MSYS/MinGW environment (without Cygwin)
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: clem.oudot@gmail.com


Hi,

I use MSYS/MinGW to run shell scripts calling "ant" and "mvn". This works for
"mvn" but not for "ant".

So I modify a little the ant script, using code from mvn script to manage MinGW
:

...

# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
mingw=false;
darwin=false;
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  MINGW*) mingw=true;;
  Darwin*) darwin=true
           if [ -z "$JAVA_HOME" ] ; then
             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
           fi
           ;;
esac

...

# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
  [ -n "$ANT_HOME" ] &&
    ANT_HOME="`(cd "$ANT_HOME"; pwd)`"
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi

...


Hope it helps

Clément OUDOT
LINAGORA

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46936] Launch ant in MSYS/MinGW environment (without Cygwin)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46936


Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.8.0
           Severity|normal                      |enhancement




--- Comment #1 from Stefan Bodewig <bo...@apache.org>  2009-04-09 06:52:22 PST ---
I have no way to test that your changes do anything - except that I can test
that they don't break anything for non-MingW systems.

They are in with svn revision 763652 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=763652 )

Let me note that there is some additional processing of CLASSPATH and related
variables in the Cygwin case (line 257ff in svn trunk).  The script assumes
they are Unix-style paths and will modify them using the Unix style which may
lead to wrong paths when invoking the Java executable further down.

I'd expect you to need similar constructs in the mingw case as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.