Skip to content

Instantly share code, notes, and snippets.

@vincentchu
Created May 31, 2013 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincentchu/5683210 to your computer and use it in GitHub Desktop.
Save vincentchu/5683210 to your computer and use it in GitHub Desktop.
base pom file for some projects
<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>com.vincentchu</groupId>
<artifactId>finagle-exp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>My Web App</description>
<inceptionYear>2013</inceptionYear>
<url>http://github.com/path/to/project</url>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.9.2</scala.version>
</properties>
<repositories>
<repository>
<id>twttr</id>
<name>twttr</name>
<url>http://maven.twttr.com</url>
</repository>
</repositories>
<!-- DEPENDENCIES -->
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.version}</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
<type>pom</type>
<version>6.4.0</version>
</dependency>
<!-- Be sure to depend on the various finagle sub modules that you need.
For example, here's how you would depend on finagle-thrift -->
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-http</artifactId>
<type>pom</type>
<version>6.4.0</version>
</dependency>
</dependencies>
<!-- END DEPENDENCIES -->
<!-- BUILD SETTINGS -->
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<!-- BUILD PLUGINS -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<recompileMode>incremental</recompileMode>
<args>
<arg>-unchecked</arg>
<arg>-deprecation</arg>
<arg>-explaintypes</arg>
</args>
<launchers>
<launcher>
<id>main</id>
<mainClass>com.vincentchu.finagle.exp.App</mainClass>
</launcher>
<!-- you could define other launcher -->
</launchers>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-make:transitive</arg>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.vincentchu.finagle.exp.App</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0-M2</version>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins>
<!-- END BUILD PLUGINS -->
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment