ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Barr <gra...@globalfarmers.com>
Subject RE: mapper and uptodate examples
Date Wed, 10 Oct 2001 15:27:15 GMT
Jason,

Thanks for replying.  I'm using Ant V1.4.  The specific problem I'm having
is that my 'uptodate' property field does not get set as I would expect.  As
you say, I am probably misusing the mapper, but I can't work out what the
relationship is between the mapper's 'from' field and the uptodate's
'srcfiles' fileset.  

I've included my problem targets below.  In the example below, the property
iiopStub.checkUpToDate never gets set - regardless of changes to the files
in the srcfiles fileset..  When I change the mapper's 'from' field to
${src}/*.java it always gets set.      

G

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




-----Original Message-----
From: Jason Rogers [mailto:jason.rogers@tumbleweed.com]
Sent: 09 October 2001 20:58
To: 'ant-user@jakarta.apache.org'
Subject: RE: mapper and uptodate examples


Graham,

Which Ant version are you using?

When you say you have had no luck, please tell us specifically why.  It's
probably a misuse of the mapper, not uptodate not working with the mapper.

    > Hi,
    > 
    > The ant documentation for 'uptodate' does not describe 
    > how to use the
    > 'uptodate' task along with a glob or regexp file mapper.  
    > The documentation
    > suggests this should work but I have had no luck.  Is 
    > there any examples or
    > references I could use.

Mime
View raw message