Untitled conversation
- User
[ERROR] Failed to execute goal on project endowment-server-archive-building: Could not resolve dependencies for project com.bluebalance:endowment-server-archive-building:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.deepoo ve:poi-tl:jar:1.12.1 -> org.apache.xmlgraphics:batik-codec:jar:1.14 -> org.apache.xmlgraphics:batik-bridge:jar:1.14 -> org.apache.xmlgraphics:batik-anim:jar:1.14 -> org.apache.xmlgraphics:batik-dom:jar:1.14 -> xalan:xalan:jar:2.7.2: Failed to read artifact descriptor for xalan:xalan:jar:2.7.2: Could not transfer artifact xalan:xalan:pom:2.7.2 from/to nexus-aliyun (https://maven.aliyun.com/nexus/content/groups/public): transfer failed for https://maven.aliyun.c om/nexus/content/groups/public/xalan/xalan/2.7.2/xalan-2.7.2.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project endowment-server-archive-building: Could not resolve dependencies for project com.bluebalance:endowment-server-archive-building:jar:1.0-SNAPSH OT: Failed to collect dependencies at com.deepoove:poi-tl:jar:1.12.1 -> org.apache.xmlgraphics:batik-codec:jar:1.14 -> org.apache.xmlgraphics:batik-bridge:jar:1.14 -> org.apache.xmlgraphics:batik-anim:jar:1.14 -> org.apache.xmlgraph ics:batik-dom:jar:1.14 -> xalan:xalan:jar:2.7.2
- Assistant
This error message indicates that there was a problem resolving dependencies for the project "endowment-server-archive-building". The project requires the library "poi-tl" which in turn requires the library "xalan", specifically version 2.7.2. However, there was an issue with downloading the artifact descriptor for xalan 2.7.2 from the remote repository "https://maven.aliyun.com/nexus/content/groups/public". The cause of the issue may be due to an unexpected error with the security certificate for the repository.
- User
[ERROR] Failed to execute goal on project endowment-server-archive-building: Could not resolve dependencies for project com.bluebalance:endowment-server-archive-building:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.deepoo ve:poi-tl:jar:1.12.1 -> org.apache.xmlgraphics:batik-codec:jar:1.14 -> org.apache.xmlgraphics:batik-bridge:jar:1.14 -> org.apache.xmlgraphics:batik-anim:jar:1.14 -> org.apache.xmlgraphics:batik-dom:jar:1.14 -> xalan:xalan:jar:2.7.2: Failed to read artifact descriptor for xalan:xalan:jar:2.7.2: Could not transfer artifact xalan:xalan:pom:2.7.2 from/to nexus-aliyun (https://maven.aliyun.com/nexus/content/groups/public): transfer failed for https://maven.aliyun.c om/nexus/content/groups/public/xalan/xalan/2.7.2/xalan-2.7.2.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project endowment-server-archive-building: Could not resolve dependencies for project com.bluebalance:endowment-server-archive-building:jar:1.0-SNAPSH OT: Failed to collect dependencies at com.deepoove:poi-tl:jar:1.12.1 -> org.apache.xmlgraphics:batik-codec:jar:1.14 -> org.apache.xmlgraphics:batik-bridge:jar:1.14 -> org.apache.xmlgraphics:batik-anim:jar:1.14 -> org.apache.xmlgraph ics:batik-dom:jar:1.14 -> xalan:xalan:jar:2.7.2 應該如何解決
- Assistant
此错误指示无法解析项目“endowment-server-archive-building”的依赖项,项目需要库“poi-tl”,这库又需要库“xalan”,特别是版本2.7.2。 但是,从远程存储库“https://maven.aliyun.com/nexus/content/groups/public”下载xalan 2.7.2的工件描述符时出了问题。这个问题的原因可能是存储库的安全证书出了问题,或者是本机计算机上的Java安装配置出了问题,例如未正确设置JAVA_HOME或JRE_HOME环境变量或证书可信任存储失败。
可以尝试以下步骤解决问题:
-
确保计算机与远程存储库的连接正常,检查您的网络连接是否正常
-
确保Java安装配置正确,并设置JAVA_HOME和JRE_HOME环境变量
-
重新下载失败的依赖项,可以尝试重启软件或清理本地Maven存储库,重新构建依赖项
-
如果步骤1-3无法解决问题,则考虑将存储库更改为其他可靠的存储库。
-
- User
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true 可以加入到maven的配置文件中吗
- Assistant
可以,可以将以下内容添加到Maven的settings.xml文件中:
<settings> ... <servers> ... <server> <id>nexus-aliyun</id> <username>your-username</username> <password>your-password</password> <configuration> <httpConfiguration> <all> <usePreemptive>true</usePreemptive> </all> </httpConfiguration> <wagonProvider>httpclient</wagonProvider> <httpHeaders> <property> <name>Connection</name> <value>close</value> </property> </httpHeaders> <ssl> <allowUnsafeRenegotiation>true</allowUnsafeRenegotiation> <useHttps>true</useHttps> <noCertCheck>true</noCertCheck> </ssl> </configuration> </server> ... </servers> ... </settings>将“id”与远程存储库的ID相对应,将“username”和“password”更改为您的凭据。该配置文件指定忽略SSL证书错误并允许使用所有SSL协议。注意,这种做法的安全性会有所降低,因此应谨慎使用此选项。