JHipster配置maven包装代理
根据,我在/.m2/settings.xml中设置了代理设置,如下所示:JHipster配置maven包装代理,maven,https,proxy,jhipster,Maven,Https,Proxy,Jhipster,根据,我在/.m2/settings.xml中设置了代理设置,如下所示: <proxies> <proxy> <id>myId</id> <active>true</active> <protocol>http</protocol> <username>myDomain\myUsername</username>
<proxies>
<proxy>
<id>myId</id>
<active>true</active>
<protocol>http</protocol>
<username>myDomain\myUsername</username>
<password>myPassword</password>
<host>myHost</host>
<port>myPort</port>
</proxy>
</proxies>
在将以下参数传递给MAVEN_OPTS时,我成功地使其工作,但我只希望使用settings.xml文件
set MAVEN_OPTS=-Dhttps.proxyHost=myHost -Dhttps.proxyPort=myPort -Dhttps.proxyUser=myDomain\myUsername -Dhttps.proxyPassword=myPassword
有人能帮忙吗
提前感谢。似乎Maven包装器没有使用Maven设置中的代理变量。没有配置任何代理,因此这意味着必须使用Java系统属性。对于身份验证,它只查找系统属性
http.proxyUser
和
设置MAVEN_选项(正如您所提到的,也是如此)可以:
或
mvnw脚本还从项目路径拉入一个文件.mvn/jvm.config
,该文件可以包括以下属性:
-Dhttp.proxyHost=host
-Dhttp.proxyPort=port
-Dhttps.proxyHost=host
-Dhttps.proxyPort=port
-Dhttp.proxyUser=username
-Dhttp.proxyPassword=password
我打开了一个pull请求(),将此信息添加到JHipster文档中。在settings.xml中设置http是否正常,而在MAVEN_选项中使用https?MAVEN应该使用http处理https。无论如何,我试着把https,同样的错误。谢谢你的帮助!非常感谢你!jvm.config文件为我解决了这个问题。官方文档现在在引用中提到了它,该值应该是export-MAVEN_OPTS=“-Dhttp.proxyHost=proxyHost-Dhttp.proxyPort=8080-Dhttps.proxyHost=proxyHost-Dhttps.proxyPort=8080”
set MAVEN_OPTS=-Dhttp.proxyHost=proxyhost -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxyhost -Dhttps.proxyPort=8080
export MAVEN_OPTS=-Dhttp.proxyHost=proxyhost -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxyhost -Dhttps.proxyPort=8080
-Dhttp.proxyHost=host
-Dhttp.proxyPort=port
-Dhttps.proxyHost=host
-Dhttps.proxyPort=port
-Dhttp.proxyUser=username
-Dhttp.proxyPassword=password