blob: 22683cddefe2a7fe817aa8a5b010d1b2e828d2f1 [file] [log] [blame]
<!--
******************************************************************************
* Copyright (c) 2017 Oracle
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Konstantin Komissarchik - initial implementation and ongoing maintenance
******************************************************************************
-->
<project name="dtp" default="full-build">
<dirname property="root.dir" file="${ant.file.dtp}"/>
<property name="build.dir" value="${root.dir}/build"/>
<property name="releng.dir" value="${root.dir}/releng"/>
<delete dir="releng/corundum" quiet="true"/>
<property name="corundum-url" value="https://hudson.eclipse.org/sapphire/job/Corundum/lastSuccessfulBuild/artifact/corundum.zip"/>
<get src="${corundum-url}" dest="releng/corundum.zip" usetimestamp="true"/>
<unzip src="releng/corundum.zip" dest="releng/corundum"/>
<import file="releng/corundum/corundum.xml"/>
<import>
<fileset dir="releng/corundum/extensions/eclipse.org" includes="*.xml"/>
</import>
<!--
locate-source
-->
<macrodef name="locate-source">
<sequential>
<if>
<not>
<and>
<isset property="source.location"/>
<available file="${source.location}"/>
</and>
</not>
<then>
<echo message="Copying plugins and features into a consolidated source folder..."/>
<var name="source.location" value="${build.dir}/source"/>
<delete dir="${source.location}" quiet="true"/>
<mkdir dir="${source.location}"/>
<for param="git.repo">
<dirset dir="${root.dir}/../.." includes="org.eclipse.*" excludes="org.eclipse.datatools.nl"/>
<sequential>
<copy todir="${source.location}">
<fileset dir="@{git.repo}" includes="plugins/**"/>
<fileset dir="@{git.repo}" includes="features/**"/>
</copy>
</sequential>
</for>
<copy todir="${source.location}/features">
<fileset dir="${root.dir}/releng" includes="org.eclipse.datatools/**"/>
</copy>
</then>
</if>
</sequential>
</macrodef>
<!--
clean-source
-->
<macrodef name="clean-source">
<sequential>
<delete dir="${build.dir}/source" quiet="true"/>
<var name="source.location" unset="true"/>
</sequential>
</macrodef>
<!--
pre-finalize-repository
-->
<macrodef name="pre-finalize-repository">
<sequential>
<delete>
<fileset dir="${build.dir}/repository">
<include name="epl-v10.html"/>
<include name="notice.html"/>
<include name="${root.feature}_*.jar"/>
</fileset>
</delete>
<with-target name="${configuration.recommended}">
<for list="javax.wsdl,javax.xml,net.sourceforge.lpg.lpgjavaruntime,org.apache.xerces,org.apache.xml.resolver,org.apache.xml.serializer,org.apache.lucene.core,org.apache.lucene.analyzers-common,org.apache.lucene.queryparser" param="bundle">
<sequential>
<echo message="Mirroring @{bundle} bundle"/>
<find-eclipse-bundle property=".bundle" eclipse="${.target}" bundle="@{bundle}"/>
<copy file="${.bundle}" todir="${build.dir}/repository/plugins"/>
<var name=".bundle" unset="true"/>
</sequential>
</for>
</with-target>
</sequential>
</macrodef>
</project>