You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "fmarchioni@libero.it" <fm...@libero.it> on 2002/06/27 17:26:16 UTC

How to include multiple classpath directories ?

Hi all,
I'd like to use ant to compile classes that use EJB and
Web Services jars. As I don't want to include all the
jars I need, I'd like just to give JBoss lib's dir and
JWservicesPack lib's dir.

I have tried with this target but it only includes JBoss libs...

<target name="compile" >
   
     <path id="additional.path">
            <fileset dir="C:\jwsdp-1_0-ea2\server\lib">
               <include name="**/*.jar"/>
            </fileset>
          </path>
   
       <path id="base.path">
            <fileset dir="c:\JBoss-2.4.4\lib">
               <include name="**/*.jar"/>
            </fileset>
         
           <!-- append the external classpath lastly -->
           <pathelement path="${additional.path}" />
       </path>

      

   <javac srcdir="."  destdir="." includes="Test.java" 
     classpathref="base.path"   />
             
 
  </target>


Please can anybody tell me how to include all jars found in JBoss & 
JWSDP dir without listing them all ??
Thanks a lot
Francesco

Re: How to include multiple classpath directories ?

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 27 Jun 2002, <fm...@libero.it> wrote:

> Please can anybody tell me how to include all jars found in JBoss & 
> JWSDP dir without listing them all ??

So many way, chose the one you like best ...

<path id="combined">
  <path refid="base.path" />
  <path refid="additional.path" />
</path>

<javac ... classpathref="combined" ... />

or

<javac no-classpath-ref>
  <classpath>
    <path refid="base.path" />
    <path refid="additional.path" />
  </classpath>
</javac>

or

<javac classpathref="base.path">
  <classpath refid="additional.path" />
</javac>

or 

...

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>