Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':cargoRunLocal'. #152

Closed
keltik85 opened this issue Jul 17, 2016 · 8 comments
Closed

Execution failed for task ':cargoRunLocal'. #152

keltik85 opened this issue Jul 17, 2016 · 8 comments
Assignees

Comments

@keltik85
Copy link

I get this Error:

16:57:15: Executing external task 'cargoRunLocal'...
:cargoRunLocal FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cargoRunLocal'.
> org.codehaus.cargo.container.ContainerException: Cannot create configuration. There's no registered configuration for the parameters (container [id = [wildfly10x], type = [installed]], configuration type [standalone]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it?

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.119 secs
Cannot create configuration. There's no registered configuration for the parameters (container [id = [wildfly10x], type = [installed]], configuration type [standalone]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it?
16:57:16: External task execution finished 'cargoRunLocal'.

This is my current build.gradle:

group 'myGroupId'
version '1.0-SNAPSHOT'

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'idea'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.bmuschko:gradle-cargo-plugin:2.2.3'
    }
}
apply plugin: 'com.bmuschko.cargo'

cargo {
    containerId = 'wildfly10x'
    port = 8080

    deployable{
        file = file('build/libs/MyJeeTestApp-1.0-SNAPSHOT.war')
        context = 'myjavaeetestproject'
    }

    local{
        homeDir = file('C:/wildfly10')
        configHomeDir = file('C:/wildfly10/docs/examples/configs')
    }
}

dependencies {
    compile 'org.codehaus.groovy:groovy-all:2.3.11'

    compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.0-api', version: '1.0.1.Final'
    testCompile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.0-api', version: '1.0.1.Final'

    compile group: 'org.hibernate', name: 'hibernate-validator', version: '5.2.4.Final'
    testCompile group: 'org.hibernate', name: 'hibernate-validator', version: '5.2.4.Final'

    compile 'postgresql:postgresql:9.1-901-1.jdbc4'
    testCompile 'postgresql:postgresql:9.1-901-1.jdbc4'

    compile group: 'javax.inject', name: 'javax.inject', version: '1'
    testCompile group: 'javax.inject', name: 'javax.inject', version: '1'

    compile group: 'org.codehaus.cargo', name: 'cargo-core-uberjar', version: '1.5.0'

    testCompile group: 'junit', name: 'junit', version: '4.11'
}

What is wrong here ?

@bmuschko
Copy link
Owner

bmuschko commented Jul 17, 2016

Same issue as #149. You need to upgrade the Cargo version in your build configuration.

@keltik85
Copy link
Author

Thanks, at which position in the build.gradle file do i need to put it? Can you post the adapted version?

@bmuschko
Copy link
Owner

I updated my last comment. Please see the README.md.

@bmuschko
Copy link
Owner

Closing the issue. If you have additional question, please reopen.

@bmuschko bmuschko self-assigned this Jul 18, 2016
@keltik85
Copy link
Author

Sorry for reopening. I changed my build.gradle to this:

println GradleVersion.current()

group 'myGroupId'
version '1.0-SNAPSHOT'

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'war'

//this adds intellij specific gradle tasks
apply plugin: 'idea'

//this part imports the cargo plugin for gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.bmuschko:gradle-cargo-plugin:2.2.3'
    }
}
apply plugin: 'com.bmuschko.cargo'

//this part configures the cargo plugin to
//work with our previously installed WildFly Server
cargo {
    containerId = 'wildfly10x'
    port = 8080

    deployable{
        file = file('build/libs/MyJavaEETestProject-1.0-SNAPSHOT.war')
        context = 'myjavaeetestproject'
    }

    local{
        homeDir = file('C:/wildfly10')
    }
}

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.codehaus.groovy:groovy-all:2.3.11'

    compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.0-api', version: '1.0.1.Final'
    testCompile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.0-api', version: '1.0.1.Final'

    compile group: 'org.hibernate', name: 'hibernate-validator', version: '5.2.4.Final'
    testCompile group: 'org.hibernate', name: 'hibernate-validator', version: '5.2.4.Final'

    compile 'postgresql:postgresql:9.1-901-1.jdbc4'
    testCompile 'postgresql:postgresql:9.1-901-1.jdbc4'

    compile group: 'javax.inject', name: 'javax.inject', version: '1'
    testCompile group: 'javax.inject', name: 'javax.inject', version: '1'

    testCompile group: 'junit', name: 'junit', version: '4.11'
    def cargoVersion = '1.4.5'
    cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion",
            "org.codehaus.cargo:cargo-ant:$cargoVersion"
}

and i still get the same error. What can i do?

@bmuschko
Copy link
Owner

bmuschko commented Jul 18, 2016

You need to use a newer version of Cargo. The version you are using (1.4.5) is from 10/17/2013 and doesn't support Wildfly 10 yet.

@keltik85
Copy link
Author

keltik85 commented Jul 18, 2016

Which Version do i have to use?

2.2.3 does not work ----> Could not find org.codehaus.cargo:cargo-core-uberjar:2.2.3.

EDIT:

It worked with 1.5.0

@bmuschko
Copy link
Owner

The link I gave you in my last comment pointed to 1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants