我目前面临以下的问题与Maven 3,当我试图建立的网站。 我会感激你对这个有帮助。
MVN清洁处
..........
[INFO] Reactor Summary:
[INFO]
[INFO] Project A ......................................... SUCCESS [15.383s]
[INFO] Project B ......................................... SUCCESS [2.232s]
[INFO] My Site ........................................... FAILURE [0.105s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.769s
[INFO] Finished at: Fri Jun 29 14:26:04 AMT 2012
[INFO] Final Memory: 18M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on project site: SiteToolException: Unable to read local module-POM: 1 problem was encountered while building the effective model for my.com:projA:0.1-SNAPSHOT
[ERROR] [FATAL] Non-resolvable parent POM: Could not find artifact my.com:parent-pom:pom:0.1-SNAPSHOT and 'parent.relativePath' points at no local POM @ line 12, column 13
[ERROR] for project my.com:projA:0.1-SNAPSHOT
.............
首先这里是配置:
Apache Maven 3.0.4 (r1232337; 2012-01-17 12:44:56+0400)
Java version: 1.7.0_04, vendor: Oracle Corporation
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.7.4", arch: "x86_64", family: "mac"
Nexus repository: 2.0.6
父POM:
<modelVersion>4.0.0</modelVersion>
<name>Parent POM</name>
<groupId>my.com</groupId>
<artifactId>parent-pom</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.1</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
聚集项目POM:
<modelVersion>4.0.0</modelVersion>
<name>My Site</name>
<groupId>my.com</groupId>
<artifactId>site</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>my.com</groupId>
<artifactId>parent-pom</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath/>
</parent>
<modules>
<module>projA</module>
<module>projB</module>
</modules>
项目A的POM:
<modelVersion>4.0.0</modelVersion>
<name>Project A</name>
<groupId>my.com</groupId>
<artifactId>projA</artifactId>
<version>0.1-SNAPSHOT</version>
<parent>
<groupId>my.com</groupId>
<artifactId>parent-pom</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath/>
</parent>
项目B的POM:
4.0.0
<name>Project B</name>
<groupId>my.com</groupId>
<artifactId>projB</artifactId>
<version>0.1-SNAPSHOT</version>
<parent>
<groupId>my.com</groupId>
<artifactId>parent-pom</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath/>
</parent>
这里是我运行“命令mvn干净的网站”的文件夹结构:
./pom.xml (aggregation project)
./projA/pom.xml (Project A)
./projB/pom.xml (Project B)
父POM是成功部署到NEXUS库执行前mvn clean site
用下面的命令mvn deploy -DaltDeploymentRepository=snapshots::default::http://MyServer:8081/nexus/content/repositories/snapshots
最后的问题本身:
当我运行mvn clean site
后立即父POM站点的部署成功建立。 如果我删除的文件夹(及其内容)“我”(它包含父-POM)从本地存储库(〜/ .m2目录/存储库),然后尝试建立与网站mvn clean site
我收到描述的错误开头。 其实Maven的下载从NEXUS父,聚甲醛。 我比较已部署之后已经产生和已经意识到,数人失踪,近到“0.1快照”文件夹,例如Maven的元数据local.xml中下载的文件和文件。
所以,当我试图运行从詹金斯我收到上述错误的网站建设工作,因为父POM是不是从那里詹金斯运行机部署。
我怎么能想出这个问题还是我做错了什么?
谢谢。