2012-12-31

Maven – minimal reasonable pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.jboss.qa</groupId>
    <artifactId>YourNameHere</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>

    <name>Your Name Here</name>

    <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <url>http://maven.apache.org</url>
    <build>

        <resources>
          <!-- This allows to have various files next to java files. For convenience in IDE. -->
          <resource>
            <directory>src/main/java</directory>
            <excludes><exclude>**/*.java</exclude></excludes>
          </resource>
          <!-- This is the default resources dir; the resource above would disable it. -->
          <resource> <directory>src/main/resources</directory> </resource>
        </resources>

        <!-- 1.6 sources & bytecode mode. -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>  <source>1.6</source> <target>1.6</target> </configuration>
            </plugin>
        </plugins>
    </build>


    <repositories>
      <repository><id>ondrazizka-googlecode</id><url>http://ondrazizka.googlecode.com/svn/maven</url></repository>
    </repositories>


    <dependencies>

      <!-- Commons -->
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.5</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.0</version>
      </dependency>



      <!-- Slf4j -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.11</version>
      </dependency>


      <!-- JUnit -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
      </dependency>

    </dependencies>

</project>

0