Skip to content
Browse files

mavenizing scrooge

RB_ID=75580
  • Loading branch information...
1 parent 0831a03 commit 63f300865f35b44b381bc0038f0660bcbc3b025a mmcbride committed
Showing with 215 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +24 −0 pom.xml
  3. +144 −0 scrooge-generator/pom.xml
  4. +10 −0 scrooge-generator/src/scripts/gen-test-thrift
  5. +36 −0 scrooge-runtime/pom.xml
View
1 .gitignore
@@ -14,3 +14,4 @@ lib_managed/
.project
.scala_dependencies
.ivyjars
+.classpath.txt
View
24 pom.xml
@@ -0,0 +1,24 @@
+<?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</artifactId>
+ <packaging>pom</packaging>
+ <version>3.0.2-SNAPSHOT</version>
+ <distributionManagement>
+ <repository>
+ <id>artifactory-release</id>
+ <name>Twitter Artifactory Releases</name>
+ <url>http://artifactory.local.twitter.com/libs-releases-local</url>
+ </repository>
+ <snapshotRepository>
+ <id>artifactory-snapshot</id>
+ <name>Twitter Artifactory Snapshots</name>
+ <url>http://artifactory.local.twitter.com/libs-snapshots-local</url>
+ </snapshotRepository>
+ </distributionManagement>
+ <modules>
+ <module>scrooge-runtime</module>
+ <module>scrooge-generator</module>
+ </modules>
+</project>
View
144 scrooge-generator/pom.xml
@@ -0,0 +1,144 @@
+<?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-generator</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.2-SNAPSHOT</version>
+ <parent>
+ <groupId>com.twitter</groupId>
+ <artifactId>service-292</artifactId>
+ <version>0.0.2</version>
+ </parent>
+ <properties>
+ <git.dir>${project.basedir}/../../.git</git.dir>
+ <mainClass>com.twitter.scrooge.Main</mainClass>
+ </properties>
+ <repositories>
+ <repository>
+ <id>artifactory</id>
+ <name>artifactory</name>
+ <url>http://artifactory.local.twitter.com/repo</url>
+ </repository>
+ </repositories>
+ <dependencies>
+ <!-- project dependencies -->
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>scrooge-runtime</artifactId>
+ <version>3.0.2-SNAPSHOT</version>
+ </dependency>
+ <!-- library dependencies -->
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.8.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.scopt</groupId>
+ <artifactId>scopt_2.9.1</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>util-core</artifactId>
+ <version>5.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>util-codec</artifactId>
+ <version>5.0.3</version>
+ </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.scalatest</groupId>
+ <artifactId>scalatest_2.9.1</artifactId>
+ <version>1.7.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>scalatest-mixins_2.9.1</artifactId>
+ <version>1.0.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock</artifactId>
+ <version>2.4.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1_3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>1.5.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.objenesis</groupId>
+ <artifactId>objenesis</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>finagle-core</artifactId>
+ <version>5.0.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>finagle-thrift</artifactId>
+ <version>5.0.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>finagle-ostrich4</artifactId>
+ <version>5.0.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <executions>
+ <execution><!-- Run our version calculation script -->
+ <id>Version Calculation</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>src/scripts/gen-test-thrift</executable>
+ <arguments>
+ <classpath/>
+ <argument>target/test-sources</argument>
+ </arguments>
+ <testSourceRoot>target/test-sources</testSourceRoot>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
10 scrooge-generator/src/scripts/gen-test-thrift
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+args=("$@")
+cp=${args[0]}
+out=${args[1]}
+thrifts=`find src/test/resources/*.thrift`
+
+java -cp $cp com.twitter.scrooge.Main --verbose --finagle --ostrich -d $out -l java -n thrift.test=thrift.java_test -n thrift.test1=thrift.java_test1 -n thrift.test2=thrift.java_test2 $thrifts
+
+java -cp $cp com.twitter.scrooge.Main --verbose --finagle --ostrich -d $out -l scala $thrifts
View
36 scrooge-runtime/pom.xml
@@ -0,0 +1,36 @@
+<?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-runtime</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.2-SNAPSHOT</version>
+ <parent>
+ <groupId>com.twitter</groupId>
+ <artifactId>scala-parent-292</artifactId>
+ <version>0.0.2</version>
+ </parent>
+ <properties>
+ <git.dir>${project.basedir}/../../.git</git.dir>
+ </properties>
+ <dependencies>
+ <!-- library dependencies -->
+ <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-codec</artifactId>
+ <version>5.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.testing</groupId>
+ <artifactId>specs_2.9.1</artifactId>
+ <version>1.6.9</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>

0 comments on commit 63f3008

Please sign in to comment.
Something went wrong with that request. Please try again.