Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 34745 invoked from network); 17 Sep 2002 20:24:00 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 Sep 2002 20:24:00 -0000 Received: (qmail 9495 invoked by uid 97); 17 Sep 2002 20:24:31 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 9479 invoked by uid 97); 17 Sep 2002 20:24:30 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 9467 invoked by uid 98); 17 Sep 2002 20:24:30 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Originating-IP: [170.186.97.229] From: "William E. Kempf" To: "Ant Users List" Subject: ant-otional.jar on Linux Date: Tue, 17 Sep 2002 15:27:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: X-OriginalArrivalTime: 17 Sep 2002 20:23:51.0504 (UTC) FILETIME=[22F80D00:01C25E88] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm a Linux newbie, so this is probably something simple and obvious that I'm doing wrong. I installed ant 1.4.1 (I can't switch to 1.5 for compatibility reasons) via the RPM distribution. There's little documentation about this form of distribution installation, unfortunately. Specifically, there's no indication of how you set ANT_HOME or any other required environment variables. When I run ant to build my project with a script that works on Windows, I get the infamous "Could not create task of type: junit" with the helpful advice to add optional.jar to the ANT_HOME directory. So, I tried digging around the various scripts to see how ANT_HOME works. I see that the ant script does some magic when rpm_mode is set (which it should be), and actually adds the Jars from /usr/share/java to the classpath. So, I added a line to the script to echo what the classpath is that's used, and it indicates this: /usr/share/java/xml_apis.jar:/usr/share/java/jaxp_parser.jar:/usr/share/java /ant-optional.jar:/usr/share/java/ant.jar:/usr/java/j2sdk1.4.0_02/lib/tools. jar /usr/share/java/ant-optional.jar is a symlink to /usr/share/java/ant-optional-1.4.1.jar, so this should be the right Jar to add to the classpath, AFAICT. In fact, the entire command issued should look like this: /usr/java/j2sdk1.4.0_02/bin/java -classpath /usr/share/java/xml_apis.jar:/usr/share/java/jaxp_parser.jar:/usr/share/java /ant-optional.jar:/usr/share/java/ant.jar:/usr/java/j2sdk1.4.0_02/lib/tools. jar -Dant.home=/usr org.apache.tools.ant.Main test I can't see a thing wrong with that, so what gives? Bill Kempf -- To unsubscribe, e-mail: For additional commands, e-mail: