Thursday 3 December 2009

Maven POM

MAVEN How2:

If you are starting a new maven project
DO NOT COPY AN EXISTING MAVEN POM TO A NEW DIRECTORY

... instead do this:
Go to your app directory and run:

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

maven getting started guide




Then fix the annoying 'maven assumes you use JDK 1.3 issue'


<build>

    <plugins>

      <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-compiler-plugin</artifactId>

        <configuration>

          <source>1.6</source>

          <target>1.6</target>

        </configuration>

      </plugin>

    </plugins>

  </build>


..... and thanks to Stack Overflow for showing how to split your unit tests from your integration tests.

No comments:

Post a Comment