blob: de0e31315c00fc88c0f62dae33a0b91a57563464 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="default"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven">
<goal name="init">
<j:set var="x" value="${servicemix.jdk14}"/>
<j:if test="${x == true}">
<j:set var="modules" value="servicemix-jbi,servicemix-core,servicemix-components,servicemix-common,servicemix-console,servicemix-soap,servicemix-gbean,servicemix-jms,servicemix-jsr181,servicemix-http,servicemix-lwcontainer"/>
<ant:echo><![CDATA[
************************************************************
* WARNING! *
* *
* Your are running a build without Java 5 modules. *
************************************************************
]]></ant:echo>
</j:if>
<ant:fileScanner var="scanner">
<ant:fileset dir="${basedir}">
<echo>init basedir=${basedir}</echo>
<u:tokenize var="includes" delim=",">${maven.multiproject.includes}</u:tokenize>
<j:forEach var="include" items="${includes}">
<ant:include name="${include}"/>
</j:forEach>
<u:tokenize var="excludes" delim=",">${maven.multiproject.excludes}</u:tokenize>
<j:forEach var="exclude" items="${excludes}">
<ant:exclude name="${exclude}"/>
</j:forEach>
</ant:fileset>
</ant:fileScanner>
<j:set var="maven.multiproject.includes" value=""/>
<j:set var="maven.multiproject.excludes" value=""/>
<j:set var="modules.directories" value=""/>
<u:tokenize var="moduleList" delim=",">${modules}</u:tokenize>
<j:set var="currentDir" value="${basedir}/"/>
<j:forEach var="file" items="${scanner.iterator()}">
<j:set var="directory" value="${file.parentFile.absolutePath}"/>
<j:set var="include" value="${file.absolutePath.substring(currentDir.length())}"/>
<j:if test="${moduleList.isEmpty() || moduleList.contains(file.parentFile.name)}">
<j:choose>
<j:when test="${context.getVariable('maven.multiproject.includes') == ''}">
<j:set var="modules.directories" value="${directory}"/>
<j:set var="maven.multiproject.includes" value="${include}"/>
</j:when>
<j:otherwise>
<j:set var="modules.directories" value="${modules.directories},${directory}"/>
<j:set var="maven.multiproject.includes" value="${maven.multiproject.includes},${include}"/>
</j:otherwise>
</j:choose>
</j:if>
</j:forEach>
</goal>
<!-- =========================================================== -->
<!-- Goal used to build subprojects -->
<!-- Note: Subprojects extends from /etc/ directory -->
<!-- =========================================================== -->
<!-- Execute default goal on subprojects. -->
<goal name="default" prereqs="init">
<j:set var="goal" value="default"/>
<attainGoal name="multiproject:goal"/>
</goal>
<!-- Build failure reports: initial file creation and data-->
<preGoal name="default">
<j:set var="generateBuildReports" value="${buildreport.generate}"/>
<j:if test="${generateBuildReports == 'true'}">
<attainGoal name="build-failure-report:init-report"/>
</j:if>
</preGoal>
<!-- Option, will only execute the default goal. -->
<goal name="build" prereqs="default"/>
<goal name="rebuild" prereqs="clean, default"/>
<goal name="rebuild-all">
<attainGoal name="clean"/>
<attainGoal name="clean-repo"/>
<attainGoal name="default"/>
</goal>
<!-- execute test goal on subprojects -->
<goal name="test" prereqs="init">
<j:set var="goal" value="test"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="convert-snapshots-auto">
<j:set var="goal" value="convert-snapshots-auto"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="rebuild-dist-bin">
<attainGoal name="rebuild-all"/>
<attainGoal name="dist:build-bin"/>
</goal>
<goal name="rebuild-it-all">
<attainGoal name="rebuild-all"/>
<attainGoal name="dist:build-bin"/>
<attainGoal name="site"/>
</goal>
<goal name="temp-site">
<attainGoal name="init"/>
<attainGoal name="multiproject:create-nav"/>
<attainGoal name="multiproject:create-overview-page"/>
<attainGoal name="site"/>
</goal>
<goal name="reports:site">
<attainGoal name="site"/>
</goal>
<goal name="servicemix:site">
<attainGoal name="multiproject:site"/>
</goal>
<!-- =========================================================== -->
<!-- Clean related goals -->
<!-- =========================================================== -->
<goal name="clean" prereqs="init">
<u:tokenize var="directories" delim=",">${modules.directories}</u:tokenize>
<ant:delete dir="${basedir}/target"/>
<j:forEach var="directory" items="${directories}">
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: ${directory} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${directory}/target"/>
<ant:delete quiet="false" failonerror="false">
<ant:fileset dir="${directory}">
<ant:include name="maven.log"/>
<ant:include name="velocity.log*"/>
<ant:include name="junit*.properties"/>
</ant:fileset>
</ant:delete>
<delete failonerror="false" dir="${directory}/ActiveMQ"/>
<delete failonerror="false" dir="${directory}/ServiceMixWDir"/>
<delete failonerror="false" dir="${directory}/rootDir"/>
<delete failonerror="false" dir="${directory}/testWDIR"/>
<delete failonerror="false" dir="${directory}/testWDR"/>
<ant:echo></ant:echo>
</j:forEach>
</goal>
<goal name="clean-repo" prereqs="init">
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: repo </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete quiet="false">
<ant:fileset dir="${maven.repo.local}/incubator-servicemix">
<ant:include name="**/*.*"/>
</ant:fileset>
</ant:delete>
</goal>
<!-- =========================================================== -->
<!-- Assembly related goals -->
<!-- =========================================================== -->
<goal name="assembly:goal" prereqs="init">
<maven:reactor
basedir="."
includes="servicemix-assembly/project.xml"
goals="${goal}"
ignoreFailures="false"/>
</goal>
<goal name="dist:build-bin" prereqs="init">
<j:set var="goal" value="dist:build-bin"/>
<attainGoal name="assembly:goal"/>
</goal>
<goal name="dist:build-src" prereqs="init">
<j:set var="goal" value="dist:build-src"/>
<attainGoal name="assembly:goal"/>
</goal>
<goal name="dist:build" prereqs="init">
<j:set var="goal" value="dist:build"/>
<attainGoal name="assembly:goal"/>
</goal>
<goal name="dist:deploy" prereqs="init">
<j:set var="goal" value="dist:deploy"/>
<attainGoal name="assembly:goal"/>
</goal>
<!-- =========================================================== -->
<!-- intellij and eclipse goal -->
<!-- =========================================================== -->
<goal name="eclipse" prereqs="init">
<j:set var="goal" value="eclipse"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="intellij" prereqs="idea"/>
<goal name="idea" prereqs="init">
<attainGoal name="idea:multiproject"/>
</goal>
<!-- =========================================================== -->
<!-- deploy and nightly build goals -->
<!-- =========================================================== -->
<goal name="nightly" prereqs="init">
<j:set var="goal" value="nightly"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="nightly-build" description="create a snapshot build and deploys it to the website">
<echo>Cleaning the directory</echo>
<attainGoal name="clean"/>
<echo>Compiling the codes</echo>
<attainGoal name="default"/>
<echo>Building the bin and src bundle </echo>
<attainGoal name="dist:build"/>
<echo>Creating deploy "site" </echo>
<attainGoal name="site:deploy"/>
</goal>
<!-- Goal that will deploy the distribution in the assembly -->
<goal name="dist:deploy" prereqs="init">
<j:set var="goal" value="dist:deploy"/>
<attainGoal name="assembly:goal"/>
</goal>
<!-- Goal that will deploy the created jar files of the subprojects -->
<goal name="jar:deploy" prereqs="init">
<j:set var="goal" value="jar:deploy"/>
<attainGoal name="multiproject:goal"/>
</goal>
<!-- Goal that will deploy the subprojects' created site -->
<goal name="site:deploy" prereqs="init">
<j:set var="goal" value="site:deploy"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="install">
<attainGoal name="multiproject:install"/>
</goal>
<goal name="dc">
<attain>
<attainGoal name="clean"/>
<attainGoal name="multiproject:install"/>
<attainGoal name="multiproject:deploy"/>
<attainGoal name="dist:deploy"/>
</attain>
</goal>
</project>