teamcity 5.1 maven代理配置
我创建了一个新的构建配置并尝试运行它。但是,我遇到错误,指出在存储库中找不到工件。如果我从命令行为同一工作区运行 Maven 构建,则构建效果良好。代理配置已在 ./m2/settings.xml
中提到,设置文件已在构建配置中提到。我什至尝试将代理配置放置在 TeamCity\buildAgent\plugins\maven\conf\settings.xml 中,但似乎没有帮助。如果您有任何指示,请告诉我。
<代码> 引起原因:org.apache.maven.plugin.InvalidPluginException:无法为插件'org.apache.maven.plugins:maven-site-plugin'构建项目:POM'org.apache.maven.plugins:maven-site-plugin ' 在存储库中找不到:无法从任何存储库下载工件[16:59:48]:org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48] :来自指定的远程存储库:[16:59:48]:central (http://repo1.maven.org/maven2)[16:59:48]:对于项目org.apache.maven.plugins:maven-site -plugin[16:59:48]:在org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)[16:59:48]:在org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin( DefaultPluginManager.java:205)[16:59:48]:在 org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)[16:59:48]:在 org.apache.maven.plugin。 DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)[16:59:48]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)[16:59:48]: ... 19 更多[16:59:48]:引起:org.apache.maven.project.ProjectBuildingException:POM'org.apache.maven.plugins:maven-site-plugin'在存储库中找不到:无法从任何存储库下载工件[16:59:48]:org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]:来自指定的远程存储库:[16:59:48] :中央(http://repo1.maven.org/maven2)[16:59:48]:对于项目org.apache.maven.plugins:maven-site-plugin[16:59:48]:在org.apache .maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)[16:59:48]:在org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)[16:59:48]:在 org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)[16:59:48]: ... 23 更多[16:59:48]:引起:org.apache.maven.artifact .resolver.ArtifactNotFoundException:无法从任何存储库下载工件[16:59:48]:org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]:来自指定的远程存储库:[16:59:48]:central (http://repo1.maven.org/maven2)[16:59:48]:at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:228)[16:59:48]:在 org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)[16:59:48]:在 org.apache.maven .project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)[16:59:48]: ... 25 更多[16:59:48]:引起:org.apache.maven.wagon.ResourceDoesNotExistException:无法下载来自任何存储库的工件[16:59:48]:在 org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)[16:59:48]:在 org.apache.maven.artifact .resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)[16:59:48]: ... 27 更多
I created a new build configuration and tried to run the same. However I encounter errors saying the artifacts could not be found in the repository. If I run the maven build from command line for the same workspace, the build works well. The proxy configuration has been mentioned in ./m2/settings.xml
and the settings file has been mentioned in the build configuration. I tried even placing the proxy configuration in TeamCity\buildAgent\plugins\maven\conf\settings.xml
but it does not seem to help. Kindly let me know if you have any pointers.
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.apache.maven.plugins:maven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)[16:59:48]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)[16:59:48]: ... 19 more[16:59:48]: Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)[16:59:48]: ... 23 more[16:59:48]: Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)[16:59:48]: ... 25 more[16:59:48]: Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository[16:59:48]: at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)[16:59:48]: ... 27 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过在 Maven 安装中设置
settings.xml
例如,对于我的 TeamCity 安装
/usr/local/apache-maven/apache-maven-2.2.1/conf/settings.xml< /code>
不要忘记 TeamCity 可能会以其自己的用户身份运行,因此
~/.m2/settings.xml
可能不在您认为的位置。Have you tried setting the
settings.xml
within the Maven installatione.g. for my TeamCity installation
/usr/local/apache-maven/apache-maven-2.2.1/conf/settings.xml
Don't forget that TeamCity will probably be running as its own user, so
~/.m2/settings.xml
may not be where you think it is.