我运行sudo ./mvnw clean install
使用此settings.xml
<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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>${user.home}/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<usePluginRegistry>false</usePluginRegistry>
<offline>false</offline>
</settings>
我有mvnw
这样的文件:https://github.com/takari/maven-wrapper/blob/master/mvnw
输出
[ERROR] Failed to execute goal on project X:
Could not resolve dependencies for project Y:Z:war:0.0.1-SNAPSHOT:
Failed to collect dependencies at com.octo.captcha:jcaptcha:jar:1.0 -> com.jhlabs:imaging:jar:01012005:
Failed to read artifact descriptor for com.jhlabs:imaging:jar:01012005: Could not transfer artifact com.jhlabs:imaging:pom:01012005 from/to 3rd-party
(http://forge.octo.com/archiva/repository/3rd-party): forge.octo.com: Name or service not known: Unknown host forge.octo.com: Name or service not known -> [Help 1]
但我在~/.m2/repository/...
本地粘贴了这些文件。