ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony LaPaso" <tlap...@attbi.com>
Subject Re: ?? Simple Newbie Question ??
Date Sun, 16 Jun 2002 05:31:47 GMT
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>


Again, the problem is that nothing from "${build_dir}" is placed
in the "${dist_dir}/StatelessSession.jar". The JAR file has only
the Ant-generated MANIFEST.MF file, that's it.

You mentioned that the first example on the Jar Task page should
do the trick, and according to my tests, it does:

<jar jarfile="${dist_dir}/StatelessSession.jar"
basedir="${build_dir}"/>


BUT WHY? What's wrong with the my original code? It seems like it
should work as well. Is Ant one of those tools that you just kind
of have to "get a feel for what does and doesn't work"?

I didn't find anything in the documentation to indicate my
original script would not work.

Thanks very much,

Tony




----- Original Message -----
From: "Diane Holt" <holtdl@yahoo.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Saturday, June 15, 2002 9:10 PM
Subject: Re: ?? Simple Newbie Question ??




> --- Tony LaPaso <tlapaso@attbi.com> wrote:
> > I want to take everything in the ${build_dir} directory and
put it
> > into the JAR. Simple, right?
>
> Yes. See the first Example on the Jar task page.
>
> > Also, a related but more difficult problem. [...]
> > Here's what I want my resulting JAR file to look like:
> >
> > /+ (root)
> >  |
> >  +--META-INF+
> >  |          |
> >  |          +--ejb-jar.xml
> >  |          +--weblogic-ejb-jar.xml
> >  |          +--MANIFEST.MF
>
> See the <metainf> and <manifest> nested elements on the Jar
task page.
>
> >  |
> >  +--com+
> >        |
> >        +--abc+
> >              |
> >              +--C_1.class
> >              +--C_2.class
> >
> > Note that I do *not* want the "classes-dir" directory to
appear
> > in my resulting JAR. Can I do this?
>
>   <jar destfile="whatever.jar">
>     <fileset dir="classes" includes="com/**"/>
>   </jar>
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
>


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