ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony LaPaso" <tlap...@attbi.com>
Subject ?? Simple Newbie Question ??
Date Sun, 16 Jun 2002 00:56:18 GMT
May I ask a what must be a simple question (actually,it's two
questions)?

I'm using Ant v1.5b2.

I have the following task to create a JAR file. I want to take
everything in the ${build_dir} directory and put it into the JAR.
Simple, right? Here's the task I used:

<target name="jar_ejb" depends="compile_ejb">
   <jar jarfile="${dist_dir}/StatelessSession.jar"
        includes="${build_dir}/"
        update="yes">
   </jar>
</target>


I've used <echo> to ensure ${dist_dir} and ${build_dir} are
correct. When I run this task, the only thing the JAR file
contains is the default manifest (MANIFEST.MF) generated by jar.
It does *not* contain any of the files in my ${build_dir}
directory! Damn it!! What am I doing wrong? Can I not use
"${build_dir}/" in the includes? If not, where the heck is that
documented?


Also, a related but more difficult problem. I have the following
directories and files. The ".xml" and ".class" items are, of
course, files while everything else is a directory.


build-dir+
         |
         +--META-INF+
         |          |
         |          +--ejb-jar.xml
         |          +--weblogic-ejb-jar.xml
         |
         +--classes-dir+
                       |
                       +--com+
                             |
                             +--abc+
                                   |
                                   +--C_1.class
                                   +--C_2.class


I want to construct a JAR file using the jar task. I think I
should be able to somehow use "includes" and "excludes". Here's
what I want my resulting JAR file to look like:

/+ (root)
 |
 +--META-INF+
 |          |
 |          +--ejb-jar.xml
 |          +--weblogic-ejb-jar.xml
 |          +--MANIFEST.MF
 |
 +--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? Can anyone offer a
suggestion? What would the "includes" and "excludes" look like?

Thanks very much...

Tony





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