You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by da...@remanresource.com on 2009/02/04 17:51:04 UTC
Making my JAR file include everything
Hi,
I'm using Ant 1.6 on Solaris 9. When I created a JAR file, I'm trying to include everything in my base directory ("basedir") as well as an additional properties file ...
<jar destfile="dist/${nps-config-service-jmeter-jar}"
basedir="${build}"
includes="${nps-config-client-file-location-properties}" />
But this command creates a JAR file without the contents of the basedir. If I remove the 'includes="${nps-config-client-file-location-properties}"' clause, then the contents of the basedir are included. How can I have both the properties file and the contents of the base dir?
Thanks, - Dave
> -------Original Message-------
> From: dave.alvarado@remanresource.com
> Subject: Using ant to check out only a single file from CVS
> Sent: Feb 04 '09 14:46
>
> Hi,
>
> I'm using Ant 1.6 on Solaris 9. Right now I have a shell script in which I can check out a package from CVS:
>
> ant -Duser=$username -Dbaseline=$baseline -Dpackage=$CVS_PACKAGE_NAME cvsCheckout
>
> but I was wondering how I can check out only a single file from CVS and then place it on a certain directory in my server. Any thoughts are most appreciated, - Dave
>
> ---------------------------------------------------------------------
> 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
Re: Making my JAR file include everything
Posted by Haiqi Wei <ha...@gmail.com>.
I have not tested this. But can you copy the property files into the basedir
beforehand,
then do
<jar destfile="dist/${nps-config-
>
> service-jmeter-jar}"
> basedir="${build}"/>
Haiqi.
On Wed, Feb 4, 2009 at 10:51 AM, <da...@remanresource.com> wrote:
> Hi,
>
> I'm using Ant 1.6 on Solaris 9. When I created a JAR file, I'm trying to
> include everything in my base directory ("basedir") as well as an additional
> properties file ...
>
> <jar destfile="dist/${nps-config-service-jmeter-jar}"
> basedir="${build}"
> includes="${nps-config-client-file-location-properties}" />
>
> But this command creates a JAR file without the contents of the basedir.
> If I remove the 'includes="${nps-config-client-file-location-properties}"'
> clause, then the contents of the basedir are included. How can I have both
> the properties file and the contents of the base dir?
>
> Thanks, - Dave
>
>
> > -------Original Message-------
> > From: dave.alvarado@remanresource.com
> > Subject: Using ant to check out only a single file from CVS
> > Sent: Feb 04 '09 14:46
> >
> > Hi,
> >
> > I'm using Ant 1.6 on Solaris 9. Right now I have a shell script in
> which I can check out a package from CVS:
> >
> > ant -Duser=$username -Dbaseline=$baseline -Dpackage=$CVS_PACKAGE_NAME
> cvsCheckout
> >
> > but I was wondering how I can check out only a single file from CVS and
> then place it on a certain directory in my server. Any thoughts are most
> appreciated, - Dave
> >
> > ---------------------------------------------------------------------
> > 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
>
>
Re: Making my JAR file include everything
Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-02-04, <da...@remanresource.com> wrote:
> Hi,
> I'm using Ant 1.6 on Solaris 9. When I created a JAR file, I'm
> trying to include everything in my base directory ("basedir") as
> well as an additional properties file ...
> <jar destfile="dist/${nps-config-service-jmeter-jar}"
> basedir="${build}"
> includes="${nps-config-client-file-location-properties}" />
> But this command creates a JAR file without the contents of the
> basedir. If I remove the
> 'includes="${nps-config-client-file-location-properties}"' clause,
> then the contents of the basedir are included. How can I have both
> the properties file and the contents of the base dir?
Use several nested filesets instead of trying to do everything in one
step.
<jar ...>
<fileset dir="${build}"/>
<fileset file="${nps-config-client-file-location-properties}"/>
</jar>
I'm not sure whether the file attribute of fileset works in your
(obviously dated) version of Ant, though. you may need to try a few
variations.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org