ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edgar "Sánchez" <vesanc...@yahoo.com>
Subject Re: includes and excludes
Date Thu, 30 Aug 2001 19:03:58 GMT
  T master i saw the code you sent to Kyle, and I
tried to used it, because I need to do the same, well
i think so, but with the minimun difference that I
need to put another file which is in another
directory, different from the first and second one,
this is how my target looks like:

<target name="jar_ejb" depends="compile_ejb">
     <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
               
basedir="D:/vicsa/Construccion/afiliacion/EJB"
                includes="$**/*.class">
         <metainf
dir="D:/vicsa/vicsa/intelgas/arquitectura/EJB/">
              <include name="FachadaGeneral.class" />
              <include name="FachadaHome.class" />
         </metainf>

       <metainf
dir="D:/vicsa/Construccion/seguridad/EJB/">
              <include name="EmpresaValue.class" />
         </metainf>
  </jar>
</target>


but running the build says:

D:\vicsa\Construccion\afiliaciontest.xml:51: Class
org.apache.tools.ant.taskdefs.Jar doesn't support the
nested "metainf" element.

  Is there a way to use the metainf target to use it
with a diferent directory, in order to put into the
jar another class???

  thanks
VES

--- T Master <tmaster@iknowledgeinc.com> wrote:
> Here you go:
> This works for me, so if it doesn't for you.... OMG!
> Generally from all examples I've seen, you keep your
> excludes AFTER your
> includes.  Stick to that order for readabiity and
> maintenance.
> 
> I've not done anything with an excludes and includes
> such as yours.
> 
> 
> <target name="jarProject" depends="init,
> compileProject">
> -     <jar jarfile="${dist.dir}/${app.name}.jar"
>                 basedir="${build.dir}"
>                
> includes="${project.path}/**/*.class"
>                
> excludes="${project.path}/**/*Test.class">
> -         <metainf
> dir="${src.dir}/${project.path.ejb}">
>               <include name="ejb-jar.xml" />
>               <include name="weblogic-ejb-jar.xml"
> />
>       </metainf>
>   </jar>
> </target>
> 
> 
> ----- Original Message -----
> From: "Kyle Adams" <kadams@gfs.com>
> To: <ant-user@jakarta.apache.org>
> Sent: Thursday, August 30, 2001 9:09 AM
> Subject: Re: includes and excludes
> 
> 
> I'm still stuck on this problem - anyone have even a
> smidgen of an idea?
> 
> >>> kadams@gfs.com 08/27/01 10:38AM >>>
> I'm looking for clarification on exactly how
> includes and excludes work.
> I need to package two JARs for weblogic - one for
> the java classpath,
> one for the weblogic classpath.  The directory bar
> should be excluded
> from one, and included in the other, EXCEPT when bar
> is a subdirectory
> of foo.  I had thought this would handle it:
> 
> <!-- Weblogic classpath jar -->
> <jar jarfile="wcp.jar" basedir="${base.dir}"
> whenempty="skip">
>     <include name="**/bar/*.class" />
>     <exclude name="**/foo/bar/*" />
> </jar>
> 
> <!-- Java classpath jar -->
> <jar jarfile="jcp.jar" basedir="${base.dir}"
> whenempty="skip"
> defaultexcludes="false">
>     <exclude name="**/bar/*" />
>     <include name="**/foo/bar/*.class" />
> </jar>
> 
> But the jcp.jar is skipped, which leads me to
> believe that the last
> <include> does not override the <exclude>.  Or that
> my syntax is just
> incorrect :-)
> 
> Kyle
> 
> 


=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero estás condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Mime
View raw message