Gradle文件定位问题

时间:2019-04-03 20:20:09

标签: java gradle gradlew

我有一组使用gradle来运行后端服务器的代码。我正在终端中运行gradle :bootRun。当我运行它时,它开始处理,然后引发有关文件位置的巨大错误。我什至可以解决这个问题。

Parallel execution is an incubating feature.

> Configure project :owf-example-widgets
Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
        at build_cnhv1cccaip845qupsm2wplss.run(C:\Users\ojandali\Desktop\ozone-temp-goss\ozone-framework-server\owf-framework\owf-example-widgets\build.gradle:31)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'owf-framework'.
> Could not resolve all files for configuration ':runtime'.
   > Could not find org.ozoneplatform:owf-appconfig:0.9.1-0.
     Searched in the following locations:
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.pom
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.jar
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.pom
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.jar
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.pom
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.jar
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.pom
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.jar
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.pom
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.jar
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.pom
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-appconfig/0.9.1-0/owf-appconfig-0.9.1-0.jar
     Required by:
         project :
   > Could not find org.ozoneplatform:owf-auditing:1.3.2-0.
     Searched in the following locations:
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.pom
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.jar
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.pom
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.jar
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.pom
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.jar
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.pom
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.jar
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.pom
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.jar
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.pom
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-auditing/1.3.2-0/owf-auditing-1.3.2-0.jar
     Required by:
         project :
   > Could not find org.ozoneplatform:owf-security:4.0.4-0.
     Searched in the following locations:
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.pom
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.jar
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.pom
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.jar
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.pom
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.jar
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.pom
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.jar
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.pom
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.jar
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.pom
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-security/4.0.4-0/owf-security-4.0.4-0.jar
     Required by:
         project :
   > Could not find org.ozoneplatform:owf-messaging:1.19.1-0.
     Searched in the following locations:
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.pom
         file:/C:/Users/ojandali/.m2/repository/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.jar
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.pom
         https://repo1.maven.org/maven2/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.jar
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.pom
         https://repo.grails.org/grails/core/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.jar
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.pom
         http://repository.springsource.com/maven/bundles/release/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.jar
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.pom
         http://repository.springsource.com/maven/bundles/external/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.jar
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.pom
         https://packages.atlassian.com/3rdparty/org/ozoneplatform/owf-messaging/1.19.1-0/owf-messaging-1.19.1-0.jar
     Required by:
         project :

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

* Get more help at https://help.gradle.org

BUILD FAILED in 10s

我试图弄清为什么找不到或找不到文件。

更新

这是build.gradle文件...我正在尝试运行gradle:bootRun

buildscript {
    ext {
        grailsVersion = '3.3.2'
        gormVersion = '6.1.8.RELEASE'
    }
    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" }
        maven { url 'https://repo.grails.org/grails/core' }
        jcenter()
    }
    dependencies {
        classpath group: 'io.spring.gradle', name: 'dependency-management-plugin', version: '1.0.4.RELEASE'

        classpath group: 'org.grails', name: 'grails-gradle-plugin', version: grailsVersion

        classpath group: 'org.grails.plugins', name: 'hibernate5', version: gormVersion - ".RELEASE"
        classpath group: 'org.grails.plugins', name: 'database-migration', version: '3.0.3'
    }
}


group 'org.ozoneplatform'
version '7.17.2-0'


apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'groovy'

apply plugin: 'war'

apply plugin: 'org.grails.grails-web'
apply plugin: 'org.grails.grails-gsp'


ext {
    releaseVersion = version.toString().replaceFirst("-", ".")

    tomcatBundleStaging = "$buildDir/staging/bundle"
}

repositories {
    mavenLocal()
    mavenCentral()
    maven { url 'https://repo.grails.org/grails/core' }
    maven { url 'http://repository.springsource.com/maven/bundles/release' }
    maven { url 'http://repository.springsource.com/maven/bundles/external' }
    maven { url 'https://packages.atlassian.com/3rdparty/' }
}

dependencyManagement {
    imports {
        mavenBom 'org.grails:grails-bom:' + grailsVersion
        mavenBom 'org.ozoneplatform:ozone-classic-bom:7.17.2-0'
    }

    applyMavenExclusions false
}

grails {
    plugins {
        compile project(':owf-example-widgets')
    }
}

configurations {
    customTomcat {}
    drivers {}
    runtime.extendsFrom drivers
}

dependencies {
    // Ozone
    compile group: 'org.ozoneplatform', name: 'owf-appconfig', version: '0.9.1-0'
    compile group: 'org.ozoneplatform', name: 'owf-auditing', version: '1.3.2-0'
    compile group: 'org.ozoneplatform', name: 'owf-security', version: '4.0.4-0'
    compile group: 'org.ozoneplatform', name: 'owf-messaging', version: '1.19.1-0'

    customTomcat(group: 'org.ozoneplatform', name: 'owf-custom-tomcat', version: '1.2.3-0') {
        artifact {
            name = 'owf-custom-tomcat'
            type = 'zip'
        }
    }

    // Spring Boot
    compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-logging'

    provided group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat'

    // Grails
    compile group: 'org.grails', name: 'grails-core'
    compile group: 'org.grails', name: 'grails-web-boot'
    compile group: 'org.grails', name: 'grails-logging'

    compile group: 'org.grails', name: 'grails-plugin-rest'
    compile group: 'org.grails', name: 'grails-plugin-databinding'
    compile group: 'org.grails', name: 'grails-plugin-i18n'
    compile group: 'org.grails', name: 'grails-plugin-services'
    compile group: 'org.grails', name: 'grails-plugin-url-mappings'
    compile group: 'org.grails', name: 'grails-plugin-interceptors'

    compile group: 'org.grails.plugins', name: 'cache'
    compile group: 'org.grails.plugins', name: 'cache-ehcache'
    compile group: 'org.ehcache', name: 'ehcache'

    compile group: 'org.grails.plugins', name: 'async'
    compile group: 'org.grails.plugins', name: 'scaffolding'
    compile group: 'org.grails.plugins', name: 'events'
    compile group: 'org.grails.plugins', name: 'hibernate5'
    compile group: 'org.grails.plugins', name: 'gsp'

    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind'

    console group: 'org.grails', name: 'grails-console'

    profile group: 'org.grails.profiles', name: 'web'

    runtime group: 'org.glassfish.web', name: 'el-impl'
    runtime group: 'com.h2database', name: 'h2'
    runtime group: 'org.apache.tomcat', name: 'tomcat-jdbc'

    drivers group: 'org.postgresql', name: 'postgresql'

    testCompile group: 'org.grails', name: 'grails-gorm-testing-support'
    testCompile group: 'org.grails', name: 'grails-web-testing-support'
    testCompile group: 'org.grails', name: 'grails-datastore-rest-client'

    testRuntime group: 'cglib', name: 'cglib-nodep'

    // Grails Plugins
    compile group: 'org.grails.plugins', name: 'converters'
    compile group: 'org.grails.plugins', name: 'quartz'
    compile group: 'org.grails.plugins', name: 'grails-pretty-time'

    // Other
    compile group: 'com.google.code.findbugs', name: 'jsr305'

    compile group: 'org.hibernate', name: 'hibernate-core'

    compile group: 'org.apache.httpcomponents', name: 'httpcore'
    compile group: 'org.apache.httpcomponents', name: 'httpclient'

    compile group: 'commons-fileupload', name: 'commons-fileupload'
}


bootRun {
    jvmArgs('-Dspring.output.ansi.enabled=always',
            '-Duser=testAdmin1',
            '-Dowf.db.init',
            '-Ddisable.auto.recompile=false',
            '-Xverify:none')

    addResources = false
}

war {
    // Exclude the Spring .xml configuration files from the .war
    // They will be copied to the Tomcat classpath at /tomcat/libs
    rootSpec.exclude('ozone/framework/**')
}

idea {
    module {
        excludeDirs += file('archive')
        excludeDirs += file('src/main/resources/public')
    }
}


apply from: 'gradle/create-bundle.gradle'

apply from: 'gradle/report-test-coverage.gradle'


task wrapper(type: Wrapper) {
    gradleVersion = '4.2.1'
}

1 个答案:

答案 0 :(得分:0)

我找不到

    compile group: 'org.ozoneplatform', name: 'owf-appconfig', version: '0.9.1-0'
    compile group: 'org.ozoneplatform', name: 'owf-auditing', version: '1.3.2-0'
    compile group: 'org.ozoneplatform', name: 'owf-security', version: '4.0.4-0'
    compile group: 'org.ozoneplatform', name: 'owf-messaging', version: '1.19.1-0'

在Maven Central上,我怀疑是问题所在,因为那是

它们似乎有不同的名称,请参见: https://search.maven.org/search?q=g:org.ozoneplatform

例如 compile group: 'org.ozoneplatform', name: 'ozone-security', version: '4.0.3' 应该可以。
您还可以自己构建缺少的依赖关系,例如通过检出此存储库并进行构建: https://github.com/ozoneplatform/owf-security