Revision: 42313
http://brlcad.svn.sourceforge.net/brlcad/?rev=42313&view=rev
Author: johnranderson
Date: 2011-01-16 05:40:10 +0000 (Sun, 16 Jan 2011)
Log Message:
-----------
Runner script now uses maven dependency plugin to construct classpath.
Modified Paths:
--------------
jbrlcad/trunk/bin/runner
jbrlcad/trunk/pom.xml
jbrlcad/trunk/src/main/java/org/brlcad/samples/Rt.java
jbrlcad/trunk/src/main/java/org/brlcad/samples/Rtshot.java
Modified: jbrlcad/trunk/bin/runner
===================================================================
--- jbrlcad/trunk/bin/runner 2011-01-16 05:34:05 UTC (rev 42312)
+++ jbrlcad/trunk/bin/runner 2011-01-16 05:40:10 UTC (rev 42313)
@@ -20,19 +20,23 @@
set JBRLCAD_HOME=$BINDIR:h
+# build classpath containing dependencies
+set CP=`mvn dependency:build-classpath | awk '$3 == "classpath:"
{getline;print}'`
+
+# find the jbrlcad jar
set JAR=`ls ${JBRLCAD_HOME}/target/jbrlcad*.jar`
if $#JAR != 1 then
- (cd ${JBRLCAD_HOME}; mvn clean install)
+ (cd ${JBRLCAD_HOME}; mvn -Dmaven.test.skip clean install)
endif
set JAR=`ls ${JBRLCAD_HOME}/target/jbrlcad*.jar`
if $#JAR != 1 then
echo "Build failed, cannot run $1"
+ exit
endif
+set CP=${JAR}:$CP
set CLASS=$1
shift
-set JSCIENCE=~/.m2/repository/org/jscience/jscience/4.3.1/jscience-4.3.1.jar
-
-# echo "java -cp ${JAR}:${JSCIENCE} org.brlcad.samples.$CLASS $*"
-java -cp ${JAR}:${JSCIENCE} org.brlcad.samples.$CLASS $*
+# echo "java -cp $CP org.brlcad.samples.$CLASS $*"
+java -cp $CP org.brlcad.samples.$CLASS $*
Modified: jbrlcad/trunk/pom.xml
===================================================================
--- jbrlcad/trunk/pom.xml 2011-01-16 05:34:05 UTC (rev 42312)
+++ jbrlcad/trunk/pom.xml 2011-01-16 05:40:10 UTC (rev 42313)
@@ -1,3 +1,4 @@
+
<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>
@@ -29,6 +30,24 @@
<target>1.6</target>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>build-classpath</id>
+ <goals>
+ <goal>build-classpath</goal>
+ </goals>
+ <configuration>
+ <includeScope>runtime</includeScope>
+ <excludeScope>test</excludeScope>
+ <outputFilterFile>true</outputFilterFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
<dependencies>
Modified: jbrlcad/trunk/src/main/java/org/brlcad/samples/Rt.java
===================================================================
--- jbrlcad/trunk/src/main/java/org/brlcad/samples/Rt.java 2011-01-16
05:34:05 UTC (rev 42312)
+++ jbrlcad/trunk/src/main/java/org/brlcad/samples/Rt.java 2011-01-16
05:40:10 UTC (rev 42313)
@@ -49,7 +49,7 @@
*/
public class Rt {
- private static final String usage = "Usage: rt [-R] [-b # #] [-s size] [-a
azimuth] [-e elevation] [-o output_file] [-F frame_buffer_port] dbfile.g
object1 [object2 object3 ...]";
+ private static final String usage = "Usage: Rt [-R] [-b # #] [-s size] [-a
azimuth] [-e elevation] [-o output_file] [-F frame_buffer_port] dbfile.g
object1 [object2 object3 ...]";
@SuppressWarnings("empty-statement")
public static void main(String[] args) {
Modified: jbrlcad/trunk/src/main/java/org/brlcad/samples/Rtshot.java
===================================================================
--- jbrlcad/trunk/src/main/java/org/brlcad/samples/Rtshot.java 2011-01-16
05:34:05 UTC (rev 42312)
+++ jbrlcad/trunk/src/main/java/org/brlcad/samples/Rtshot.java 2011-01-16
05:40:10 UTC (rev 42313)
@@ -21,8 +21,7 @@
public class Rtshot
{
- private static final String usage = "Usage:\n\tjava -cp
build/dist/jbrlcad.jar:lib/jscience.jar" +
- " [-p x y z] [-d x y z] file.g obj1 [ obj2 obj3 ...]";
+ private static final String usage = "Usage: Rtshot [-p x y z] [-d x y z]
file.g obj1 [ obj2 obj3 ...]";
public static void main(String[] args)
{
Point start = new Point(0,0,0);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits