我们的项目团队希望从我们的构建和CI切换到ant,然后按照Sonatype“Maven By Example”一书来掌握它。
我正在使用m2e,m2e安装内部maven。
我使用maven-archetype-quickstart创建了一个项目,但没有以任何方式修改它。它构建得很好,但是当我以...为目标运行时,在我的项目的目标文件夹或我能找到的任何其他地方都没有产生任何东西。这是输出:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building quickstart 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-site-plugin:2.0.1:site (default-site) @ quickstart ---
Downloading: http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default- skin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml (370 B at 2.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.759s
[INFO] Finished at: Fri May 25 08:46:54 BST 2012
[INFO] Final Memory: 10M/110M
[INFO] ------------------------------------------------------------------------
这是因为我使用的是内部m2e maven吗?我需要单独安装maven吗?
答案 0 :(得分:0)
首先,根据我的经验,使用m2e的外部Maven安装绝对是个好主意。我有一些嵌入式Maven的麻烦(其他类型),我不推荐使用它。
现在关于你的问题:我不知道它是m2e的嵌入式Maven还是某种你的错误或误解,但我刚刚使用相同的quickstart原型生成了简单的项目,一切正常。我有这样的输出:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tester 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-site-plugin:3.0:site (default-site) @ tester ---
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.4
[INFO] Relativizing decoration links with respect to project URL: http://maven.apache.org
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "Distribution Management" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "About" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Dependencies" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Issue Tracking" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Plugins" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Continuous Integration" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project License" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Mailing Lists" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Team" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Source Repository" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Plugin Management" report --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Summary" report --- maven-project-info-reports-plugin:2.4
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.046s
[INFO] Finished at: Fri May 25 10:10:35 CEST 2012
[INFO] Final Memory: 9M/28M
[INFO] ------------------------------------------------------------------------
并且 - 正如预期的那样 - 网站是在target/site
下生成的。