Maven2 +在从站上进行分布式构建。
当我尝试在从站上构建项目时遇到问题。 我有一个 pom.xml ,其中包含类似的内容:
<?xml version="1.0" encoding="UTF-8"?>
<!--
author: xxx
version: $Id$
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.xxx</groupId>
<artifactId>website-parent</artifactId>
<version>1.0.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx</groupId>
<artifactId>xxx-web</artifactId>
<name>${pom.artifactId}</name>
<description>xxx web application</description>
<packaging>pom</packaging>
<version>2.1.2-SNAPSHOT</version>
<properties>
<package.installdir>/var/goom/www/xxx.com/${package.target}/ROOT</package.installdir>
</properties>
<scm>
<connection>scm:svn:https://xxx/svn/v3/code/websites/com/main/trunk</connection>
<developerConnection>scm:svn:https://xxx/svn/v3/code/websites/com/main/trunk</developerConnection>
<url>https://xxx/svn/v3/code/websites/com/main/trunk</url>
</scm>
</project>
构建工作在主服务器上运行得很好,但是在从服务器上,到达父服务器时存在问题:
[INFO] Unable to find resource 'com.xxx:website-parent:pom:1.0.4' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: com.xxx:xxx-barbershop:pom:2.1.2-SNAPSHOT
Reason: Cannot find parent: com.xxx:website-parent for project: com.xxx:xxx-barbershop:pom:2.1.2-SNAPSHOT for project com.xxx:xxx-barbershop:pom:2.1.2-SNAPSHOT
我是否需要在从服务器上配置某些内容来处理定义的父服务器对主人? (我不是专家专家......)
I experiencing an issue when tried to build a project on a slave.
I've got a pom.xml with something like that :
<?xml version="1.0" encoding="UTF-8"?>
<!--
author: xxx
version: $Id$
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.xxx</groupId>
<artifactId>website-parent</artifactId>
<version>1.0.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx</groupId>
<artifactId>xxx-web</artifactId>
<name>${pom.artifactId}</name>
<description>xxx web application</description>
<packaging>pom</packaging>
<version>2.1.2-SNAPSHOT</version>
<properties>
<package.installdir>/var/goom/www/xxx.com/${package.target}/ROOT</package.installdir>
</properties>
<scm>
<connection>scm:svn:https://xxx/svn/v3/code/websites/com/main/trunk</connection>
<developerConnection>scm:svn:https://xxx/svn/v3/code/websites/com/main/trunk</developerConnection>
<url>https://xxx/svn/v3/code/websites/com/main/trunk</url>
</scm>
</project>
The build work's very well on the master, however on the slave there is a problem to reach the parent :
[INFO] Unable to find resource 'com.xxx:website-parent:pom:1.0.4' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: com.xxx:xxx-barbershop:pom:2.1.2-SNAPSHOT
Reason: Cannot find parent: com.xxx:website-parent for project: com.xxx:xxx-barbershop:pom:2.1.2-SNAPSHOT for project com.xxx:xxx-barbershop:pom:2.1.2-SNAPSHOT
Do i need to configure something on the slave to handle with the parent defined on the master ?
( I'm not an maven expert ... )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在从站的本地存储库中安装父项目,就像在父项目上使用
mvn install
一样。You have to install the parent project in the slave's local repo, like with
mvn install
on the parent project.