ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Barr <>
Subject uptodate problem
Date Mon, 08 Oct 2001 16:47:04 GMT

(Ant 1.4)

I'm using the visibroker java2iiop to create java iiop stub and skeleton
files.  The problem is that java2iiop (unlike javac) seems unable to detect
whether or not it needs to regenerate stubs/skeletons if the source has
changed.  To this end I have tried to achieve this conditional stub/skeleton
generation using the two targets included below.    

The problem is that ${iiopStub.isUpToDate} never gets set ( whether or not I
touch x/y/z/, x/y/z/ or x/y/z/ ).  I guess that problem is
with the way I am using glob... ??

---code below---

<!-- Check whether iiop stubs need to be regenerated -->
<target name="iiopStub.checkUptoDate">
	<uptodate property="iiopStub.isUpToDate" >
    		<srcfiles dir="${src}"> 
			<include name="x/y/z/"/>
			<include name="x/y/z/"/>			
			<include name="x/y/z/"/>
    		<mapper type="glob" from="*.java" to="${build}/*.class"/>

	<echo message="IIOP stubs are up to date: ${iiopStub.isUpToDate}"/>

<!-- Generates the IIOP stubs for Remote interfaces. -->
<target name="generateIIOPStubs" depends="init, iiopStub.checkUptoDate"
unless="iiopStub.isUpToDate" >

	<echo message="Generating IIOP stub and skeleton java source files
to ${iiopStubs.src.path}\n"/>
	<exec dir="." executable="java2iiop" >
	 	<arg line="-VBJjavavm ${java_home}/bin/java"/> <!-- the jvm
to use -->
		<arg line="-VBJdebug"/>
		<arg line="-VBJclasspath ${java2iiopPath}"/>
		<arg line="-no_examples"/>
		<arg line="-no_tie"/>
		<arg line="-no_comments"/>
		<arg line="-root_dir ${iiopStubs.src.path}"/>
		<arg value="x/y/z/A"/>
		<arg value="x/y/z/B"/>			
		<arg value="x/y/z/C"/>

	<javac> [compiles generated stub and and skeletons from
${iiopStubs.src.path} to ${build}]

---end of code---


View raw message