Permalink
Browse files

Fix Ant uptodate checking in OSGI JAR creation

Changes to the compiler or library were not triggering recreation
of the OSGI JARs, which are used in the local maven deployment tasks.

Reason: this Ant-ipattern:

    <fileset base="/foo">
       <include name="/foo/bar.baz"/>
    </fileset>

Instead, we should use a <filelist/>, which doesn't require
a base directory. This can be composed into a <srcresources/>
element in the <uptodate/>.

Phew!
  • Loading branch information...
1 parent 9f0594c commit b79ee63dae1df0a5d840a9e1fd20f965a5ce3461 @retronym retronym committed Dec 22, 2013
Showing with 31 additions and 24 deletions.
  1. +31 −24 build.xml
View
55 build.xml
@@ -1175,13 +1175,17 @@ TODO:
<mkdir dir="${build-osgi.dir}"/>
<uptodate property="osgi.bundles.available" targetfile="${build-osgi.dir}/bundles.core.complete">
- <srcfiles dir="${basedir}">
- <include name="build.xml"/>
- <include name="src/build/bnd/*.bnd"/>
- <include name="${library.jar}"/>
- <include name="${reflect.jar}"/>
- <include name="${compiler.jar}"/>
- </srcfiles>
+ <srcresources>
+ <fileset dir="${basedir}">
+ <include name="build.xml"/>
+ <include name="src/build/bnd/*.bnd"/>
+ </fileset>
+ <filelist>
+ <file name="${library.jar}"/>
+ <file name="${reflect.jar}"/>
+ <file name="${compiler.jar}"/>
+ </filelist>
+ </srcresources>
</uptodate>
<if><not><isset property="osgi.bundles.available"/></not><then>
@@ -1209,23 +1213,26 @@ TODO:
<target name="osgi.done" depends="pack.done, osgi.core">
<uptodate property="osgi.all.bundles.available" targetfile="${build-osgi.dir}/bundles.all.complete">
- <srcfiles dir="${basedir}">
- <include name="build.xml"/>
- <include name="src/build/bnd/*.bnd"/>
-
- <!-- TODO modularize compiler
- <include name="${interactive.jar}"/>
- <include name="${scaladoc.jar}"/>
- -->
-
- <include name="${actors.jar}"/>
-
- <include name="${continuations-plugin.jar}"/>
- <include name="${continuations-library.jar}"/>
- <include name="${parser-combinators.jar}"/>
- <include name="${xml.jar}"/>
- <include name="${swing.jar}"/>
- </srcfiles>
+ <srcresources>
+ <fileset dir="${basedir}">
+ <include name="build.xml"/>
+ <include name="src/build/bnd/*.bnd"/>
+ </fileset>
+ <filelist>
+ <!-- TODO modularize compiler
+ <include name="${interactive.jar}"/>
+ <include name="${scaladoc.jar}"/>
+ -->
+
+ <file name="${actors.jar}"/>
+
+ <file name="${continuations-plugin.jar}"/>
+ <file name="${continuations-library.jar}"/>
+ <file name="${parser-combinators.jar}"/>
+ <file name="${xml.jar}"/>
+ <file name="${swing.jar}"/>
+ </filelist>
+ </srcresources>
</uptodate>
<if><not><isset property="osgi.all.bundles.available"/></not><then>

0 comments on commit b79ee63

Please sign in to comment.