Skip to content

Commit

Permalink
Fix Ant uptodate checking in OSGI JAR creation
Browse files Browse the repository at this point in the history
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
retronym committed Dec 22, 2013
1 parent 9f0594c commit b79ee63
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions build.xml
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit b79ee63

Please sign in to comment.