Error: Could not determine dependencies of task :war

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: Could not determine dependencies of task :war

looper
This post has NOT been accepted by the mailing list yet.
Hi




i got this error when i try to build my project

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':war'.

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

BUILD FAILED




* Exception is:
org.gradle.api.GradleException: Could not determine the dependencies of task ':war'.
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:65)
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:53)
        at org.gradle.execution.DefaultTaskGraphExecuter.fillDag(DefaultTaskGraphExecuter.java:118)
        at org.gradle.execution.DefaultTaskGraphExecuter.addTasks(DefaultTaskGraphExecuter.java:71)
        at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:60)
        at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
        at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)
        at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:55)
        at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
        at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)
        at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:38)
        at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
        at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:302)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:286)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:53)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:51)
        at org.gradle.launcher.exec.Execution.execute(Execution.java:28)
        at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:39)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:51)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'default' not found.
        at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.createNotFoundException(DefaultConfigurationContainer.java:90)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:183)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.java:80)
        at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency.getProjectConfiguration(DefaultProjectDependency.java:70)
        at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency_Decorated.getProjectConfiguration(Unknown Source)
        at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency$TaskDependencyImpl.resolve(DefaultProjectDependency.java:158)
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:86)
        at org.gradle.api.internal.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:173)
        at org.gradle.api.internal.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:95)
        at org.gradle.api.internal.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:63)
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.doResolve(CachingTaskDependencyResolveContext.java:74)
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:63)
        ... 32 more



build.gradle


apply plugin: 'war'
apply plugin: 'cargo'

def buildName ="productInfo"
defaultTasks = ['war']

buildDir = 'target/gradle-build'




buildscript {
    repositories {
        add(new org.apache.ivy.plugins.resolver.URLResolver()) {
            name = 'GitHub'
            addArtifactPattern 'http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]'
        }
    }

    dependencies {
        classpath 'bmuschko:gradle-cargo-plugin:0.5.4'
    }
}

allprojects {
        repositories {
                mavenCentral()
        //      mavenLocal()
                mavenRepo name: 'jboss-nexus',urls: "https://repository.jboss.org/nexus/content/groups/public/"
        }

        javaVersion = '1.6'
}

libraryVersions = [
                        hibernate_validator: '4.1.0.Final', hibernate_commons_annotations: '3.2.0.Final', hibernate_entitymanager:'4.0.0-SNAPSHOT',
                        jboss_javaee_web_6_0: '2.0.0.Final',hibernate_envers:'4.0.0-SNAPSHOT'
                ]

configurations {
    compile
        compileOnly
}


sourceSets {
        main {
          java { srcDir 'JavaSource'}
          compileClasspath = configurations.compile + configurations.compileOnly
        }
}


war {

        from('JavaSource/') {
            include '*.properties'
                into 'WEB-INF/classes'
            }
        from ('WebContent') {
                include '**'
                exclude 'WEB-INF/lib/*'
        }
}

dependencies {

    def cargoVersion = '1.2.2'
    cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion",
          "org.codehaus.cargo:cargo-ant:$cargoVersion",
          "org.jboss.as:jboss-as-controller-client:7.1.0.Final"

        compile project(path:':green-ejb:workspace')

        compile fileTree(dir:'WebContent/WEB-INF/lib', includes:['*.jar'], excludes:['import/**'])

        compileOnly group: 'org.jboss.spec', name: 'jboss-javaee-web-6.0', version: libraryVersions.jboss_javaee_web_6_0
        compileOnly  group: 'org.hibernate', name: 'hibernate-validator', version: libraryVersions.hibernate_validator


        //using hibernate specific annotations
        compileOnly group: 'org.hibernate', name: 'hibernate-commons-annotations', version: libraryVersions.hibernate_commons_annotations

        //hibernate envers for logging and auditing
        compileOnly group: 'org.hibernate', name: 'hibernate-envers', version: libraryVersions.hibernate_envers

        //needed for custom PersistenceManager implementation
        compileOnly group: 'org.hibernate', name: 'hibernate-entitymanager', version: libraryVersions.hibernate_entitymanager

}

task wrapper(type: Wrapper) {
    gradleVersion = '1.0-milestone-9'
}



cargo {
    containerId = 'jboss71x'
    port = 8080
    deployable {
        context = archivesBaseName
    }

    remote {

          hostname = '********'
        username = '*****'
        password = '*****'
    }
}

   


Reply | Threaded
Open this post in threaded view
|

Re: Error: Could not determine dependencies of task :war

looper