Gradle Build Failure


(ArchaB) #1

I am trying to build a package on Ubuntu15.10. When trying to build my project using he command

./gradlew clean build

I get the following exception and build fails
02:04:06.185 [ERROR] [org.gradle.BuildExceptionReporter]
02:04:06.186 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
02:04:06.186 [ERROR] [org.gradle.BuildExceptionReporter]
02:04:06.187 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
02:04:06.187 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring project ‘:pytheas-core’.
02:04:06.187 [ERROR] [org.gradle.BuildExceptionReporter] > Failed to notify project evaluation listener.
02:04:06.187 [ERROR] [org.gradle.BuildExceptionReporter] > Can’t obtain static newInstance method for class com.sun.jna.Structure
02:04:06.188 [ERROR] [org.gradle.BuildExceptionReporter] > Could not initialize class nebula.plugin.info.ci.POSIXUtil
02:04:06.188 [ERROR] [org.gradle.BuildExceptionReporter] > Could not initialize class nebula.plugin.info.ci.POSIXUtil
02:04:06.188 [ERROR] [org.gradle.BuildExceptionReporter]
02:04:06.188 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
02:04:06.189 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ‘:pytheas-core’.
02:04:06.190 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:91)
02:04:06.190 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:86)
02:04:06.190 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:65)
02:04:06.190 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)
02:04:06.190 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)
02:04:06.191 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskP

My main project is pytheas and it has pythaeas-core as a subfolder in the main pytheas folder.

settings.gradle is as follows
rootProject.name='pytheas’
include ‘pytheas-core’

build.gradle has
project(’:pytheas-core’) {
** dependencies {**
** compile ‘commons-configuration:commons-configuration:1.8’**
** compile ‘com.google.guava:guava:18.0’**
** compile ‘com.google.inject.extensions:guice-servlet:4.0’**
** compile ‘org.codehaus.jettison:jettison:1.3.7’**
** compile ‘javax.servlet:servlet-api:2.5’**
** compile ‘com.sun.jersey:jersey-server:1.19’**
** compile ‘org.codehaus.jackson:jackson-mapper-asl:1.9.13’**
** compile ‘com.google.code.findbugs:annotations:2.0.0’**
** compile ‘org.freemarker:freemarker:2.3.15’**
** compile ‘com.netflix.archaius:archaius-core:0.7.3’**
** compile ‘com.netflix.governator:governator:1.11.0’**
** compile ‘commons-collections:commons-collections:3.2.1’**
** compile ‘commons-codec:commons-codec:1.7’**
** compile ‘com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2’**
** compile ‘commons-beanutils:commons-beanutils:1.9.1’**
** compile ‘commons-io:commons-io:2.4’**

** runtime ‘com.sun.jersey:jersey-servlet:1.19’**
** }**

}

Am I missing on something?


(Stefan Oehme) #2

Well, by simply looking at the Stacktrace you can see that the error is thrown by the Netflix gradle-info-plugin. So you should ask on their issue tracker to get an answer/fix.