Permalink
Browse files

[ken] otp-thirft build creates distro

  • Loading branch information...
1 parent 74728e2 commit 6671f50603a72472b3fd1e96e916914850f9a53d @mr-ken mr-ken committed with fakeholz Dec 6, 2012
View
@@ -33,3 +33,4 @@ opentripplanner-webapp/src/main/webapp/js/otp-min.js
gen-java/
gen-javabean/
gen-py/
+.idea/
@@ -177,6 +177,38 @@
<docsDir>${project.build.directory}/site/enunciate</docsDir>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>org.opentripplanner.api.thrift.OTPServerMain</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <descriptor>src/main/assembly/distro.xml</descriptor>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
@@ -0,0 +1,27 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>distro</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <files>
+ <file>
+ <source>src/main/scripts/start-otp-thrift.sh</source>
+ <outputDirectory>/bin</outputDirectory>
+ </file>
+ <file>
+ <source>src/main/resources/org/opentripplanner/api_thrift/example-service-config.xml</source>
+ <outputDirectory>/conf</outputDirectory>
+ </file>
+ </files>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <useProjectArtifact>true</useProjectArtifact>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
@@ -0,0 +1,3 @@
+#!/bin/bash
+OTP_THRIFT_HOME=$(dirname $0)/..
+find ${OTP_THRIFT_HOME} -iname "opentripplanner-api-thrift*.jar" | xargs -I {} java -jar {} "$@"

0 comments on commit 6671f50

Please sign in to comment.