当前位置: 首页 > 知识库问答 >
问题:

Gradle文件定位问题

莘羽
2023-03-14

我有一套使用gradle运行后端服务器的代码。我正在终端中运行gradle:bootlun。当我运行它时,它开始处理,然后抛出关于文件位置的巨大错误。如果我能解决这个问题,我该怎么解决呢。

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

我正试图弄清楚为什么找不到这些文件。

使现代化

这就是构建。格雷德尔档案。。。我在试着跑gradle:Bootlun

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个答案

徐洋
2023-03-14

我找不到

    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

例如,编译组:org.ozoneplatform,名称:臭氧安全,版本:4.0.3应该可以工作。:https://github.com/ozoneplatform/owf-security

 类似资料:
  • 我有问题找到并打开一个文件,我已经存储在我的手机从我的电脑。尽管这个答案有很好的解决方案,但我还是无法让它工作。我在一台HTC Sensation Z710e上运行 下面是我试图运行的代码: 我用下面的代码做了第二次测试,我显然可以存储文件,因为文件名出现在文件列表中,但它似乎没有存储在SD卡上,至少没有显示为我的外部驱动器F:在我的pc.TPath。GetDocumentsPath应该指向SD卡

  • 使用 Project.file() 方法能够相对项目目录定位一个文件 例 16.1. 定位文件 build.gradle // 使用一个相对路径 File configFile = file('src/config.xml') // 使用一个绝对路径 configFile = file(configFile.absolutePath) // 使用一个项目路径的文件对象 configFile = f

  • 我使用下面的代码生成一个。apk文件,它工作得很好。但是,为了能够调试,我需要在“applicationvariants.all”周围注释代码,另一个明智的Android Studio说没有找到该文件。 我如何才能使它为generate.apk文件工作,并在Android Studio上调试? 更新 我发现发生了什么,实际上当我在文件名中使用日期和时间时,生成的文件中的时间与Android Stu

  • 好的,我有一个Jpanel,在下图中使用覆盖布局显示为白色。它包含一个包含图像(“无可用图像”)和JButton(“注释”)的ScrollPane。 我想把这个按钮放在JGroup的右下角。我尝试了多种布局方法,但似乎无法让它工作。最多按钮向东南移动大约3/4,我不知道为什么。 非常感谢任何帮助。。

  • 这里有人使用tailwindcss吗?作为一个无知的新手,有人能告诉我你如何访问显示更改的基本css文件吗。我正在使用vite、POSTSS和自动刷新器。 或者我如何建造它?

  • null 但是,如何和在哪里配置它呢?