Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refactored script/run&repl, auto-generate script/maven-classpath, update

to 1.3 beta 3
  • Loading branch information...
commit bcbafd2e7775172a94313210f124b483f0bde9f3 1 parent fdc4135
Paul Bauer authored September 10, 2011
38  pom.xml
@@ -20,24 +20,40 @@
20 20
     <dependency>
21 21
       <groupId>org.clojure</groupId>
22 22
       <artifactId>clojure</artifactId>
23  
-      <version>1.3.0-alpha8</version>
  23
+      <version>1.3.0-beta3</version>
24 24
     </dependency>
25 25
   </dependencies>
26 26
 
27 27
   <build>
28 28
     <plugins>
29 29
       <plugin>
30  
-	<groupId>com.theoryinpractise</groupId>
31  
-	<artifactId>clojure-maven-plugin</artifactId>
32  
-	<version>1.3.7</version>
33  
-	<extensions>true</extensions>
34  
-	<configuration>
35  
-	  <warnOnReflection>${clojure.warnOnReflection}</warnOnReflection>
36  
-	  <temporaryOutputDirectory>false</temporaryOutputDirectory>
37  
-	</configuration>
38  
-      </plugin>      
  30
+        <groupId>com.theoryinpractise</groupId>
  31
+        <artifactId>clojure-maven-plugin</artifactId>
  32
+        <version>1.3.7</version>
  33
+        <extensions>true</extensions>
  34
+        <configuration>
  35
+          <warnOnReflection>${clojure.warnOnReflection}</warnOnReflection>
  36
+          <temporaryOutputDirectory>false</temporaryOutputDirectory>
  37
+        </configuration>
  38
+      </plugin>
  39
+      <plugin>
  40
+        <groupId>org.apache.maven.plugins</groupId>
  41
+        <artifactId>maven-dependency-plugin</artifactId>
  42
+        <version>2.3</version>
  43
+        <executions>
  44
+          <execution>
  45
+            <id>build-classpath</id>
  46
+            <phase>generate-sources</phase>
  47
+            <goals>
  48
+              <goal>build-classpath</goal>
  49
+            </goals>
  50
+            <configuration>
  51
+                <outputFile>${basedir}/script/maven-classpath</outputFile>
  52
+            </configuration>
  53
+          </execution>
  54
+        </executions>
  55
+      </plugin>
39 56
     </plugins>
40 57
   </build>
41 58
   
42  
-
43 59
 </project>
7  script/repl
... ...
@@ -1,6 +1,3 @@
1 1
 #!/bin/sh
2  
-CLASSPATH=src/main/clojure:`cat script/maven-classpath`
3  
-
4  
-java -server -XX:+AggressiveOpts -cp $CLASSPATH clojure.main
5  
-
6  
-
  2
+. $(dirname $0)/script_common
  3
+${CMD_BASE} -r
5  script/run
... ...
@@ -1,4 +1,3 @@
1 1
 #!/bin/sh
2  
-CLASSPATH='target/*':src/main/clojure:`cat script/maven-classpath`
3  
-
4  
-java -server -XX:+AggressiveOpts -cp $CLASSPATH clojure.main -m $@
  2
+. $(dirname $0)/script_common
  3
+${CMD_BASE} -m $@
6  script/script_common
... ...
@@ -0,0 +1,6 @@
  1
+#!/bin/sh
  2
+BASE_DIR=$(dirname $0)/..
  3
+TARGET_CLASSPATH=`ls -d ${BASE_DIR}/target/*class* | tr '\n' :`
  4
+MAVEN_CLASSPATH=`cat ${BASE_DIR}/script/maven-classpath`
  5
+CLASSPATH=${TARGET_CLASSPATH}${BASE_DIR}/src/main/clojure:${MAVEN_CLASSPATH}
  6
+CMD_BASE="java -server -XX:+AggressiveOpts -cp ${CLASSPATH} clojure.main"

0 notes on commit bcbafd2

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