| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you 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. |
| --> |
| |
| <!-- $Rev$ $Date$ --> |
| |
| <project default="bootstrap"> |
| |
| <macrodef name="mvn"> |
| <attribute name="goal"/> |
| <attribute name="dir" default="${basedir}"/> |
| <sequential> |
| <exec executable="mvn${platform.script.ext}" dir="@{dir}"> |
| <arg value="--batch-mode"/> |
| <arg value="-Dmaven.repo.local=${maven.repo.local}"/> |
| <arg value="@{goal}"/> |
| </exec> |
| </sequential> |
| </macrodef> |
| |
| <macrodef name="build-stage"> |
| <attribute name="name"/> |
| <sequential> |
| <exec executable="mvn${platform.script.ext}" dir="${basedir}"> |
| <arg value="-Dstage=@{name}"/> |
| <arg value="install"/> |
| </exec> |
| </sequential> |
| </macrodef> |
| |
| <target name="init" depends="init:discover, init:windows, init:defaults"> |
| <record name="${basedir}/bootstrap.log"/> |
| <echo>Starting bootstrap build...</echo> |
| </target> |
| |
| <target name="init:discover"> |
| <condition property="isWindows"> |
| <os family="windows"/> |
| </condition> |
| </target> |
| |
| <target name="init:windows" if="isWindows"> |
| <property name="platform.script.ext" value=".bat"/> |
| </target> |
| |
| <target name="init:defaults"> |
| <property name="platform.script.ext" value=""/> |
| <property name="maven.repo.local" value="${user.home}/.m2/repository"/> |
| </target> |
| |
| |
| <!-- ===== --> |
| <!-- Steps --> |
| <!-- ===== --> |
| |
| <target name="bootstrap" depends="clean, stage1, stage2"/> |
| |
| <target name="stage1" depends="init"> |
| <build-stage name="bootstrap"/> |
| </target> |
| |
| <target name="stage2" depends="init"> |
| <mvn goal="install"/> |
| </target> |
| |
| |
| <!-- ======== --> |
| <!-- Cleaning --> |
| <!-- ======== --> |
| |
| <target name="clean" depends="init"> |
| <echo>Cleaning...</echo> |
| |
| <mkdir dir="${maven.repo.local}"/> |
| |
| <delete> |
| <fileset dir="${maven.repo.local}"> |
| <include name="org/apache/geronimo/genesis/**"/> |
| </fileset> |
| </delete> |
| |
| <mvn goal="clean"/> |
| </target> |
| |
| </project> |