首页 > 解决方案 > 无法将工件 org.grails.plugins:tomcat:zip:7.0.55.2 从/到 grailsCentral (https://repo.grails.org/grails/plugins)

问题描述

我从 git 下载了我的项目,当我编译时,我的错误是:

Resolve error obtaining dependencies: 
Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.55.2 from/to 
grailsCentral (https://repo.grails.org/grails/plugins)
Received fatal alert: protocol_version (Use --stacktrace to see the full trace)

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.javassist:javassist:jar:3.17.1-GA, com.bertramlabs.plugins:asset-pipeline-core:jar:2.1.1, org.springframework.security:spring-security-core:jar:3.2.3.RELEASE, org.springframework.security:spring-security-web:jar:3.2.3.RELEASE, org.springframework.security:spring-security-ldap:jar:3.2.0.RC1, org.quartz-scheduler:quartz:jar:2.2.1: Could not transfer artifact org.javassist:javassist:jar:3.17.1-GA from/to grailsCentral (https://repo.grails.org/grails/plugins): Received fatal alert: protocol_version
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
    ... 6 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.javassist:javassist:jar:3.17.1-GA from/to grailsCentral (https://repo.grails.org/grails/plugins): Received fatal alert: protocol_version
    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version

我正在使用 grails 2.5.0 和 JDK7,mu buildconfig:

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    grailsPlugins()
    grailsHome()
    mavenLocal()
    grailsCentral()
    mavenCentral()

    mavenRepo "http://repo.spring.io/milestone/"
    mavenRepo "https://repo.grails.org/grails/plugins"
}

plugins {
    // plugins for the build system only
    build ":tomcat:7.0.55.2" // or ":tomcat:8.0.20"

    // plugins for the compile step
    compile ":scaffolding:2.1.2"
    compile ':cache:1.1.8'
    compile ":asset-pipeline:2.1.5"

    runtime ":hibernate4:4.3.8.1"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"

    compile ":spring-security-core:2.0-RC4"
    compile ":spring-security-ldap:2.0-RC2"

    compile 'org.grails.plugins:quartz:1.0.2'
}

我认为存储库已关闭,但我尝试添加这一行,但我遇到了同样的问题:

mavenRepo "https://repo.grails.org/grails/core"

标签: mavengrails

解决方案


我从https://repo.grails.org/ui/native/plugins/org/grails/plugins下载插件,然后将其放在 maven 的默认本地存储库位置:

苹果电脑:

/Users/<username>/.m2/repository

然后导航到插件目录:/Users/<username>/.m2/repository/org.grails.plugins/tomcat/7.0.55.2

并放入 zip 文件:tomcat-7.0.55.2:zip

我看到了:https://howtodoinjava.com/maven/change-local-repository-location/

Windows 7的:

C:/Documents and Settings/<username>/.m2/repository

视窗 10:

C:/Users/<username>/.m2/repository

Linux:

/home/<username>/.m2/repository

苹果电脑:

/Users/<username>/.m2/repository

推荐阅读