maven - 无法将工件 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"
解决方案
我从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
推荐阅读
- reactjs - Reducer 正在接收参数但什么也没做 ReactJS
- reactjs - PropTypes:PropTypes.array VS PropTypes.arrayOf(PropTypes.any)
- c++ - 使用 gnuPlot 在 C++ 中进行实时绘图
- python - 如何以迭代的方式用熊猫平均单个列中的两个值?
- html - 为什么空显示内联块元素创建高度但显示内联和显示块不?
- vb.net - 检查按钮是否为默认输入“接受按钮”以绘制更粗的边框
- netty - 如何通过 OpenJDK 1.8.0_252 在 Netty 中使用 ALPN
- react-native - 如何将状态数组上传到 Firestore 中的数组
- firefox - Firefox:中键单击工具栏按钮时出错
- spring-boot - 从 jms 消息侦听器重新启动 flowable 进程