2 回答

TA貢獻1853條經驗 獲得超18個贊
我嘗試使用日食。我對同一個 POM 文件使用了 maven clean 和 install 。它工作正常。
C:\users\youruser\.m2\settings.xml
看來你的文件有問題。可能是阻止 maven 下載依賴項的代理問題。請檢查您的 settings.xml 文件。

TA貢獻1866條經驗 獲得超5個贊
它看起來像代理問題,它阻止了依賴項的下載,所以settings.xml如果不存在,請進行一些更改或創建一個。
去c:\users\youruser\.m2\settings.xml.
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<username>user</username> <!-- Put your username here -->
<password>pass</password> <!-- Put your password here -->
<host>123.45.6.78</host> <!-- Put the IP address of your proxy server here -->
<port>80</port> <!-- Put your proxy server's port number here -->
<nonProxyHosts>maven</nonProxyHosts> <!-- Do not use this setting unless you know what you're doing. -->
</proxy>
</proxies>
</settings>
添加回答
舉報