我想运行一项需要使用一些Maven配置文件的自定义工作。
过去;一切正常,但是由于某种原因,它突然决定完全停止阅读个人资料。即使它在那里...
因此,在我的GLOBAL Maven(即C:/)的settings.xml文件中,我进行了以下设置:(出于明显的原因,删除了安全数据)
<server>
<id>[MY-ID]</id>
<username>[MY-USERNAME]</username>
<password>[MY-PASSWORD]</password>
</server>
....
<profile>
<id>[MY-PROFILE-ID]</id>
<repositories>
<repository>
<id>mulesoft</id>
<url>https://repository.mulesoft.org/nexus/content/repositories/public</url>
</repository>
<repository>
<id>[ANOTHER-PROFILE-ID]</id>
<url>[COMPANY-URL]</url>
</repository>
<repository>
<id>[ANOTHER-PROFILE-ID]</id>
<url>[COMPANY-URL]</url>
</repository>
<repository>
<id>[ANOTHER-PROFILE-ID]</id>
<url>[COMPANY-URL]</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray-vgs</id>
<url>https://dl.bintray.com/vg/vgs-oss</url>
</pluginRepository>
<pluginRepository>
<id>cdversion</id>
<url>https://github.com/beaverworks/cdversion-maven-extension/raw/repository</url>
</pluginRepository>
<pluginRepository>
<id>[ANOTHER-PROFILE-ID]</id>
<url>[COMPANY-URL]</url>
</pluginRepository>
</pluginRepositories>
</profile>
我已经在Eclipse中应用了这些设置,还尝试运行
mvn -P [MY-PROFILE-ID] clean package
但无济于事,我一次又一次看到相同的错误:
[ERROR] Failed to execute goal on project [MY-INSTALLATION-PROJECT]: Could not resolve dependencies for project [MY-INSTALLATION-PROJECT]: Failed to collect dependencies at [MAVEN-CUSTOM-SECURE-COMPANY-PACKAGE] -> [MAVEN-CUSTOM-SECURE-COMPANY-PACKAGE]: Failed to read artifact descriptor for [MAVEN-CUSTOM-SECURE-COMPANY-PACKAGE]: Could not transfer artifact [MAVEN-CUSTOM-SECURE-COMPANY-PACKAGE] from/to salient [COMPANY-URL]: Access denied to: [MAVEN-CUSTOM-SECURE-COMPANY-PACKAGE] -> [Help 1]
当我在打开错误(-e)的情况下运行此程序时,我看到它由于403而失败,这向我表明它没有正确提取配置文件:
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access denied to: [COMPANY-CUSTOM-MAVEN-PACKAGE]