ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Murdoch <adammurd...@apache.org>
Subject Re: ?? Simple Newbie Question ??
Date Mon, 17 Jun 2002 06:50:43 GMT
On Mon, 17 Jun 2002 15:07, Tony LaPaso wrote:
> Adam,
>
> I'd like to follow-up on your second point below...Then I'll drop
> this topic...
>
> <see below...>
>
> ----- Original Message -----
> From: "Adam Murdoch" <adammurdoch@apache.org>
> To: "Ant Users List" <ant-user@jakarta.apache.org>
> 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
> <fileset>,
> 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
> ignored).
>
> - The includes attribute should be a pattern, like
> "${build_dir}/**",
> 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
> mypackage/test/**.
>
> So, shouldn't includes="${build_dir}/" be treated the same as
> includes="${build_dir}/**"?
>
> 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?

Absolutely.  I'd forgotten all about the trailing slash shortcut.

-- 
Adam

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


Mime
View raw message