Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

187 lines (183 sloc) 6.044 kb
<?xml version="1.0"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.twitter</groupId>
<artifactId>scrooge-demo</artifactId>
<packaging>jar</packaging>
<name>scrooge-demo</name>
<version>1.0</version>
<properties>
<git.dir>${project.basedir}/../../../.git</git.dir>
</properties>
<dependencies>
<!-- Project dependencies -->
<!-- Notes to users:
Suppose your project depends on some artifact from which you want to pull
out the thrift files to compile using Scrooge. Add the dependency as usual
and add the artifact to the whitelist in scrooge-maven-plugin configuration
Here we are using event-logger-thrift as an example
-->
<dependency>
<groupId>com.twitter</groupId>
<artifactId>event-logger-thrift</artifactId>
<version>0.0.3</version>
<scope>provided</scope>
</dependency>
<!-- common library dependencies -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.8.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-core_2.9.2</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-codec_2.9.2</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core_2.9.2</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-thrift_2.9.2</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-ostrich4_2.9.2</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>scrooge-runtime</artifactId>
<version>3.0.8</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-tools.testing</groupId>
<artifactId>specs_2.9.1</artifactId>
<version>1.6.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<param>-unchecked</param>
<param>-deprecation</param>
<param>-encoding</param>
<param>utf8</param>
</args>
<!-- Scrooge generates more files (one file per struct), so
you might need to increase running memory for maven
-->
<jvmArgs>
<jvmArg>-Xmx2G</jvmArg>
</jvmArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<argLine>-Xmx1024m</argLine>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*Spec.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>com.twitter</groupId>
<artifactId>scrooge-maven-plugin</artifactId>
<version>3.0.8</version>
<configuration>
<thriftNamespaceMappings>
<thriftNamespaceMapping>
<from>mythrift.bird</from>
<to>mythrift.bird_renamed</to>
</thriftNamespaceMapping>
</thriftNamespaceMappings>
<thriftOpts>
<!-- add other Scrooge command line options using thriftOpts -->
<thriftOpt>--finagle</thriftOpt>
<thriftOpt>--ostrich</thriftOpt>
<thriftOpt>-v</thriftOpt>
</thriftOpts>
<!-- tell scrooge to extract thrifts from these artifacts -->
<dependencyConfig>
<include>event-logger-thrift</include>
</dependencyConfig>
</configuration>
<executions>
<execution>
<id>thrift-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>thrift-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Jump to Line
Something went wrong with that request. Please try again.