blob: 6d80aaa8dc7f2f0d93866b582c4a1f6b15876f12 [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="jbi,core,base,servicemix-common,servicemix-jms,servicemix-jsr181"/>
<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 name="rebuild" prereqs="clean,default"/>
<goal name="rebuild-all">
<attainGoal name="clean"/>
<attainGoal name="clean-repo"/>
<attainGoal name="default"/>
</goal>
<goal name="build" prereqs="default"/>
<goal name="default" prereqs="init">
<j:set var="goal" value="default"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="assembly:goal" prereqs="init">
<maven:reactor
basedir="."
includes="assembly/project.xml"
goals="${goal}"
ignoreFailures="false"
/>
</goal>
<goal name="default" prereqs="init">
<j:set var="goal" value="default"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="nightly" prereqs="init">
<j:set var="goal" value="nightly"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="dist:build-bin" prereqs="init">
<j:set var="goal" value="dist:build-bin"/>
<attainGoal name="assembly:goal"/>
</goal>
<goal name="dist:deploy" prereqs="init">
<j:set var="goal" value="dist:deploy"/>
<attainGoal name="assembly:goal"/>
</goal>
<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>
<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}/servicemix">
<ant:include name="**/servicemix*.*"/>
</ant:fileset>
</ant:delete>
</goal>
<goal name="test" prereqs="init">
<j:set var="goal" value="test"/>
<attainGoal name="multiproject:goal"/>
</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>
<goal name="jar:deploy" prereqs="init">
<j:set var="goal" value="jar:deploy"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="site:deploy" prereqs="init">
<j:set var="goal" value="site:deploy"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="jar:install" prereqs="init">
<j:set var="goal" value="jar:install"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="install">
<attainGoal name="multiproject:install"/>
</goal>
<goal name="servicemix:site">
<attainGoal name="multiproject:site"/>
</goal>
<goal name="convert-snapshots-auto">
<j:set var="goal" value="convert-snapshots-auto"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="dc">
<attain>
<attainGoal name="clean"/>
<attainGoal name="multiproject:install"/>
<attainGoal name="multiproject:deploy"/>
<attainGoal name="dist:deploy"/>
</attain>
</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="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 name="reports:site">
<attainGoal name="site"/>
</goal>
</project>