我想分享我通过代理使用maven的经验.
您很可能会遇到异常和消息,例如:
repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection refused: connect
要么
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean- plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
如何配置Maven使用代理服务器?
我在 Nexus 中配置了一个存储库,其中包含不公开发布的项目,但需要从各种站点访问,因此无法在我的 LAN 上托管它。因此,我将它放在公共服务器上并在 Nexus 中设置存储库以要求用户名/密码访问,这工作正常。但是我不知道把 Maven 访问这个存储库的配置信息放在哪里...... Nexus 似乎不理解 HTTP 基本身份验证,所以我不能使用http://username:password@host/URL 格式来完成这项工作。那么我能做些什么来完成这项工作呢?