[MacPorts] #56768: Gradle init fails
MacPorts
noreply at macports.org
Tue Jul 3 21:41:31 UTC 2018
#56768: Gradle init fails
--------------------+--------------------
Reporter: l-g | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: gradle
--------------------+--------------------
I am following the instructions here
https://developers.google.com/drive/api/v3/quickstart/java
After installing Gradle MacPorts suggest that I set the GRADLE_HOME
variable to
{{{
/opt/local/share/java/gradle
}}}
, which I did. I also added
{{{
/opt/local/share/java/gradle/bin/
}}}
to my PATH.
I then run
{{{
gradle init --type basic
}}}
as per the instructions on the linked page. The result is a failure:
{{{
$ gradle init --type basic
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using
BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using
BuildSessionScopeServices.createFileSnapshotter().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
}}}
I then tried running it as root since some googling indicated that gradle
needs permission to write in the GRADLE_HOME directory but that also
failed even though the error message was a bit different
{{{
$ sudo gradle init --type basic
Password:
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :wrapper FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':wrapper'.
> Cannot write to file '/opt/local/bin/gradle/wrapper/gradle-wrapper.jar'
specified for property 'jarFile', as ancestor '/opt/local/bin/gradle' is
not a directory.
> Cannot write to file '/opt/local/bin/gradle/wrapper/gradle-
wrapper.properties' specified for property 'propertiesFile', as ancestor
'/opt/local/bin/gradle' is not a directory.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
1 actionable task: 1 executed
}}}
Is the problem gradle or MacPorts? If the problem is with gradle, I still
think the instructions showed at the end of the installation are wrong,
they should mention that root is required.
Do you need some more information? Such as stacktraces or other debug
information from the init process.
--
Ticket URL: <https://trac.macports.org/ticket/56768>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list