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/31 01:20:39 UTC

Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

  Hi everyone, i think I got it... but the only thing,
and hope the last one is to put the path of the file
for the 4 files I put into my jar.  After generating
the jar I checked it out, and see if those files were
added..... the files were added with no path on it :-(
 thats bad, coz I need the path that path in my jar
file.


  This is my target, if some one could tell me for the
last one, how do I put the path in my jar file

<target name="jar_ejb" depends="compile_ejb">
     <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
               
basedir="D:/vicsa/Construccion/afiliacion/EJB"
                includes="**/*.*">

<!-- here comes the file set -->
         <fileset
dir="D:/vicsa/Construccion/arquitectura/EJB/">
              <include name="FachadaGeneral.class"/>
              <include
name="FachadaGeneralHome.class"/>
         </fileset>

         <fileset
dir="D:/vicsa/Construccion/arquitectura/util/">
              <include
name="RequestMappingValue.class"/>
         </fileset>

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


  so the target works fine but the path never appears.
I would like to send you my jar file in order to have
a better idea of what Im talking about is only 10kb

=====

_________________________________________________________________

"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: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by Edgar S�nchez <ve...@yahoo.com>.
  yes your are right, my mistake, I deleted the path a
little bit :-P

  VES

--- Diane Holt <ho...@yahoo.com> wrote:
> --- Peter Donald <do...@apache.org> wrote:
> > Try something like
> > 
> > <target name="jar_ejb" depends="compile_ejb">
> >   <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
> >         basedir="D:/vicsa/Construccion"
> >         includes="afiliacion/EJB/**/*.*">
> > 
> >  <!-- here comes the file set -->
> >     <fileset dir="D:/vicsa/Construccion/">
> >        <include
> name="arquitectura/EJB/FachadaGeneral.class"/>
> >        <include
> name="arquitectura/EJB/FachadaGeneralHome.class"/>
> >     </fileset>
> > 
> >     <fileset dir="D:/vicsa/Construccion/">
> >       <include
> name="arquitectura/util/RequestMappingValue.class"/>
> >     </fileset>
> > ...
> 
> If the basedir is D:/vicsa/Construccion for all the
> files you're putting
> into this jar-file, you don't need all those
> separate <fileset>'s. You can
> just do them all as <include>'s (and save yourself
> some typing :)
> 
> Diane
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant
> messaging with Yahoo! Messenger
> http://im.yahoo.com


=====

_________________________________________________________________

"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: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by Diane Holt <ho...@yahoo.com>.
--- Peter Donald <do...@apache.org> wrote:
> Try something like
> 
> <target name="jar_ejb" depends="compile_ejb">
>   <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
>         basedir="D:/vicsa/Construccion"
>         includes="afiliacion/EJB/**/*.*">
> 
>  <!-- here comes the file set -->
>     <fileset dir="D:/vicsa/Construccion/">
>        <include name="arquitectura/EJB/FachadaGeneral.class"/>
>        <include name="arquitectura/EJB/FachadaGeneralHome.class"/>
>     </fileset>
> 
>     <fileset dir="D:/vicsa/Construccion/">
>       <include name="arquitectura/util/RequestMappingValue.class"/>
>     </fileset>
> ...

If the basedir is D:/vicsa/Construccion for all the files you're putting
into this jar-file, you don't need all those separate <fileset>'s. You can
just do them all as <include>'s (and save yourself some typing :)

Diane

=====
(holtdl@yahoo.com)



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

Re: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by T Master <tm...@iknowledgeinc.com>.
Peter D, the life saver does it again!


----- Original Message -----
From: "Edgar Sánchez" <ve...@yahoo.com>
To: <an...@jakarta.apache.org>; <do...@apache.org>
Sent: Thursday, August 30, 2001 5:59 PM
Subject: Re: Why doesn't the path on a Jar file is puted when using fileset
on a jar Tag?


>   THANKSSSS!!!! PETER!!!!!!
>
>   You save my life, no I can continue with the other
> builds, coz now, I have the real one and the others
> are the same with different paths
>
>   THANKS again!!!!!!!!
>
> VES



Re: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by Edgar S�nchez <ve...@yahoo.com>.
  THANKSSSS!!!! PETER!!!!!!

  You save my life, no I can continue with the other
builds, coz now, I have the real one and the others
are the same with different paths

  THANKS again!!!!!!!!

VES
--- Peter Donald <do...@apache.org> wrote:
> On Fri, 31 Aug 2001 09:20, Edgar "S�nchez" wrote:
> >   Hi everyone, i think I got it... but the only
> thing,
> > and hope the last one is to put the path of the
> file
> > for the 4 files I put into my jar.  After
> generating
> > the jar I checked it out, and see if those files
> were
> > added..... the files were added with no path on it
> :-(
> 
> thats because you tell it not to add path ;)
> 
> Try something like
> 
> <target name="jar_ejb" depends="compile_ejb">
>   <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
>         basedir="D:/vicsa/Construccion"
>         includes="afiliacion/EJB/**/*.*">
> 
>  <!-- here comes the file set -->
>     <fileset dir="D:/vicsa/Construccion/">
>        <include
> name="arquitectura/EJB/FachadaGeneral.class"/>
>        <include
> name="arquitectura/EJB/FachadaGeneralHome.class"/>
>     </fileset>
> 
>     <fileset dir="D:/vicsa/Construccion/">
>       <include
> name="arquitectura/util/RequestMappingValue.class"/>
>     </fileset>
> ...
> 
> 
> -- 
> Cheers,
> 
> Pete
> 
> --------------------------------------------------
> you've made a dangerous leap right over common 
> sense, like some kind of metaphysical Evil Knievel
> --------------------------------------------------


=====

_________________________________________________________________

"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: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by Peter Donald <do...@apache.org>.
On Fri, 31 Aug 2001 09:20, Edgar "Sánchez" wrote:
>   Hi everyone, i think I got it... but the only thing,
> and hope the last one is to put the path of the file
> for the 4 files I put into my jar.  After generating
> the jar I checked it out, and see if those files were
> added..... the files were added with no path on it :-(

thats because you tell it not to add path ;)

Try something like

<target name="jar_ejb" depends="compile_ejb">
  <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
        basedir="D:/vicsa/Construccion"
        includes="afiliacion/EJB/**/*.*">

 <!-- here comes the file set -->
    <fileset dir="D:/vicsa/Construccion/">
       <include name="arquitectura/EJB/FachadaGeneral.class"/>
       <include name="arquitectura/EJB/FachadaGeneralHome.class"/>
    </fileset>

    <fileset dir="D:/vicsa/Construccion/">
      <include name="arquitectura/util/RequestMappingValue.class"/>
    </fileset>
...


-- 
Cheers,

Pete

--------------------------------------------------
you've made a dangerous leap right over common 
sense, like some kind of metaphysical Evil Knievel
--------------------------------------------------

Re: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by Edgar S�nchez <ve...@yahoo.com>.
  Thanks Diane, i did it, and it worked fine.

  VES
--- Diane Holt <ho...@yahoo.com> wrote:
> Edgar,
> 
> Try just pointing "basedir" to as much of the path
> as you don't want, then
> include the part of the path you do want in the name
> of the file you pass
> to the <include>.
> 
> For example, if you're in the D:/visca when you're
> running ant, just do:
> 
>   <jar jarfile="HelloEJBAfil.jar" basedir=".">
>      <include
> name="Construccion/afiliacion/EJB/**/*.*"/>
>      <include
>
name="Construccion/arquitectura/EJB/FachadaGeneral.class"/>
>      <include name=...
>   </jar>
> 
> Diane
> --- Edgar S�nchez <ve...@yahoo.com> wrote:
> >   Hi everyone, i think I got it... but the only
> thing,
> > and hope the last one is to put the path of the
> file
> > for the 4 files I put into my jar.  After
> generating
> > the jar I checked it out, and see if those files
> were
> > added..... the files were added with no path on it
> :-(
> >  thats bad, coz I need the path that path in my
> jar
> > file.
> > 
> > 
> >   This is my target, if some one could tell me for
> the
> > last one, how do I put the path in my jar file
> > 
> > <target name="jar_ejb" depends="compile_ejb">
> >      <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
> >                
> > basedir="D:/vicsa/Construccion/afiliacion/EJB"
> >                 includes="**/*.*">
> > 
> > <!-- here comes the file set -->
> >          <fileset
> > dir="D:/vicsa/Construccion/arquitectura/EJB/">
> >               <include
> name="FachadaGeneral.class"/>
> >               <include
> > name="FachadaGeneralHome.class"/>
> >          </fileset>
> > 
> >          <fileset
> > dir="D:/vicsa/Construccion/arquitectura/util/">
> >               <include
> > name="RequestMappingValue.class"/>
> >          </fileset>
> > 
> >          <fileset
> > dir="D:/vicsa/Construccion/seguridad/EJB/">
> >               <include name="EmpresaValue.class"
> />
> >          </fileset>
> >   </jar>
> > </target>
> > 
> > 
> >   so the target works fine but the path never
> appears.
> > I would like to send you my jar file in order to
> have
> > a better idea of what Im talking about is only
> 10kb
> > 
> > =====
> > 
> >
>
_________________________________________________________________
> > 
> > "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
> 
> > ATTACHMENT part 2 application/x-zip-compressed
> name=HelloEJBAfil.jar
> 
> 
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant
> messaging with Yahoo! Messenger
> http://im.yahoo.com


=====

_________________________________________________________________

"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: Why doesn't the path on a Jar file is puted when using fileset on a jar Tag?

Posted by Diane Holt <ho...@yahoo.com>.
Edgar,

Try just pointing "basedir" to as much of the path as you don't want, then
include the part of the path you do want in the name of the file you pass
to the <include>.

For example, if you're in the D:/visca when you're running ant, just do:

  <jar jarfile="HelloEJBAfil.jar" basedir=".">
     <include name="Construccion/afiliacion/EJB/**/*.*"/>
     <include name="Construccion/arquitectura/EJB/FachadaGeneral.class"/>
     <include name=...
  </jar>

Diane
--- Edgar S�nchez <ve...@yahoo.com> wrote:
>   Hi everyone, i think I got it... but the only thing,
> and hope the last one is to put the path of the file
> for the 4 files I put into my jar.  After generating
> the jar I checked it out, and see if those files were
> added..... the files were added with no path on it :-(
>  thats bad, coz I need the path that path in my jar
> file.
> 
> 
>   This is my target, if some one could tell me for the
> last one, how do I put the path in my jar file
> 
> <target name="jar_ejb" depends="compile_ejb">
>      <jar jarfile="D:/vicsa/HelloEJBAfil.jar"
>                
> basedir="D:/vicsa/Construccion/afiliacion/EJB"
>                 includes="**/*.*">
> 
> <!-- here comes the file set -->
>          <fileset
> dir="D:/vicsa/Construccion/arquitectura/EJB/">
>               <include name="FachadaGeneral.class"/>
>               <include
> name="FachadaGeneralHome.class"/>
>          </fileset>
> 
>          <fileset
> dir="D:/vicsa/Construccion/arquitectura/util/">
>               <include
> name="RequestMappingValue.class"/>
>          </fileset>
> 
>          <fileset
> dir="D:/vicsa/Construccion/seguridad/EJB/">
>               <include name="EmpresaValue.class" />
>          </fileset>
>   </jar>
> </target>
> 
> 
>   so the target works fine but the path never appears.
> I would like to send you my jar file in order to have
> a better idea of what Im talking about is only 10kb
> 
> =====
> 
> _________________________________________________________________
> 
> "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

> ATTACHMENT part 2 application/x-zip-compressed name=HelloEJBAfil.jar



=====
(holtdl@yahoo.com)



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