Skip to content

Apache Lucene open-source search software

LUCENE-9372: gradlew does not run on cygwin (Peter Barna via Dawid Weiss)

Dawid Weisseebe40a2f54d
diff --git a/gradlew b/gradlew
index 0c9d74ad293..32be99f1d9a 100755
--- a/gradlew
+++ b/gradlew
@@ -103,6 +103,9 @@ location of your Java installation."
fi
# LUCENE-9266: verify and download the gradle wrapper jar if we don't have one.
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+fi
GRADLE_WRAPPER_JAR=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if ! $JAVACMD --source 11 $APP_HOME/buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java $GRADLE_WRAPPER_JAR ; then
exit $?
@@ -139,8 +142,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 13c2c4a1327..ab88bcb53db 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -118,6 +118,9 @@ Bug fixes
* LUCENE-9290: Don't assume that different XYPoint have different hash code
(Ignacio Vera via Mike Drob)
+* LUCENE-9372: Fix paths for cygwin/msys before gradle wrapper jar lookup.
+ (Peter Barna)
+
Other
* LUCENE-8768: Fix Javadocs build in Java 11. (Namgyu Kim)