grab external deps via ant

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4073 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2011-03-10 22:06:18 +00:00
parent 8c894950c5
commit 13ca8a7aa8
2 changed files with 69 additions and 36 deletions

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.ibm.wala.cast.java.polyglot" default="getJars" basedir=".">
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
<property name="basenl" value="${nl}"/>
<!-- Compiler settings. -->
<property name="javacFailOnError" value="true"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="false"/>
<property name="logExtension" value=".log"/>
<property name="compilerArg" value=""/>
<property name="javacSource" value="1.5"/>
<property name="javacTarget" value="1.5"/>
<!-- This property has been updated to correspond to the paths used by the latest Java update
on Mac OS X 10.6 (Java version 1.6.0_22). If you are not using this version of Mac OS X or Java,
try changing the value of the property to "${java.home}/../../../Classes" -->
<condition property="dir_bootclasspath" value="${java.home}/../Classes">
<os family="mac"/>
</condition>
<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<property name="bundleJavacSource" value="${javacSource}"/>
<property name="bundleJavacTarget" value="${javacTarget}"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="RhinoPresent" depends="init">
<available file="${plugin.destination}/lib/js.jar" property="rhino.present"/>
</target>
<target name="fetchRhino" depends="RhinoPresent" unless="rhino.present">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<get src="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R5.zip" dest="${temp.folder}/rhino1_6R5.zip" />
<unzip src="${temp.folder}/rhino1_6R5.zip" dest="${temp.folder}"/>
<copy file="${temp.folder}/rhino1_6R5/js.jar" tofile="${plugin.destination}/lib/js.jar" />
<delete dir="${temp.folder}"/>
</target>
<target name="getJars" depends="fetchRhino" />
<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins">
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
<condition property="build.result.folder" value="${pluginTemp}/com.ibm.wala.core.testdata">
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
</project>

View File

@ -1,36 +0,0 @@
#!/bin/bash
#REAL_NAME=`realpath $0`
MY_DIR=`pwd`
TMP=$MY_DIR/tmp
if [[ ! -e $MY_DIR/js.jar ]]; then
mkdir -p $TMP
cd $TMP
wget -O rhino1_6R5.zip ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R5.zip
unzip rhino1_6R5.zip rhino1_6R5/js.jar
cp rhino1_6R5/js.jar $MY_DIR/js.jar
cd $MY_DIR
rm -rf $TMP
fi
if [[ ! -e $MY_DIR/xalan.jar ]]; then
mkdir -p $TMP
cd $TMP
wget -O xalan-j_2_7_0-bin.tar.gz http://archive.apache.org/dist/xml/xalan-j/xalan-j_2_7_0-bin.tar.gz
tar xzf xalan-j_2_7_0-bin.tar.gz xalan-j_2_7_0/xalan.jar
cp xalan-j_2_7_0/xalan.jar $MY_DIR/xalan.jar
cd $MY_DIR
rm -rf $TMP
fi