Search code examples
mavenm2e

m2e doesn't generate site with maven-archetype-quickstart


Our project team would like to switch from ant to maven for our build and CI so I'm getting to grips with it by following the Sonatype "Maven By Example" book.

I'm using m2e, with the internal maven that m2e installs.

I've created a project using the maven-archetype-quickstart and have not modified it in any way. It builds just fine, however when I run as.. with goal "site" nothing is produced in my project's target folder, or anywhere else that I can find. Here's the output:

[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] ------------------------------------------------------------------------

Is this because I'm using the internal m2e maven? do I need to install maven separately?


Solution

  • First of all, from my experience, it is definitely good idea to use external Maven installation with m2e. I had some troubles (of other kind) with embedded Maven and I don't recommend using it.

    Now about your problem: I don't know if it's m2e's embedded Maven or some kind of your mistake or misunderstanding, but I've just generated simple project using the same quickstart archetype and everything works ok. I have output like this:

        [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] ------------------------------------------------------------------------
    

    And - as expected - site is generated under target/site.