You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Edgar S�nchez <ve...@yahoo.com> on 2001/08/30 21:21:34 UTC

path on jar files, using 2 filesets for different directories

  I used the fileset in order to put, different files
(*.class) from different directories, but when I
checked the generated jar, there is a path missing, I
think that would be my problem about the message a
get, everytime i run the buil, something about a
missing class, this class is now already in my jar
file, but it doesn't have the path.

  Is there a way to put the path into the jar file?? 
my target is as shows:

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

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


 The files FachadaGeneral, FachadaGeneralHome and
EmpresaValue. class are the files without the path in
the jar.

  The message after running the build refers
EmpresaValue as a missing file.

 Thanks???


--- Peter Donald <do...@apache.org> wrote:
> I believe that excludes will always take precedence
> and thus chuck out your 
> includes "matches". What you may be able to do is
> something like
> 
> <jar jarfile="jcp.jar" whenempty="skip"
> defaultexcludes="false">
>     <fileset dir="${base.dir}">
>       <exclude name="**/bar/*" />
>     </fileset>
>     <fileset dir="${base.dir}">
>       <include name="**/foo/bar/*.class" />
>     </fileset>
> </jar>
> 
> Not sure - haven't checked it works but try that ;)
> 
> On Fri, 31 Aug 2001 01:09, Kyle Adams wrote:
> > 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
> 
> -- 
> Cheers,
> 
> Pete
> 
> ---------------------------------------------------
> "Marriage, Friends, Religon -- these are the demons 
> you must slay in order to suceed in business.." 
>                  -- Mr. Burns, The Simpsons 
> ---------------------------------------------------


=====

_________________________________________________________________

"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

Re: Setting a property value by default and as a parameter

Posted by T Master <tm...@iknowledgeinc.com>.
Easy

Set the property in your buildfile.

Then if u set it from the command line, it takes precedence.
e,g,

ant -Dcchome="fubar"


in your build xml file, use ${cchome} to refer to it.

Define the default value at the <project> level:
    <property name="cchome" value="default"/>




T Master.

----- Original Message -----
From: "Derek Gibbs" <dg...@smartsynch.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, August 30, 2001 3:01 PM
Subject: Setting a property value by default and as a parameter


> I am trying to set a property variable with a default value and also give
> the user the ability to change it from the command line. Does anyone have
a
> good way of doing this?
>
> Currently I am setting an environment variable each time that I want to
> change the default location of my source code. We are using ClearCase and
I
> have several views that I would like to build from at anytime. I have all
of
> the build script using a cchome variable that I need to have a default
value
> for as well as being able to set it from the command line.
>
> Thanks,
> Derek Gibbs
>
>
>


Setting a property value by default and as a parameter

Posted by Derek Gibbs <dg...@smartsynch.com>.
I am trying to set a property variable with a default value and also give
the user the ability to change it from the command line. Does anyone have a
good way of doing this?

Currently I am setting an environment variable each time that I want to
change the default location of my source code. We are using ClearCase and I
have several views that I would like to build from at anytime. I have all of
the build script using a cchome variable that I need to have a default value
for as well as being able to set it from the command line.

Thanks,
Derek Gibbs