Kwebble : Blog

Label: maven

  • Experiences with Maven 3: Generating reports

    Gepubliceerd op 21 juni 2011 in Programming.

    After installing version 3 of Maven I missed the generation of the documentation site. While the documentation claims no changes to POM files are necessary to use the newer version it doesn’t behave the same.

    Version 3 accepts the same POM files used with version 2, but the site goal no longer generates any output. This is because of a change in the POM structure. The configuration of reports has moved from a separate <reporting> section to the <build> section:

    <build>
      <plugins>
        ...
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.0-beta-3</version>
          <configuration>
            <reportPlugins>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
              </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                  <quiet>true</quiet>
                </configuration>
              </plugin>
            </reportPlugins>
          </configuration>
        </plugin>
        ...
      </plugins>
    </build>
    

    To generate the general project information reports you automatically get with Maven 2, add the maven-project-info-reports-plugin.

    • documentation
    • maven
  • Tip: use the axis:axis:1.4 Maven artifact if you need Axis 1.4 support

    Gepubliceerd op 29 december 2009 in Programming.

    For a Java program that can be run from the command line I used the Maven Assembly plugin to generate a JAR file with all dependencies included.

    Although the build was successful, running the software generated a NoClassDefFoundError, caused somewhere in Axis. After a lot of time I finally found some information about the existence of two Axis artifacts in the central Maven repository. Axis 1.4 is available under groupid axis and org.apache.axis.

    The POM file of the axis:axis:1.4 artifact includes a number of runtime dependencies, which are not included in the other. Since I used the incomplete version the resulting JAR missed some necessary classes.

    So if you use Axis 1.4, define a dependency on the axis:axis:1.4 artifact, not org.apache.axis:axis:1.4.

    • axis
    • java
    • maven
    • maven assembly
  • Rubrieken

    • Artikelen
    • Foto's
    • Links
    • Media
    • Overheid
    • Programming
  • Recente Berichten

    • Stanford Web Applications course lectures
    • The importance of knowing Unicode
    • “If you are not paying for it, you’re not the customer; you’re the product being sold.”
    • Inzage in je gegevens bij Facebook
    • Tuning Oracle UCM 11 & Site Studio performance
  • Abonneren

    • Atom feed Artikelen
    • Atom feed Reacties
  • Archief

© Rob Schlüter - Contact