I tried to use "gradle -v" to verify my installation, but got this error:
-----------------------------------------------------------------------------
bash-3.2$ cd $GRADLE_HOME/samples/javaproject
bash-3.2$ gradle -v
/c/tools/java/gradle-0.1.3/bin/gradle: eval: line 169: syntax error near
unexpected token `('
/c/tools/java/gradle-0.1.3/bin/gradle: eval: line 169: `args0=cygpath
(cygwin) 1.42.4.1 Path Conversion Utility Copyright 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005 Red Hat, Inc. Compiled on Dec 14 2007'
Recursive: true
Buildfilename: gradlefile
================================================== Start building buildSrc
No build sources found.
:: loading settings :: url =
jar:file:/c:/tools/java/gradle-0.1.3/lib/ivy-2.0.0.beta2_20080305165542.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.gradle#build;SNAPSHOT
confs: [build]
++++ Starting build for primary task: clean
++ Loading Project objects
++ Configuring Project objects
Project=: evaluated.
++ Executing: clean Recursive:true Startproject: :
Executing: :clean
++++ Starting build for primary task: uploadLibs
++ Loading Project objects
++ Configuring Project objects
Project=: evaluated.
++ Executing: uploadLibs Recursive:true Startproject: :
Executing: :init
Executing: :resources
Executing: :compile
:: resolving dependencies :: org.gradle#buildSrc;SNAPSHOT
confs: [compile]
[mkdir] Created dir:
c:\tools\java\gradle-0.1.3\samples\javaproject\buildSrc\build\classes
[javac] Compiling 1 source file to
c:\tools\java\gradle-0.1.3\samples\javaproject\buildSrc\build\classes
Executing: :testResources
Executing: :testCompile
Executing: :test
Executing: :buildSrc_jar
[jar] Building jar:
c:\tools\java\gradle-0.1.3\samples\javaproject\buildSrc\build\buildSrc-SNAPSHOT.jar
Executing: :libs
Executing: :uploadLibs
Publishing configurations: ["libs"]
Publishing to Resolver build-resolver
published buildSrc to
c:\tools\java\gradle-0.1.3\samples\javaproject\build-resolver/org.gradle/buildSrc/SNAPSHOT/jars/buildSrc.jar
published ivy to
c:\tools\java\gradle-0.1.3\samples\javaproject\build-resolver/org.gradle/buildSrc/SNAPSHOT/ivys/ivy.xml
Check if build artifact exists:
c:\tools\java\gradle-0.1.3\samples\javaproject\build-resolver\org.gradle\buildSrc\SNAPSHOT\jars\buildSrc.jar
================================================== Finished building
buildSrc
:: resolving dependencies :: org.gradle#build;SNAPSHOT
confs: [build]
found commons-math#commons-math;1.1 in MavenRepo
found org.gradle#buildSrc;SNAPSHOT in build-resolver
downloading
http://repo1.maven.org/maven2/commons-math/commons-math/1.1/commons-math-1.1.jar
...
[SUCCESSFUL ] commons-math#commons-math;1.1!commons-math.jar
(532ms)
++++ Starting build for primary task:
++ Loading Project objects
++ Configuring Project objects
Project=: evaluated.
No project file available. Using empty script!
Project=:shared evaluated.
Project=:api evaluated.
No project file available. Using empty script!
Project=:services evaluated.
Project=:services:webapp1 evaluated.
Build aborted anormally. Run with -s option to get stacktrace. Run with
-d option to get all debug info including stacktrace. Run (additionally)
with -f option to get the full (very verbose) stacktrace
Exception: org.gradle.api.InvalidUserDataException: Name is not specified!
Total time: 11 seconds
Exit with error!
-----------------------------------------------------------------------------
Yes, I am running cygwin on a Windoze box. To fix, I changed this
loop as noted in the $GRADLE_HOME/bin/gradle script:
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a
condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
Without a fix, it seems that options were being passed along to
cygpath which returned its version (since it was passed -v in this
case). There's probably a better way to do this, but this worked for
me :-)
Now "gradle -v" works as expected:
------------------------------------------------------------------
bash-3.2$ gradle -v
Gradle 0.1.3
Gradle buildtime: Monday, April 28, 2008 2:04:06 PM CEST
Groovy 1.5.5
JVM 1.5.0_12-b04
JVM Vendor: Sun Microsystems Inc.
OS Name: Windows XP
------------------------------------------------------------------
Tom
This e-mail may contain data that is confidential, proprietary or
non-public personal information, as that term is defined in the
Gramm-Leach-Bliley Act (collectively, Confidential Information).
The Confidential Information is disclosed conditioned upon your
agreement that you will treat it confidentially and in accordance
with applicable law, ensure that such data isn't used or disclosed
except for the limited purpose for which it's being provided and
will notify and cooperate with us regarding any requested or
unauthorized disclosure or use of any Confidential Information.
By accepting and reviewing the Confidential information, you agree
to indemnify us against any losses or expenses, including
attorney's fees that we may incur as a result of any unauthorized
use or disclosure of this data due to your acts or omissions. If a
party other than the intended recipient receives this e-mail, he or
she is requested to instantly notify us of the erroneous delivery
and return to us all data so delivered.