ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Salazar <pedro-b-sala...@ptinovacao.pt>
Subject generate files *only* if a one of set of sources was modified
Date Tue, 11 Nov 2003 15:08:24 GMT
Greetings,

I'm using xdoclet to generate descriptors and interfaces for my EJBs.
However, I want generate those descriptors only if any of my EJBs
sources was modified.

I create a task using the <uptodate>. I don't know if is the better
approach to use but it doesn't work also (the problem can be in the
mapper which I don't understand very well) .

I set a property "ejb-changed" if any of the sources is newer than the
generated, ad then my custom xdoclet task will run if this property was
set.

<target name="X">
	<uptodate property="ejb-changed" 
	    <mapper type="merge" to="${src.server.dir}/**/ejb/access/*.java"/>
            <srcfiles dir= "${build.gen.dir}" 
                includes="**/ejb/access/**"/>
        </uptodate>

	<antcall target="ejb-xdoclet-gen" >
            <param name="p_include_bean"
value="**/ejb/access/*Bean.java"/>

</target>

This target doesn't work because when I update any of my sources, the
property is not set!!!?? 


I try to use the <dependset>, but I don't know how to notify or set a
property if it removes the generated files to generate new ones...

<target name="X">
	<dependset>
	    <!-- my sources files -->
            <srcfilelist
                dir   = "${src.server.dir}"
                files = "**/ejb/access/*.java"/> 
	    <!-- generated ones -->
            <targetfileset
                dir      = "${build.gen.dir}"
                includes = "**/ejb/access/**/*.java" />
        </dependset>

	WHAT TO DO HERE!!!??

	<antcall target="ejb-xdoclet-gen" >
            <param name="p_include_bean"
value="**/ejb/access/*Bean.java"/>

</target>


Anyone have an ideia how to do it?


Regards,
Pedro Salazar.
-- 
PS
pedro-b-salazar@ptinovacao.pt
PGP:0E129E31D803BC61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message