ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chappell, Simon P" <Simon.Chapp...@landsend.com>
Subject RE: ant-otional.jar on Linux
Date Tue, 17 Sep 2002 21:27:36 GMT
In my experience with RPM's and RH Linux, I have found a good general rule to be that packages
that I just want to use (e.g. Mozilla) I use the RPM and care nothing for the install location.
Packages that I care deeply about and will be using in active development, I skip the RPM
and perform a "real" install. This gives me full control over where and how it is installed.

Ant was just such a package. I went with the "real" install and installed it in /usr/local/jakarta-ant
so that I would know where it was and what exactly I had to work with.

RPM is great for general stuff, but skip it for "rubber meets the road" development tools.
:-)

Hope that this helps.

Simon

-----------------------------------------------------------------
Simon P. Chappell                     simon.chappell@landsend.com
Java Programming Specialist                      www.landsend.com
Lands' End, Inc.                                   (608) 935-4526


>-----Original Message-----
>From: William E. Kempf [mailto:williamkempf@hotmail.com]
>Sent: Tuesday, September 17, 2002 4:23 PM
>To: Ant Users List
>Subject: Re: ant-otional.jar on Linux
>
>
>Sorry, read my post closer.  I *know* how to set environment variables.
>What I don't know is where ANT_HOME is when using the RPM 
>install, since the
>files, as per normal convention on Unix, are spread across 
>several (common)
>directories that don't correspond to the simple concept of 
>ANT_HOME.  For
>instance, it appears that the scripts installed by the RPM set 
>ANT_HOME for
>you, and set it to /usr, but the Jar files aren't located in 
>/usr/lib, as
>they would be on Windows (or, AFAICT, as they would be if I'd built Ant
>instead of installing the binary RPM package, though in that 
>case it would
>be more like /usr/ant/lib), but rather they are found in 
>/usr/share/java.
>
>In any event, the scripts magically, AFAICT, set the 
>environment to work
>with this alternate directory structure.  In fact, I posted 
>the command line
>used to invoke ant, and it clearly sets the classpath to include
>ant-optional.jar.  Yet I still receive the "infamous" error message
>indicating the junit task couldn't be located.
>
>So, this isn't a Unix issue, per se, and I still need advice.
>
>Bill Kempf
>
>----- Original Message -----
>From: "Scott Francis" <scott.francis@newisys.com>
>To: "Ant Users List" <ant-user@jakarta.apache.org>
>Sent: Tuesday, September 17, 2002 3:39 PM
>Subject: RE: ant-otional.jar on Linux
>
>
>The questions that you are asking really are more of UNIX issues than
>anything else.  Setting of the environment variables can 
>change from shell
>to shell, but using bash (which hopefully is your default), 
>you can set env
>vars in this manner
>
>export ANT_HOME=/home/ant/jakarta_1_4-1
>
>or something similar.
>
>I would HIGHLY recommend picking up a book on Linux or UNIX 
>before really
>trying to tackle running builds on them.  You will be banging 
>you head on
>the wall trying to figure out whether your issues are OS or 
>tool related if
>you don't have a decent grounding
>
>Scott
>
>-----Original Message-----
>From: William E. Kempf [mailto:williamkempf@hotmail.com]
>Sent: Tuesday, September 17, 2002 3:28 PM
>To: Ant Users List
>Subject: ant-otional.jar on Linux
>
>
>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:/u
>sr/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:/u
>sr/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:   
<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>


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