0
我尝试在从站上构建项目时遇到问题。 我有喜欢的东西是一个pom.xml:Maven2 +分布式构建于从站上。
<?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
我是否需要在从站上配置某些内容以处理主站上定义的父项? (我不是Maven专家...)
嗯,我认为你绝对正确,但我不知道如何使这个技巧:D我尝试了这样的事情:mvn安装网站 - 父母,但我卡住了! –
好的,我回答自己...我需要配置settings.xml文件和security-settings.xml(由加密的密码引起)并且它似乎工作正常。 –