Skip to content

Instantly share code, notes, and snippets.

@nshkrob
Last active January 27, 2018 06:51
Show Gist options
  • Save nshkrob/71b44aa3b7bde3c3a31e to your computer and use it in GitHub Desktop.
Save nshkrob/71b44aa3b7bde3c3a31e to your computer and use it in GitHub Desktop.
Sample pom.xml with scrooge-maven-plugin
<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.example.asdf</groupId>
<artifactId>asdf</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>Asdf</name>
<properties>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.twitter</groupId>
<artifactId>scrooge-maven-plugin</artifactId>
<version>3.17.0</version>
<configuration>
<language>java</language> <!-- default is scala -->
<thriftOpts>
<!-- add other Scrooge command line options using thriftOpts -->
<thriftOpt>--finagle</thriftOpt>
</thriftOpts>
<!-- tell scrooge to not to build the extracted thrift files (defaults to true) -->
<buildExtractedThrift>false</buildExtractedThrift>
</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>
<dependencies>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>scrooge-runtime_2.10</artifactId>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-thrift_2.10</artifactId>
<version>6.5.1</version>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment