I personally much prefer to have a property in the build file saying
whether I'm in debug or release mode.

Then I have just three targets in my nant build file, and it's easier to
read.

Then, in cc.net or wherever, I just call it once in debug mode and once
in release mode, I find that a lot more useful than having multiple
build targets in nant.

If you reallllly don't want cc.net calling nant twice,  I'd be looking
at something like...

<target name="build"> do stuff that uses "if" on the buildmode property
if needbe </target>
<target name="clean"> do stuff that uses "if" on the buildmode property
if needbe </target>

<target name="rebuild" depends="clean,build"> 

<target name="debugbuild">
        <property setting buildmode to debug>
        <call build>
</target>

Etc for clean and release.

 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Nicholas Duane
> Sent: Wednesday, September 06, 2006 3:50 PM
> To: nant-users@lists.sourceforge.net
> Cc: [EMAIL PROTECTED]
> Subject: [NAnt-users] solution task: targets v.s. configuration
> 
> I know there has already been a discussion on adding another 
> attribute, operation, so we can specify clean, build, 
> rebuild.  From the little bit I've read so far (just started 
> using nant) it appears that people are equating targets to 
> clean, build, and rebuild and using a property to determine 
> the configuration: debug or release.  Is this correct?  Why 
> would the configuration not also equate to a target type?  
> Otherwise, if I want to build both debug and release I have 
> to have two nant entries (from my cruisecontrol 
> configuration) whereas if debug and release were targets I 
> would only need one entry and could specify both targets.
> 
> So do people create debug and release targets?  Maybe something like:
> 
> <target name="debugclean" .../>
> <target name="debugbuild" .../>
> <target name="debugrebuild" .../>
> <target name="releaseclean" .../>
> <target name="releasebuild" .../>
> <target name="releaserebuild" .../>
> 
> Thanks,
> Nick
> 
> _________________________________________________________________
> Check the weather nationwide with MSN Search: Try it now!  
> http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
> 
> 
> --------------------------------------------------------------
> -----------
> Using Tomcat but need to do more? Need to support web 
> services, security?
> Get stuff done quickly with pre-integrated technology to make 
> your job easier Download IBM WebSphere Application Server 
> v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> dat=121642
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to