ant-user mailing list archives

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

(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/A.java, x/y/z/B.java or x/y/z/C.java ).  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/A.java"/>
			<include name="x/y/z/B.java"/>			
			<include name="x/y/z/C.java"/>
		</srcfiles> 
    		<mapper type="glob" from="*.java" to="${build}/*.class"/>
  	</uptodate>

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


<!-- 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"/>
	</exec>			

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


---end of code---

Cheers
Graham



Mime
View raw message