ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: What is ${classpath}
Date Sun, 25 Aug 2002 01:22:16 GMT
Garrett,

I answered your question over on the jGuru Ant Forum.

http://www.jguru.com/forums/view.jsp?EID=988401

The best way to learn Ant (before Steve and I's book :) was to look at 
examples of build files and cut-and-paste and do some trial and error. 
Ant's documentation doesn't really give much in the way of build file 
examples and best practices.  Once you know what you need, the Ant 
documentation is a fantastic reference though.

Let us know if you have further questions.

	Erik


garrett smith wrote:
> <plaintext title='this email will not be parsed'>
> 
> 
> Martin,
> 
> It is good that you were able to find what you needed in the manual. I have
> read through the manual and I did not find an explanation for classpath. That
> is why I posted my question. I got past the part of downloading every jarfile
> and putting it in lib, starting ant, and running a simple build file with no
> jarfiles. Is there a particular page or part of the manual that you can
> recommend? Perhaps if I reread it, it will make sense to me. If it doesn't make
> sense, then I can ask somebody for an explanation.
> 
> Everyone Else on Ant-User List,
> 
> I would like to compile a simple project which has requires some jar files in
> the classpath. Two jar files are in $ANT_HOME/lib and one file is in
> $TOMCAT_HOME/common/lib. Has anyone done this before?
> 
> 
> Garrett
> 
> 
> --- Martin Gainty <mgainty@hotmail.com> wrote:
> 
> <HR>
> <html><div style='background-color:'><DIV>
> <P><BR>Garrett:</P>
> <P>the ${classpath} is the&nbsp;path for your classes that ant uses when
> building your project's build.xml<BR>check this out:<BR><A
> href="http://jakarta.apache.org/ant/manual/using.html">http://jakarta.apache.org/ant/manual/using.html</A><BR>Hope
> this helps,</P></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV><FONT face="Lucida Handwriting, Cursive" color=#000000 size=4>Martin
> Gainty<BR><FONT face="Verdana, Geneva, Arial, Sans-serif" size=3></DIV>
> <DIV></DIV>
> <DIR><FONT color=#0000ff size=1>
> <DIV></DIV>
> <P>______________________________________________</FONT><FONT face=Arial
> size=1><B><FONT face=Arial size=2></FONT></B></FONT></P>
> <DIV></DIV>
> <P><FONT face=Arial size=1><B><FONT face=Arial size=2>Disclaimer
and
> confidentiality note</B></FONT></FONT></P>
> <DIV></DIV>
> <P><FONT face=Arial size=1><FONT face=Arial size=2>Everything in this
e-mail
> and any attachments relating to the official business of Laconia Data
> Systems</FONT><FONT face=Arial color=#0000ff size=2> </FONT><FONT
face=Arial
> size=2>(LDS) is proprietary to the company. It is confidential, legally
> privileged and protected by law.&nbsp;</FONT><FONT face=Arial color=#0000ff
> size=2><FONT color=#000000>LDS</FONT> </FONT><FONT face=Arial
size=2>does not
> own and endorse any other content. Views and opinions are those of the sender
> unless clearly stated as being that of LDS. </FONT></FONT></P>
> <DIV></DIV>
> <P><FONT face=Arial size=1><FONT face=Arial size=2>The person addressed
in the
> e-mail is the sole authorised recipient. Please notify the sender immediately
> if it has unintentionally reached you and do not read, disclose or use the
> content in any way.</P>
> <DIV></DIV>
> <P align=justify></P>
> <DIV></DIV>
> <P>LDS&nbsp;can not assure that the integrity of this communication has been
> maintained nor that it is free of errors, virus, interception or
> interference.</P></FONT></FONT><FONT color=#0000ff></DIR>
> <DIV></DIV>
> <P><FONT
> size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_______________________________________________</FONT></P>
> <DIV></DIV>
> <P>&nbsp;</P></FONT>
> <DIV></DIV></FONT></FONT>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>
> <DIV></DIV>&gt;From: garrett smith <JAVADEVMAC2@YAHOO.COM>
> <DIV></DIV>&gt;Reply-To: "Ant Users List" <ANT-USER@JAKARTA.APACHE.ORG>
> <DIV></DIV>&gt;To: ant-user@jakarta.apache.org 
> <DIV></DIV>&gt;Subject: What is ${classpath} 
> <DIV></DIV>&gt;Date: Sat, 24 Aug 2002 13:31:35 -0700 (PDT) 
> <DIV></DIV>&gt;MIME-Version: 1.0 
> <DIV></DIV>&gt;Received: from nagoya.betaversion.org ([192.18.49.131])
by
> mc2-f32.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Sat, 24 Aug
> 2002 13:31:46 -0700 
> <DIV></DIV>&gt;Received: (qmail 19810 invoked by uid 97); 24 Aug 2002
20:32:05
> -0000 
> <DIV></DIV>&gt;Received: (qmail 19798 invoked by uid 98); 24 Aug 2002
20:32:05
> -0000 
> <DIV></DIV>&gt;Mailing-List: contact ant-user-help@jakarta.apache.org;
run by
> ezmlm 
> <DIV></DIV>&gt;Precedence: bulk 
> <DIV></DIV>&gt;List-Unsubscribe:
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> <DIV></DIV>&gt;List-Subscribe: <mailto:ant-user-subscribe@jakarta.apache.org>
> <DIV></DIV>&gt;List-Help: <mailto:ant-user-help@jakarta.apache.org>
> <DIV></DIV>&gt;List-Post: <mailto:ant-user@jakarta.apache.org>
> <DIV></DIV>&gt;List-Id: "Ant Users List" <ANT-USER.JAKARTA.APACHE.ORG>
> <DIV></DIV>&gt;Delivered-To: mailing list ant-user@jakarta.apache.org

> <DIV></DIV>&gt;X-Antivirus: nagoya (v4218 created Aug 14 2002) 
> <DIV></DIV>&gt;Message-ID:
> &lt;20020824203135.83801.qmail@web21504.mail.yahoo.com&gt; 
> <DIV></DIV>&gt;X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 
> <DIV></DIV>&gt;Return-Path:
> ant-user-return-24245-mgainty=hotmail.com@jakarta.apache.org 
> <DIV></DIV>&gt;X-OriginalArrivalTime: 24 Aug 2002 20:31:46.0470 (UTC)
> FILETIME=[44281C60:01C24BAD] 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;Hey, 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;Trying to make sense of the docs, but I have so many questions.

> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;What is ${classpath}? 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;I am trying to add activation.jar, mail.jar, and servlet.jar
to
> my classpath 
> <DIV></DIV>&gt;within ant. It is really easy to do via command line,
but I am
> trying to learn 
> <DIV></DIV>&gt;how to do it with ant. 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;Here is my buildfile: 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;<?xml version="1.0"?> <DIV></DIV>&gt;<!--
build file for lesson 2 --> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;<PROJECT name="login" basedir="." default="build">
<DIV></DIV>&gt; 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt; <TARGET name="build">
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt; <CLASSPATH>
> <DIV></DIV>&gt; <PATHELEMENT path="${classpath}" />
> <DIV></DIV>&gt; <FILESET dir=${ANT_HOME}/common/lib/>
> <DIV></DIV>&gt; <INCLUDE name="mail.jar" />
> <DIV></DIV>&gt; <INCLUDE name="activation.jar" />
> <DIV></DIV>&gt; </FILESET>
> <DIV></DIV>&gt; <FILESET dir=${TOMCAT_HOME}/common/lib/>
> <DIV></DIV>&gt; <INCLUDE name="servlet.jar" />
> <DIV></DIV>&gt; </FILESET>
> <DIV></DIV>&gt; <PATHELEMENT location="classes" />
> <DIV></DIV>&gt; </CLASSPATH>
> <DIV></DIV>&gt; <JAVAC DIV < srcdir=".">&gt; debug="true"

> <DIV></DIV>&gt; optimize="false" 
> <DIV></DIV>&gt; includes="**/*.java" 
> <DIV></DIV>&gt; /&gt; 
> <DIV></DIV>&gt; </TARGET>
> <DIV></DIV>&gt;</PROJECT> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;And when run: 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;Buildfile: build.xml 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;build: 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;BUILD FAILED 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;/development/tomcat/webapps/login/WEB-INF/classes/build.xml:9:
> Could not create 
> <DIV></DIV>&gt;task of type: classpath. Common solutions are to use taskdef
to
> declare your 
> <DIV></DIV>&gt;task, or, if this is an optional task, to put the optional.jar
> in the lib 
> <DIV></DIV>&gt;directory of your ant installation (ANT_HOME). 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;Total time: 1 second 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;__________________________________________________ 
> <DIV></DIV>&gt;Do You Yahoo!? 
> <DIV></DIV>&gt;Yahoo! Finance - Get real-time stock quotes 
> <DIV></DIV>&gt;http://finance.yahoo.com 
> <DIV></DIV>&gt; 
> <DIV></DIV>&gt;-- 
> <DIV></DIV>&gt;To unsubscribe, e-mail:
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> <DIV></DIV>&gt;For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> <DIV></DIV></mailto:ant-user-help@jakarta.apache.org></mailto:ant-user-unsubscribe@jakarta.apache.org></mailto:ant-user@jakarta.apache.org></mailto:ant-user-help@jakarta.apache.org></mailto:ant-user-subscribe@jakarta.apache.org></mailto:ant-user-unsubscribe@jakarta.apache.org></div><br
> clear=all><hr>Send and receive Hotmail on your mobile device: <a
> href='http://g.msn.com/1HM1ENUS/c152??PI=44364'>Click Here</a><br></html>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 



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