ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony LaPaso" <>
Subject Re: ?? Simple Newbie Question ??
Date Mon, 17 Jun 2002 05:07:59 GMT

I'd like to follow-up on your second point below...Then I'll drop
this topic...

<see below...>

----- Original Message -----
From: "Adam Murdoch" <>
To: "Ant Users List" <>
Sent: Sunday, June 16, 2002 7:46 PM
Subject: Re: ?? Simple Newbie Question ??

On Sun, 16 Jun 2002 15:31, Tony LaPaso wrote:
> Diane,
> Thank you for the tip about <metainf>, it was exactly what I
> needed.
> Your comment about my first example, however, still leaves me
> wondering what was wrong with my original code. Here's my first
> example again:
> <target name="jar_ejb" depends="compile_ejb">
>    <jar jarfile="${dist_dir}/StatelessSession.jar"
>         includes="${build_dir}/"
>         update="yes">
>    </jar>
> </target>

<adam said>
There are 2 problems with this:

- You need to privde either a basedir attribute, or a nested
otherwise <jar> doesn't add anything to the jar file except a
manifest (yes,
it probably should warn you that 'includes' is going to be

- The includes attribute should be a pattern, like
otherwise <jar> will only add ${build_dir} itself to the jar.

</adam said>

The "Directory-based Tasks" docs says, "There is one
'shorthand' - if a pattern ends with / or \, then ** is appended.
For example, mypackage/test/ is interpreted as if it were

So, shouldn't includes="${build_dir}/" be treated the same as

My testing indicates they are identical -- neither form causes
any files in the ${build_dir} to be placed in the JAR. So, the
"includes" attrribute is ignored because of what you said in your
first point...BUT if a "basedir" or nested <fileset> WERE
specified, then the includes could be specified as either
includes="${build_dir}/" or includes="${build_dir}/**", since
they are identical, correct?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message