Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331496

Summary: Update Ant to 1.7.1 and locate tools.jar
Product: Community Reporter: Nick Boldt <nboldt>
Component: CommitterToolsAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: bbrodt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
console log of ant failure due to missing tools.jar (or equivalent from IBM JDK) none

Description Nick Boldt CLA 2010-11-30 23:19:21 EST
Created attachment 184219 [details]
console log of ant failure due to missing tools.jar (or equivalent from IBM JDK)

Using the shared "dashBuild" user on build.eclipse.org:

dashBuild@build:~> ant -version
Unable to locate tools.jar. Expected to find it in /usr/lib64/jvm/java-1_6_0-ibm-1.6.0/lib/tools.jar
Apache Ant version 1.7.0 compiled on February 25 2009

or, as a regular user:

nickb@build:~> ant -version
Unable to locate tools.jar. Expected to find it in /usr/lib64/jvm/java-1_6_0-ibm-1.6.0/lib/tools.jar
Apache Ant version 1.7.0 compiled on February 25 2009

---

Issues:

1. There are numerous bugs in 1.7.0 which are fixed in 1.7.1 (including some API changes in 1.7.1 on which Athena code depends).

2. This missing tools.jar prevents uses from using the Athena promote.xml script to publish builds from build.eclipse.org to download.eclipse.org

Attached is a log showing what happens when you try to run the promote script, and the resulting failure to resolve the chgrp task.

---

Can a new version of Ant be installed which is configured to resolve correctly against the IBM 6.0 JDK's jre/lib folder?

Thanks!
Comment 1 Nick Boldt CLA 2010-11-30 23:20:39 EST
I should also mention that this script worked fine before build.eclipse.org died and was reborn, FWIW.
Comment 2 Eclipse Webmaster CLA 2010-12-02 13:23:35 EST
So I think the best solution here is for you to make use of the ANT_HOME and JAVA_HOME environment variables, which will allow you to tailor your builds to your needs. Ant 1.7.1(and 1.8) are both installed in /shared/common as well as many JDKs that you can use.  

I'm a little leery of removing the installed rpms for Java and Ant or setting global options as those may result in more problems.

-M.
Comment 3 Nick Boldt CLA 2010-12-14 01:14:07 EST
(In reply to comment #2)
> So I think the best solution here is for you to make use of the ANT_HOME and
> JAVA_HOME environment variables, which will allow you to tailor your builds to
> your needs. Ant 1.7.1(and 1.8) are both installed in /shared/common as well as
> many JDKs that you can use.  
> 
> I'm a little leery of removing the installed rpms for Java and Ant or setting
> global options as those may result in more problems.
> 
> -M.

After some jiggery-pokery, I found one JDK that's busted (permissions?):

$ JAVA_HOME=/shared/common/ibm-java-ppc64-60-SR7 ANT_HOME=/shared/common/apache-ant-1.8.1/ ANT_LIB=/shared/common/apache-ant-1.8.1/lib/ ant -version
/usr/local/bin/ant: line 335: /shared/common/ibm-java-ppc64-60-SR7/jre/bin/java: cannot execute binary file
/usr/local/bin/ant: line 335: /shared/common/ibm-java-ppc64-60-SR7/jre/bin/java: Success


And one that works:

JAVA_HOME=/shared/common/ibm-java-x86_64-60 ANT_HOME=/shared/common/apache-ant-1.8.1/ ANT_LIB=/shared/common/apache-ant-1.8.1/lib/ ant -version
Apache Ant version 1.8.1 compiled on April 30 2010

JAVA_HOME=/shared/common/ibm-java-x86_64-60 ANT_HOME=/shared/common/apache-ant-1.7.1/ ANT_LIB=/shared/common/apache-ant-1.7.1/lib/ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008
Comment 4 Nick Boldt CLA 2010-12-14 01:19:56 EST
Added this simpler example to the wiki [1]:

$ JAVA_HOME=/shared/common/ibm-java-x86_64-60 ANT_HOME=/shared/common/apache-ant-1.8.1/ ant -version
Apache Ant version 1.8.1 compiled on April 30 2010

or

$ JAVA_HOME=/shared/common/ibm-java-x86_64-60 ANT_HOME=/shared/common/apache-ant-1.7.1/ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008


[1] http://wiki.eclipse.org/Common_Build_Infrastructure/Publishing#Example:_VE_Nightly_and_Integration_Builds
Comment 5 Eclipse Webmaster CLA 2010-12-14 14:34:49 EST
(In reply to comment #3)

> 
> After some jiggery-pokery, I found one JDK that's busted (permissions?):
> 
> $ JAVA_HOME=/shared/common/ibm-java-ppc64-60-SR7
> /usr/local/bin/ant: line 335:
> /shared/common/ibm-java-ppc64-60-SR7/jre/bin/java: cannot execute binary file
> /usr/local/bin/ant: line 335:
> /shared/common/ibm-java-ppc64-60-SR7/jre/bin/java: Success

I'm a bit surprised at the success notice as the host hardware is no longer PPC

Thanks for updating the wiki though.

Closing as 'worksforme' although I hope it's more of a 'worksforyou'.

-M.
Comment 6 Nick Boldt CLA 2010-12-15 14:37:31 EST
If the host is not ppc, why is there still a ppc JDK on there? Shouldn't that be purged and replaced w/ symlinks to the x86_64 version?
Comment 7 Eclipse Webmaster CLA 2010-12-16 11:36:19 EST
(In reply to comment #6)
> If the host is not ppc, why is there still a ppc JDK on there? Shouldn't that
> be purged and replaced w/ symlinks to the x86_64 version?

Because /shared is an nfs partition that was mounted in the same place when the host was PPC.

I'll look into 'cleaning' the PPC jdks.

-M.