blob: 04103da2a049c15422fc4d5785f8b97c39a749e6 [file] [log] [blame]
<!--
* weinre is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
* Copyright (c) 2010, 2011 IBM Corporation
-->
<project name="get-vendor" default="get-vendor" basedir=".">
<property file="personal.properties"/>
<property file="build.properties"/>
<property file="vendor.properties"/>
<!-- ============================================================ -->
<target name="get-vendor">
<echo>Go get some coffee, this is going to take a while</echo>
<delete dir="${TMP}"/>
<delete dir="${VENDOR}"/>
<mkdir dir="${VENDOR}"/>
<antcall target="get-cli"/>
<antcall target="get-json4j"/>
<antcall target="get-jetty"/>
<antcall target="get-scooj"/>
<antcall target="get-modjewel"/>
<antcall target="get-web-inspector"/>
<antcall target="get-swt-mac"/>
</target>
<!-- ============================================================ -->
<target name="get-cli">
<delete dir="${VENDOR}/cli"/>
<mkdir dir="${VENDOR}/cli"/>
<delete dir="${TMP}"/>
<mkdir dir="${TMP}"/>
<get src="${CLI_URL}" dest="${TMP}/commons-cli.zip" verbose="false"/>
<unzip src="${TMP}/commons-cli.zip" dest="${TMP}">
<patternset>
<include name="${CLI_BASENAME}-sources.jar"/>
<include name="${CLI_BASENAME}.jar"/>
</patternset>
</unzip>
<copy file="${TMP}/${CLI_BASENAME}.jar" tofile="${VENDOR}/cli/commons-cli.jar"/>
<copy file="${TMP}/${CLI_BASENAME}-sources.jar" tofile="${VENDOR}/cli/commons-cli-src.jar"/>
<delete dir="${TMP}"/>
</target>
<!-- ============================================================ -->
<target name="get-json4j">
<delete dir="${VENDOR}/json4j"/>
<mkdir dir="${VENDOR}/json4j"/>
<delete dir="${TMP}"/>
<mkdir dir="${TMP}"/>
<get src="${JSON4J_BIN_URL}" dest="${TMP}/json4j.zip" verbose="false"/>
<unzip src="${TMP}/json4j.zip" dest="${TMP}">
<patternset>
<include name="**/wink-json4j-${JSON4J_VERSION}.jar"/>
</patternset>
</unzip>
<copy file="${TMP}/apache-wink-${JSON4J_VERSION}/ext/wink-json4j-provider/lib/wink-json4j-${JSON4J_VERSION}.jar" tofile="${VENDOR}/json4j/json4j.jar"/>
<delete dir="${TMP}"/>
<mkdir dir="${TMP}"/>
<get src="${JSON4J_SRC_URL}" dest="${TMP}/json4j-src.zip" verbose="false"/>
<unzip src="${TMP}/json4j-src.zip" dest="${TMP}/src">
<patternset>
<include name="**/wink-json4j/src/main/java/org/apache/wink/json4j/**/*"/>
</patternset>
</unzip>
<zip destfile="${VENDOR}/json4j/json4j-src.jar" basedir="${TMP}/src"/>
<delete dir="${TMP}"/>
</target>
<!-- ============================================================ -->
<target name="get-jetty">
<delete dir="${VENDOR}/jetty"/>
<mkdir dir="${VENDOR}/jetty"/>
<get src="${JETTY_SRC_URL}" dest="${VENDOR}/jetty/jetty-src.jar" verbose="false"/>
<get src="${JETTY_BIN_URL}" dest="${VENDOR}/jetty/jetty.jar" verbose="false"/>
<get src="${JAVAX_SERVLET_URL}" dest="${VENDOR}/jetty/servlet-api.jar" verbose="false"/>
</target>
<!-- ============================================================ -->
<target name="get-scooj">
<delete dir="${VENDOR}/scooj"/>
<mkdir dir="${VENDOR}/scooj"/>
<get src="${SCOOJ_URL_PREFIX}/scooj.js" dest="${VENDOR}/scooj/scooj.js" verbose="false"/>
<get src="${SCOOJ_URL_PREFIX}/scoopc.py" dest="${VENDOR}/scooj/scoopc.py" verbose="false"/>
</target>
<!-- ============================================================ -->
<target name="get-modjewel">
<delete dir="${VENDOR}/modjewel"/>
<mkdir dir="${VENDOR}/modjewel"/>
<get src="${MODJEWEL_URL_PREFIX}/modjewel-require.js" dest="${VENDOR}/modjewel/modjewel-require.js" verbose="false"/>
<get src="${MODJEWEL_URL_PREFIX}/module2transportd.py" dest="${VENDOR}/modjewel/module2transportd.py" verbose="false"/>
</target>
<!-- ============================================================ -->
<target name="get-web-inspector">
<delete dir="${VENDOR}/webkit"/>
<mkdir dir="${VENDOR}/webkit/WebCore"/>
<exec executable="svn" dir="${VENDOR}/WebKit/WebCore">
<arg value="export"/>
<arg value="-r"/>
<arg value="${WEBKIT_VERSION}"/>
<arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/inspector"/>
</exec>
<exec executable="svn" dir="${VENDOR}/WebKit/WebCore">
<arg value="export"/>
<arg value="-r"/>
<arg value="${WEBKIT_VERSION}"/>
<arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/English.lproj"/>
</exec>
<exec executable="svn" dir="${VENDOR}/WebKit/WebCore">
<arg value="export"/>
<arg value="-r"/>
<arg value="${WEBKIT_VERSION}"/>
<arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/css/CSSPropertyNames.in"/>
</exec>
<exec executable="grep" outputproperty="gpl-grep-results" dir="${VENDOR}/WebKit/WebCore">
<arg value="-r"/>
<arg value="GPL"/>
<arg value="."/>
</exec>
<condition property="found-no-gpl-files">
<equals arg1="" arg2="${gpl-grep-results}"/>
</condition>
<fail unless="found-no-gpl-files" message="The string GPL was found in the WebKit files"/>
</target>
<target name="get-swt-mac">
<delete dir="${VENDOR}/swt"/>
<mkdir dir="${VENDOR}/swt"/>
<delete dir="${TMP}"/>
<mkdir dir="${TMP}"/>
<get src="${SWT_URL_PREFIX}/swt-${SWT_VERSION_MAJOR}-cocoa-macosx-x86_64.zip" dest="${TMP}/swt.zip" verbose="false"/>
<unzip src="${TMP}/swt.zip" dest="${TMP}"/>
<copy file="${TMP}/src.zip" tofile="${VENDOR}/swt/cocoa-macosx-x86_64/swt-src.jar"/>
<copy file="${TMP}/swt-debug.jar" tofile="${VENDOR}/swt/cocoa-macosx-x86_64/swt.jar"/>
<delete dir="${TMP}"/>
</target>
</project>