ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vinod.na...@iflexsolutions.com>
Subject RE: adding the same manifest to all jars
Date Wed, 26 May 2004 11:48:02 GMT
Thanks Ivan,

I would do that way..

Tell me How to test whether a property <A> is not set or it does not exists in the project
through Ant scripting..

Rgds,
Vinod.

-----Original Message-----
From: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com]
Sent: Wednesday, May 26, 2004 5:01 PM
To: Ant Users List
Subject: RE: adding the same manifest to all jars


Hi Vinod, why don't you try this way:
<property file="${basedir}/rel1/release.properties"/>

Basedir is a optional attribute of <project> tag and
usually (and if no set explicitly) it stands for dir
where build.xml is located. However, it can be
predifined.

HTH Ivan
--- vinod.nayak@iflexsolutions.com wrote:
> Hi All,
> 
> I have a build structure like this.
> 
> /<root_directory>
>   |-workarea
>     |-install.ksh
>     |-dist
>       |-runinstall.ksh
>       |-build.xml
>       |-build.sh
>       |-rel1
> 	  |-src
> 	  |-release.properties
> 
> I start the Ant build like this..
> 
> call ./install.ksh from the workarea folder.
> which in turn calls <runinstall.ksh> as
> ./dist/runinstall.ksh
> 
> <runinstall.ksh> in turn calls <build.sh> as
> ./build.sh which takes the buildfile as build.xml
> 
> [exec $JAVA_HOME/bin/java -classpath $ANT_CLASSPATH
> -Dant.home=$ANT_HOME $TEST $HOST $SERVER $SYSTEMPW
> $BEANLIST $TESTBEANLIST $BUILDPROPERTIES
> org.apache.tools.ant.Main $VERBOSE -buildfile
> build.xml "install"]
> 
> in the build.xml i have one property setting through
> this command.
>   <!-- RELEASE SPECIFIC PROPERTIES -->
>   <property file="./rel1/release.properties"/>
> 
> but it fails to read the properties from
> <release.properties> file, but if i give the full
> path it works.
> like <property
>
file="/<root_directory>/workarea/dist/rel1/release.properties"/>.
> 
> I tried these many options, where it is working in
> none. i am really frustrated..
> 
> ./rel1/release.properties
> rel1/release.properties
> ../rel1/release.properties [not proper i know]
> ../dist/rel1/release.properties
> 
> What would be the problem??
> 
> Thanks in advance,
> Vinod.
> 
> 
> -----Original Message-----
> From: Peter Reilly [mailto:peter.reilly@corvil.com]
> Sent: Wednesday, May 26, 2004 1:41 PM
> To: Ant Users List
> Subject: Re: adding the same manifest to all jars
> 
> 
> Ah, I see.
> antcall does open a new scope (a), so
> the example will not work.
> 
> It looks like using ant-contrib's case  would be the
> answer:
>      <ac:switch value="${which-mf}">
>       <ac:case value="mf">
>         <presetdef name="echo.preset">
>           <echo message="default-mf"/>
>         </presetdef>
>       </ac:case>
>       <ac:case value="other">
>         <presetdef name="echo.preset">
>           <echo message="other-mf"/>
>         </presetdef>
>       </ac:case>
>       <ac:default>
>         <presetdef name="echo.preset">
>           <echo message="Unknown mf -'${which-mf}'"
> />
>         </presetdef>
>       </ac:default>
>     </ac:switch>
>     <echo.preset/>
> 
> Peter
> Jan.Materne@rzf.fin-nrw.de wrote:
> 
> >I need the other direction: main uses <antcall> for
> the definition.
> >
> >a) - antcall opens new scope
> >   - antcall copies all definitions from main into
> child
> >   - child defines myjar
> >   - child ends
> >   --> main has no access to myjar
> >
> >b) - antcall does not open a new scope for
> definitions
> >   - antcall does not has to copy definitions
> >   - child defines myjar in common scope
> >   - child ends
> >   --> main has access to myjar
> >
> >Jan
> >
> >
> >  
> >
> >>-----Original Message-----
> >>From: Peter Reilly
> [mailto:peter.reilly@corvil.com]
> >>Sent: Wednesday, May 26, 2004 9:49 AM
> >>To: Ant Users List
> >>Subject: Re: adding the same manifest to all jars
> >>
> >>
> >>Jan.Materne@rzf.fin-nrw.de wrote:
> >>
> >>    
> >>
> >>>I´m not sure whether the <antcall> works or
> whether it opens 
> >>>      
> >>>
> >>a new scope for
> >>    
> >>
> >>>definitions.
> >>> 
> >>>
> >>>      
> >>>
> >>Definitions get copied to the child projects
> (always) so the antcall 
> >>will work for
> >>your example.
> >>
> >>Peter
> >>
> >>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >>For additional commands, e-mail:
> user-help@ant.apache.org
> >>    
> >>
> >
> >
> >  
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


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


Mime
View raw message