Couldn't build using gradle - java

I'm newer using Gradle, I have this file build.gradle:
apply plugin: 'maven'
apply plugin: 'spring-boot'
group = "com.test.sample"
sourceCompatibility = 1.8
targetCompatibility = 1.8
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
repositories {
maven {
credentials {
username = nexusUsername
password = nexusPassword
}
url "${nexusUrl}/content/repositories/releases/ex--common/"
mavenCentral()
jcenter()
eventuateMavenRepoUrl.split(',').each { repoUrl -> maven { url repoUrl } }
}
}
dependencies {
compile "com.test.sample:EX--Common:${exCommonVersion}"
compile "com.test.sample:EX--CommonSwagger:${exCommonSwaggerVersion}"
compile("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
compile "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion"
compile "io.eventuate.local.java:eventuate-local-java-jdbc:${eventuateLocalVersion}"
compile "io.eventuate.local.java:eventuate-local-java-embedded-cdc-autoconfigure:${eventuateLocalVersion}"
testCompile "junit:junit:4.11"
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
testCompile "io.eventuate.client.java:eventuate-client-java-jdbc:$eventuateClientVersion"
}
I install gradle 3.4.1 in my machine. When I do
gradle build
or
gradle assemble
I get this error:
Failed to apply plugin [class 'io.spring.gradle.dependencymanagement.DependencyManagementPlugin']
Could not create task of type 'DependencyManagementReportTask'.
Would you have any ideas how I can fix that?
This is the stacktrace info:
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':xxx'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:176)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:181)
.....
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'io.spring.dependency-management']
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:155)
at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:44)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.java:34)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_cq297at3shymhbbwfq82eq5ag.run(C:\Users\xxx\build.gradle:13)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90)
... 62 more
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'DependencyManagementReportTask'.
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:123)
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:118)
at org.gradle.util.GUtil.uncheckedCall(GUtil.java:402)
at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:178)
at org.gradle.api.internal.project.taskfactory.TaskFactory.create(TaskFactory.java:118)
at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(TaskFactory.java:77)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.createTask(AnnotationProcessingTaskFactory.java:46)
at org.gradle.api.internal.project.taskfactory.DependencyAutoWireTaskFactory.createTask(DependencyAutoWireTaskFactory.java:39)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:76)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:111)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:141)
at org.gradle.api.internal.tasks.DefaultTaskContainer_Decorated.create(Unknown Source)
at org.gradle.api.internal.tasks.DefaultTaskContainer_Decorated$create.call(Unknown Source)
at io.spring.gradle.dependencymanagement.DependencyManagementPlugin.apply(DependencyManagementPlugin.groovy:64)
at io.spring.gradle.dependencymanagement.DependencyManagementPlugin.apply(DependencyManagementPlugin.groovy)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:139)
... 72 more
Caused by: org.gradle.internal.service.UnknownServiceException: No service of type StyledTextOutputFactory available in ProjectScopeServices.
at org.gradle.internal.service.DefaultServiceRegistry.getServiceProvider(DefaultServiceRegistry.java:436)
at org.gradle.internal.service.DefaultServiceRegistry.doGet(DefaultServiceRegistry.java:426)
at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:414)
at org.gradle.api.internal.DependencyInjectingInstantiator.convertParameters(DependencyInjectingInstantiator.java:81)
at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:54)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:121)
... 89 more
Best regards

Related

No signature of method is applicable for argument types when trying to publish to JCenter with gradle

I'm trying to publish my project to JCenter with gradle.
I'm getting this error:
$ ./gradlew bintrayUpload
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/tomcaflisch/my-project/build.gradle' line: 32
* What went wrong:
A problem occurred evaluating root project 'my-project'.
> No signature of method: build_1izvkzzfcfkppgubyut54udzf.bintray() is applicable for argument types: (build_1izvkzzfcfkppgubyut54udzf$_run_closure3) values: [build_1izvkzzfcfkppgubyut54udzf$_run_closure3#30577a07]
* 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 1s
Here's my build.gradle file
buildscript {
repositories {
maven { url "https://repo1.maven.org/maven2" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
plugins {
id "com.jfrog.bintray" version "1.8.5"
}
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
group = 'com.projectx'
version = '0.0.1'
repositories {
jcenter()
mavenCentral()
}
sourceSets {
main.java.srcDirs = ['src/main/java']
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['MyPublication']
pkg {
repo = 'maven'
name = 'project-x'
userOrg = 'myorg'
licenses = ['Proprietary']
vcsUrl = 'https://github.com/myorg/my-project.git'
version {
name = project.version
released new Date()
}
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId project.group
artifactId 'projectx'
version project.version
}
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'jacoco'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
install {
repositories.mavenInstaller {
pom.artifactId = 'projectx'
}
}
test {
finalizedBy jacocoTestReport // Report is always generated after tests run
}
jacocoTestReport {
dependsOn test // Tests are required to run before generating the report
reports {
xml.enabled true
}
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
dependencies {
compile 'io.swagger:swagger-annotations:1.5.22'
compile "com.google.code.findbugs:jsr305:3.0.2"
compile 'com.squareup.okhttp3:okhttp:3.14.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.14.2'
compile 'com.google.code.gson:gson:2.8.5'
compile 'io.gsonfire:gson-fire:1.8.3'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
testCompile 'junit:junit:4.13'
testCompile 'org.mockito:mockito-core:3.+'
testImplementation "com.google.truth:truth:1.0.1"
}
javadoc {
options.tags = [ "http.response.details:a:Http Response Details" ]
}
Bintray is dead.
But to answer the question, No signature of method: build_whatever.[method]() comes from something in the configuration of [method] being incorrect. In this case I'd guess it's caused by released new Date() which should probably be released = new Date()

Mixing Java and Kotlin with gradle - NoClassDefFoundError

I am trying to compile a gradle projet where I have mixed kotlin and java files under src/main/java and src/main/kotlin.
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version "1.3.41"
}
ext {
kotlinVersion = '1.3.41'
}
group 'github.littlechisels'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
}
sourceSets {
main.java.srcDirs = ['src/main/java']
main.kotlin.srcDirs = ['src/main/java', 'src/main/kotlin']
main.resources.srcDirs = []
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
...
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
testImplementation("org.junit.jupiter:junit-jupiter:5.5.0")
testRuntime ('org.junit.jupiter:junit-jupiter-engine:5.5.0')
testImplementation ('org.junit.jupiter:junit-jupiter-api:5.5.0')
test.useJUnitPlatform()
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
but build\classes\java\main is empty while kotlin one is not
Project builds fine with both IntelliJ and Gradle, but when I run littlechisels.main.Converter I get a NoClassDefFoundError about java classes :
Exception in thread "main" java.lang.NoClassDefFoundError: littlechisels/main/WorldSave
at littlechisels.main.Converter.main(Converter.kt:20)
Caused by: java.lang.ClassNotFoundException: littlechisels.main.WorldSave
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
Repo can be found here https://github.com/vinz243/littlechisels

Gradle Multi Module Product : Compiling module which depends on another

I am coming from Maven workd and new to Gradle.I have multi-module Gradle product with following modules:
"cdna-common"
'cdna-data-access'
"cdna-api-dto"
"cdna-api-module"
"cdna-request-executor-module"
my root settings.glade looks like this:
rootProject.name = 'cdna-one-platform'
include "cdna-common"
include 'cdna-data-access'
//include "cdna-api-dto" //commented temporary
include "cdna-api-module"
//include "cdna-request-executor-module" //commented temporary
gradle file for module 'cdna-data-access' is :
buildscript {
ext {
springBootVersion = '2.0.0.M6'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
ext['hibernate.version'] = '5.2.11.Final'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.company.cdna'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
jar {
baseName = 'cdna-one-data-access'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
a
dependencies {
compile('org.springframework.boot:spring-boot-starter')
compile('mysql:mysql-connector-java')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.hibernate:hibernate-search-orm')
compile group: 'org.hibernate', name: 'hibernate-search-orm' , version: '5.8.2.Final'
compile group: 'org.apache.lucene', name: 'lucene-analyzers-kuromoji' , version: '5.5.5'
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('com.h2database:h2')
}
Module 'cdna-common' depends on 'cdna-one-data-access' and gradle file looks like :
apply plugin: 'java'
apply plugin: 'eclipse'
group = 'com.company.cdna'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
jar {
baseName = 'cdna-one-commons'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
compile project(':cdna-data-access')
}
When I compile the module 'cdnHowever,cess' using 'gradlew cdna-data-access:build' , it compiles without any error.
However , when I try to compile the module 'cdna-common' using 'gradlew cdna-common:build' , it gives following error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':cdna-common:compileClasspath'.
> Could not find org.springframework.boot:spring-boot-starter:.
Searched in the following locations:
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter//spring-boot-starter-.pom
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter//spring-boot-starter-.jar
https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter//spring-boot-starter-.pom
https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter//spring-boot-starter-.jar
https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter//spring-boot-starter-.pom
https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter//spring-boot-starter-.jar
Required by:
project :cdna-common > project :cdna-data-access
> Could not find mysql:mysql-connector-java:.
Searched in the following locations:
https://repo1.maven.org/maven2/mysql/mysql-connector-java//mysql-connector-java-.pom
https://repo1.maven.org/maven2/mysql/mysql-connector-java//mysql-connector-java-.jar
https://repo.spring.io/snapshot/mysql/mysql-connector-java//mysql-connector-java-.pom
https://repo.spring.io/snapshot/mysql/mysql-connector-java//mysql-connector-java-.jar
https://repo.spring.io/milestone/mysql/mysql-connector-java//mysql-connector-java-.pom
https://repo.spring.io/milestone/mysql/mysql-connector-java//mysql-connector-java-.jar
Required by:
project :cdna-common > project :cdna-data-access
> Could not find org.springframework.boot:spring-boot-starter-data-jpa:.
Searched in the following locations:
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-data-jpa//spring-boot-starter-data-jpa-.pom
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-data-jpa//spring-boot-starter-data-jpa-.jar
https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-data-jpa//spring-boot-starter-data-jpa-.pom
https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-data-jpa//spring-boot-starter-data-jpa-.jar
https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-data-jpa//spring-boot-starter-data-jpa-.pom
https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-data-jpa//spring-boot-starter-data-jpa-.jar
Required by:
project :cdna-common > project :cdna-data-access
Any tips of what I am doing wrong?

Spring boot webflux application won't start IllegalStateException

Here is my build.gradle
buildscript {
ext {
springBootVersion = '2.0.0.M2'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-security',
'org.springframework.boot:spring-boot-starter-mail',
'org.springframework.boot:spring-boot-starter-validation',
'org.springframework.boot:spring-boot-starter-webflux',
// support libs
'commons-io:commons-io:2.5',
'commons-codec:commons-codec:1.10',
'org.apache.commons:commons-lang3:3.4',
'org.apache.commons:commons-collections4:4.1',
//validation
'javax.validation:validation-api:1.1.0.Final'
compileOnly 'org.springframework.boot:spring-boot-configuration-processor',
'org.projectlombok:lombok'
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
When I tried to run application it fails with java.lang.IllegalStateException: java.lang.NullPointerException
Stacktrace:
java.lang.IllegalStateException: java.lang.NullPointerException
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.stopAndReleaseReactiveWebServer(ReactiveWebServerApplicationContext.java:152) ~[spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:52) ~[spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M2.jar:2.0.0.M2]
at com.getcredit.bankscraper.Application.main(Application.java:10) [main/:na]
Caused by: java.lang.NullPointerException: null
at org.springframework.boot.web.embedded.netty.NettyWebServer.stop(NettyWebServer.java:113) ~[spring-boot-2.0.0.M2.jar:2.0.0.M2]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.stopAndReleaseReactiveWebServer(ReactiveWebServerApplicationContext.java:148) ~[spring-boot-2.0.0.M2.jar:2.0.0.M2]
... 7 common frames omitted
Project was generated via start.spring.io site.
After some tests, I've found out my problem. That was an NPE exception in init method of my bean annotated with #PostConstruct. You can reproduce this issue like this:
#Component
class Test {
String str;
#PostConstruct
private void init() {
System.out.println(str.length());
}
}
I don't understand why spring throws so unclear exception.

Can't build with gradle

What does this error msg mean?
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find com.jme3:xmlpull-xpp3:3.0.0.20140325-SNAPSHOT.
Searched in the following locations:
https://jcenter.bintray.com/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
https://jcenter.bintray.com/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
https://jcenter.bintray.com/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
https://repo1.maven.org/maven2/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
https://repo1.maven.org/maven2/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
https://repo1.maven.org/maven2/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/maven-metadata.xml
https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.pom
https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey/com/jme3/xmlpull-xpp3/3.0.0.20140325-SNAPSHOT/xmlpull-xpp3-3.0.0.20140325-SNAPSHOT.jar
Required by:
:spaceworld:unspecified > org.cogchar:ext.bundle.opengl.jmonkey:1.1.3
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
My build.gradle
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'idea'
mainClassName = 'spaceworld.SpaceUFO'
repositories {
jcenter()
}
ext.jmeVersion = "[3.1,)"
project(":assets") {
apply plugin: "java"
buildDir = rootProject.file("build/assets")
sourceSets {
main {
resources {
srcDir '.'
}
}
}
}
repositories {
mavenCentral()
maven {
url "https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet"
}
maven {
url "https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.jmonkey"
}
}
dependencies {
compile "org.jmonkeyengine:jme3-core:$jmeVersion"
compile "org.jmonkeyengine:jme3-desktop:$jmeVersion"
compile "org.jmonkeyengine:jme3-lwjgl:$jmeVersion"
compile "org.jmonkeyengine:jme3-blender:$jmeVersion"
compile "org.jmonkeyengine:jme3-bullet:$jmeVersion"
compile "org.jmonkeyengine:jme3-plugins:$jmeVersion"
compile "org.jmonkeyengine:jme3-networking:$jmeVersion"
compile group: "cz.advel.jbullet", name: "jbullet", version: "20101010"
compile group: "org.cogchar", name: "ext.bundle.opengl.jmonkey", version: "1.1.3"
compile files('libs/cai-nmgen-0.2.0.jar')
runtime project(':assets')
}
task wrapper(type: Wrapper) {
}
task createDirs << {
def pkg = 'spaceworld'
def dirs = [
file("./src/main/java/$pkg"),
file("./src/main/resources"),
file("./assets/Interface"),
file("./assets/MatDefs"),
file("./assets/Materials"),
file("./assets/Models"),
file("./assets/Scenes"),
file("./assets/Shaders"),
file("./assets/Sounds"),
file("./assets/Textures"),
]
dirs.each {
if (!it.exists()) {
println "Creating " + it
it.mkdirs()
}
if (it.listFiles().length == 0) {
def stub = new File(it, 'removeme.txt')
println "Creating stub file to allow git checkin, file:$stub"
stub.text = "Remove me when there are files here."
}
}
}
I don't understand how to add the dependency.
It means that the dependency com.jme3:xmlpull-xpp3:3.0.0.20140325-SNAPSHOT does not exist in the repositories you specified.
Possible reasons:
You misspelled the dependency.
You left out a repository.
Your local Maven repository or gradle cache are broken.
Consider looking at the dependency tree to figure out where this dependency comes from and what to do to resolve the issue.

Categories

Resources