Skip to content

Commit

Permalink
Cleaned up pom and run script
Browse files Browse the repository at this point in the history
  • Loading branch information
afisk committed Jul 16, 2010
1 parent 100506d commit 5f4c03d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 50 deletions.
47 changes: 9 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@
<id>latest-build</id>
<phase>package</phase>
<configuration>
<finalName>LittleProxy-LATEST</finalName>
<classesDirectory>target/classes</classesDirectory>
<useDefaultManifestFile>true</useDefaultManifestFile>
<outputDirectory>target</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
Expand All @@ -165,40 +160,16 @@
<mainClass>org.littleshoot.proxy.Launcher</mainClass>
</manifest>
</archive>
</configuration>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>

</configuration>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>

<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.littleshoot.proxy.Launcher</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
-->
</plugins>

</build>
</plugins>
</build>

<reporting>
<plugins>
Expand Down
22 changes: 10 additions & 12 deletions run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ function die() {
exit 1
}

#mvn clean || die "Could not clean?"
mvn package -Dmaven.test.skip=true || die "Could not package proxy"
javaArgs="-jar target/LittleProxy-LATEST.jar $*"
java6Path=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
pushd ..
mvn package -Dmaven.test.skip=true || die "Could not package"
popd

if [ -f "$java6Path" ]
then
echo "Running with Java 6 on OSX"
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java $javaArgs || die "Java process exited abnormally"
else
echo "Running using Java on path at `which java`"
java $javaArgs || die "Java process exited abnormally"
fi
fullPath=`dirname $0`
jar=`find $fullPath/target/*with-dependencies.jar`
cp=`echo $jar | sed 's,./,'$fullPath'/,'`
javaArgs="-server -Xmx600m -jar "$cp" $*"

echo "Running using Java on path at `which java` with args $javaArgs"
java $javaArgs || die "Java process exited abnormally"

0 comments on commit 5f4c03d

Please sign in to comment.