groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wagenleitner <john.wagenleit...@gmail.com>
Subject Re: uninformative gradle error messages
Date Sat, 01 Oct 2016 22:20:31 GMT
On Tue, Sep 27, 2016 at 11:15 AM, John Wagenleitner <
john.wagenleitner@gmail.com> wrote:

> On Mon, Sep 26, 2016 at 12:14 PM, Jochen Theodorou <blackdrag@gmx.org>
> wrote:
>
>> Hi all,
>>
>> maybe some people here with more gradle knowledge can help me a bit. I am
>> trying to run the jigsaw-136 build, of which I know gradle has problems
>> with, but well I am trying to work around those. So I am starting our build
>> with
>>
>> GRADLE_OPTS="--add-exports-private java.base/java.lang=ALL-UNNAMED"
>>
>> and ./gradlew -S
>>
>> I get:
>>
>>> * Exception is:
>>> org.gradle.api.GradleException: Unable to start the daemon process.
>>> This problem might be caused by incorrect configuration of the daemon.
>>> For example, an unrecognized jvm option is used.
>>> Please refer to the user guide chapter on the daemon at
>>> https://docs.gradle.org/3.1/userguide/gradle_daemon.html
>>> Please read the following process output to find out more:
>>> -----------------------
>>>
>>> FAILURE: Build failed with an exception.
>>>
>>> * What went wrong:
>>> java.lang.ExceptionInInitializerError (no error message)
>>>
>>> * Try:
>>> Run with --stacktrace option to get the stack trace. Run with --info or
>>> --debug option to get more log output.
>>>
>>> at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaem
>>> onOutput(DaemonGreeter.java:34)
>>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>>> Process(DefaultDaemonStarter.java:152)
>>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>>> Daemon(DefaultDaemonStarter.java:135)
>>> at org.gradle.launcher.daemon.client.DefaultDaemonConnector.sta
>>> rtDaemon(DefaultDaemonConnector.java:203)
>>> at org.gradle.launcher.daemon.client.SingleUseDaemonClient.exec
>>> ute(SingleUseDaemonClient.java:52)
>>>
>>
>> Can anyone tell me how I can get further information about what actually
>> went wrong?
>>
>
>
>
> I get a little further by doing the following:
>
> 1.  export GRADLE_OPTS=--add-exports-private
> java.base/java.lang=ALL-UNNAMED --add-exports-private
> java.base/java.util=ALL-UNNAMED
>
> 2.  add the same options above to the "org.gradle.jvmargs" in
> gradle.properties
>
> 3.  in buildSrc/build.gradle add
>
> if (JavaVersion.current().java9Compatible) {
>     allprojects {
>         tasks.withType(GroovyCompile) {
>             groovyOptions.forkOptions.jvmArgs.addAll(['--add-exports-private',
> 'java.base/java.lang=ALL-UNNAMED'])
>         }
>         test {
>             jvmArgs '-addmods', 'java.xml.bind'
>         }
>     }
> }
>
> After that it starts to fail resolving methods used in the gradle build
> files.
>


After getting past the build issues above, the latest jigsaw builds
(ea-b138) cause method invocations to fail.  I think the following commit
[1] on master fixes this problem, but since Gradle is using 2.4.7 it fails
to evaluate the build files when they execute methods [2].

[1]
https://github.com/apache/groovy/commit/71e6258c8fcd8ae5bea1f5a4d708c42e6bf69519

[2]
https://github.com/apache/groovy/blob/f93cb30a45a7fbc5a44061837c83114c14bcb074/gradle/filter.gradle#L29

Mime
View raw message