Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update scala-build.

  • Loading branch information...
commit d84f5800d3a0cf00c5952123ec78178753d892a3 1 parent 6719c78
Robey Pointer authored December 27, 2008
12  INSTALL
... ...
@@ -1,12 +0,0 @@
1  
-
2  
-========
3  
-CONFIGGY
4  
-========
5  
-
6  
-Installation instructions are very simple:
7  
-
8  
-  1. ``ant package``
9  
-  
10  
-  2. The jar and API docs wil now be in ``dist/configgy-<version>``
11  
-
12  
-Read the ``README`` for how to use it!
11  INSTALL.md
Source Rendered
... ...
@@ -0,0 +1,11 @@
  1
+
  2
+CONFIGGY
  3
+========
  4
+
  5
+Installation instructions are very simple:
  6
+
  7
+  1. `ant package`
  8
+  
  9
+  2. The jar and API docs wil now be in `dist/configgy-<version>`
  10
+
  11
+Read the `README` for how to use it!
2  ant/README.txt
@@ -71,6 +71,8 @@ Properties that can change behavior
71 71
     any extra files to copy into dist/<p> during compile
72 72
 - config.extra
73 73
     any extra files to copy into config/ during compile
  74
+- pack.deps
  75
+    pack dependent jars into the final dist jar, to remove dependencies
74 76
 
75 77
 
76 78
 Extra ivy thingies
7  ant/compile.xml
@@ -135,13 +135,10 @@
135 135
     <copy todir="${dist.dir}/libs" flatten="true">
136 136
       <path refid="deps.path" />
137 137
     </copy>
138  
-    <copy todir="${target.dir}/test-classes/resources" failonerror="false">
  138
+    <copy todir="${target.dir}/test-classes/" failonerror="false">
139 139
       <fileset dir="${test.source.dir}/resources" />
140 140
     </copy>
141  
-    <copy todir="${target.dir}/classes/resources" overwrite="true" failonerror="false">
142  
-      <fileset dir="${source.dir}/resources" />
143  
-    </copy>
144  
-    <copy todir="${dist.dir}/resources" overwrite="true" failonerror="false">
  141
+    <copy todir="${target.dir}/classes/" overwrite="true" failonerror="false">
145 142
       <fileset dir="${source.dir}/resources" />
146 143
     </copy>
147 144
   </target>
17  ant/package.xml
... ...
@@ -1,13 +1,25 @@
1 1
 <project xmlns:ivy="antlib:org.apache.ivy.ant">
2 2
 
3  
-  <target name="make-non-executable-jar" unless="ivy.extra.jarclassname">
  3
+  <!-- unzip all the dependent jars into target/ so that the final jar will depend on nothing. kinda evil. -->
  4
+  <target name="pack-deps" if="pack.deps">
  5
+    <pathconvert pathsep="," property="deps.path.list">
  6
+      <path refid="deps.path" />
  7
+      <map from="/" to="" />
  8
+    </pathconvert>
  9
+    <unzip dest="${target.dir}/classes">
  10
+      <fileset dir="/" includes="${deps.path.list}" />
  11
+    </unzip>
  12
+    <delete dir="${target.dir}/classes/META-INF" />
  13
+  </target>
  14
+
  15
+  <target name="make-non-executable-jar" unless="ivy.extra.jarclassname" depends="pack-deps">
4 16
     <jar destfile="${dist.dir}/${jar.name}.jar">
5 17
       <fileset dir="${target.dir}/classes" />
6 18
     </jar>
7 19
   </target>
8 20
 
9 21
   <!-- generate a jar that contains all deps inside it, so it can be run with "java -jar" -->
10  
-  <target name="make-executable-jar" if="ivy.extra.jarclassname" depends="copy-extra">
  22
+  <target name="make-executable-jar" if="ivy.extra.jarclassname" depends="copy-extra,pack-deps">
11 23
     <pathconvert refid="deps.path" pathsep=" " property="deps.path.jar-format">
12 24
       <chainedmapper>
13 25
         <flattenmapper />
@@ -42,6 +54,7 @@
42 54
         <filter token="TEST_CLASSPATH" value="${test.classpath}:${target.dir}/classes:${target.dir}/test-classes" />
43 55
         <filter token="DIST_CLASSPATH" value="${deps.path.dist-format}:$${DIST_HOME}/${jar.name}.jar" />
44 56
         <filter token="TARGET" value="${target.dir}" />
  57
+        <filter token="DIST_NAME" value="${dist.name}" />
45 58
       </filterset>
46 59
     </copy>
47 60
     <chmod dir="${dist.dir}/scripts" includes="*" perm="ugo+x" />

0 notes on commit d84f580

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