Gradle Exec 现在抛出 "error=2, No such file or directory"
Gradle Exec now throws "error=2, No such file or directory"
我有一个回购 https://github.com/ahoffer/geotools-tutorials。
我曾经能够 运行 ./gradlew installJar
而不会出错。
几个月过去了,./gradlew installJar
产生了:
Caused by: java.io.IOException: Cannot run program "mvn install:install-file -Dfile="lib/jai_core-1.1.3.jar.zip" -DgroupId=javax.media -DartifactId=jai-core -Dversion=1.1.3 -Dpackaging=jar" (in directory "/projects/geotools-tutorials"): error=2, No such file or directory
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
我可以将 commanLine 任务复制并粘贴到 shell 并且 运行 没问题:
/projects/geotools-tutorials$ mvn install:install-file
-Dfile="lib/jai_core-1.1.3.jar.zip" -DgroupId=javax.media -DartifactId=jai-core -Dversion=1.1.3 -Dpackaging=jar [INFO] BUILD SUCCESS
我不知道为什么它停止工作或如何让它再次工作。我在 Ubuntu 19.10.
Gradle 5.6.1
Build time: 2019-08-28 02:49:34 UTC
Revision: b6bd8e7934ca41d9e52610058aa7cb834df81fc4
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 11.0.5-ea (Ubuntu 11.0.5-ea+10-post-Ubuntu-0ubuntu1)
OS: Linux 5.3.0-24-generic amd64
我不知道您使用哪个版本的 gradle 来成功执行该任务,但这是构建 commandLine
:
的方式
commandLine 'mvn', 'install:install-file', '-Dfile=lib/jai_core-1.1.3.jar.zip', '-DgroupId=javax.media', '-DartifactId=jai-core', '-Dversion=1.1.3', '-Dpackaging=jar'
经过测试并适用于 gradle 5.5
我有一个回购 https://github.com/ahoffer/geotools-tutorials。
我曾经能够 运行 ./gradlew installJar
而不会出错。
几个月过去了,./gradlew installJar
产生了:
Caused by: java.io.IOException: Cannot run program "mvn install:install-file -Dfile="lib/jai_core-1.1.3.jar.zip" -DgroupId=javax.media -DartifactId=jai-core -Dversion=1.1.3 -Dpackaging=jar" (in directory "/projects/geotools-tutorials"): error=2, No such file or directory
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
我可以将 commanLine 任务复制并粘贴到 shell 并且 运行 没问题:
/projects/geotools-tutorials$ mvn install:install-file -Dfile="lib/jai_core-1.1.3.jar.zip" -DgroupId=javax.media -DartifactId=jai-core -Dversion=1.1.3 -Dpackaging=jar [INFO] BUILD SUCCESS
我不知道为什么它停止工作或如何让它再次工作。我在 Ubuntu 19.10.
Gradle 5.6.1
Build time: 2019-08-28 02:49:34 UTC
Revision: b6bd8e7934ca41d9e52610058aa7cb834df81fc4
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 11.0.5-ea (Ubuntu 11.0.5-ea+10-post-Ubuntu-0ubuntu1)
OS: Linux 5.3.0-24-generic amd64
我不知道您使用哪个版本的 gradle 来成功执行该任务,但这是构建 commandLine
:
commandLine 'mvn', 'install:install-file', '-Dfile=lib/jai_core-1.1.3.jar.zip', '-DgroupId=javax.media', '-DartifactId=jai-core', '-Dversion=1.1.3', '-Dpackaging=jar'
经过测试并适用于 gradle 5.5