ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Strong" <dstr...@agentissoftware.com>
Subject RE: variable license file?
Date Thu, 15 Jan 2004 06:37:40 GMT
This is another approach, if you want to build both targets at once using
the
same build target (build-dist).
Note: This builds build-dist with different values for the properties.
      You can then write one build sequence and skip some targets using
      <target unless="bin-only" ...

<target name="dist">
  <antcall target="build-dist">
     <param name="licencefile" value="licences/source-licence.txt" />
     <param name="dist.dir"    value="dist/source" />
  </antcall>
  <antcall target="build-dist">
     <param name="licencefile" value="licences/binary-licence.txt" />
     <param name="dist.dir"    value="dist/binary" />
     <param name="bin-only"    value="true" />
  </antcall>
</target>

-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com]
Sent: Thursday, 15 January 2004 5:47 AM
To: Ant Users List
Subject: Re: variable license file?


Set the property in the target, or specify the
property at the command-line.  But that only works if
you invoke one target per Ant invocation.

-Matt

--- "Daniel M. Bikel" <dbikel@linc.cis.upenn.edu>
wrote:
> Sorry about this long message.  Here's the simple
> question: what's the
> simplest way to change the value of properties
> according to what target I'm
> trying to build?
>
> --Dan.
>
> On Wed, 14 Jan 2004, Daniel M. Bikel wrote:
>
> > Hi.  I have a build.xml file that, among other
> things, builds an entire
> > distributable version of my software, including
> source code.  This includes
> > copying a license text file, as well as inserting
> the lines of that license
> > into an install shell script (just like the J2SDK
> install script, which
> > cat's the JDK license and asks the user if he/she
> agrees).
> >
> > Anyway, here's my question: I want to distribute
> *two* versions of my
> > software, one version with source with one license
> and one version without
> > source code with a different license.  It's easy
> to build a second target
> > that doesn't copy the source code to a "dist"
> directory, but currently, I
> > have a property that specifies where this LICENSE
> text file lives in my
> > project hierarchy.  I have just read
> >
> http://ant.apache.org/manual/CoreTasks/property.html
> > which makes it very clear that properties are
> *immutable*.  So, after this
> > (unfortunately long) preface, here's my question:
> how do you accomplish
> > what I want to do?  Do I need to use the Condition
> task somehow?
> >
> > If I were using make, I would simply redefine my
> ${deploy.license} variable
> > that specifies the relative path of my license
> file before building the
> > distributable.  But I can't do that in Ant.
> >
> > Thanks in advance!
> >
> > --Dan.
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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