| <!-- |
| 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. |
| --> |
| <project name="org.apache.easyant.plugins#build-tools" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ac="antlib:net.sf.antcontrib" |
| xmlns:ea="antlib:org.apache.easyant"> |
| |
| <ea:core-version requiredrevision="[0.9,+]" /> |
| <ea:parameter property="project.ivy.instance" default="project.ivy.instance" description="ivy instance name" /> |
| <ea:parameter property="project.ivy.file" required="true" |
| description="ivy file (use to resolve dependencies for the project)" /> |
| <ea:parameter property="pre.module.targets" default="validate,clean" |
| description="list of targets that must be executed BEFORE subproject(s) delegation" /> |
| <ea:parameter property="submodule.dirs" |
| description="pattern or comma-separated list indicating which submodules directories should be included in the build" |
| default="**/*" /> |
| <ea:parameter property="metabuild.root" description="root directory level of a metabuild project" |
| default="${basedir}" /> |
| <ea:parameter property="metabuild.includes" description="Pattern describing modules to include in a metabuild" |
| default="${submodule.dirs}" /> |
| <ea:parameter property="metabuild.excludes" description="Pattern describing modules to exclude in a metabuild" |
| default="**/src/ **/lib/ **/target/ **/bin module.ivy" /> |
| <ea:parameter property="metabuild.mode" description="defines execution mode of metabuild feature (all,dependents,dependencies)" |
| default="all" /> |
| |
| <fileset id="submodules.fileset" dir="${metabuild.root}" includes="${metabuild.includes}" excludes="${metabuild.excludes}"> |
| <filename name="**/module.ivy" /> |
| </fileset> |
| <condition property="current-module" value="${ivy.module}" else="*"> |
| <available file="module.ivy" /> |
| </condition> |
| |
| <ac:if> |
| <equals arg1="dependencies" arg2="${metabuild.mode}" /> |
| <ac:then> |
| <ivy:buildlist reference="build-path" root="${current-module}" ivyfilepath="module.ivy" |
| excluderoot="true" settingsref="easyant.ivy.instance"> |
| <fileset refid="submodules.fileset" /> |
| </ivy:buildlist> |
| </ac:then> |
| <ac:elseif> |
| <equals arg1="dependents" arg2="${metabuild.mode}" /> |
| <ac:then> |
| <ivy:buildlist reference="build-path" leaf="${current-module}" ivyfilepath="module.ivy" |
| excludeleaf="true" settingsref="easyant.ivy.instance"> |
| <fileset refid="submodules.fileset" /> |
| </ivy:buildlist> |
| </ac:then> |
| </ac:elseif> |
| <ac:else> |
| <ivy:buildlist reference="build-path" ivyfilepath="module.ivy" settingsref="easyant.ivy.instance"> |
| <fileset refid="submodules.fileset" /> |
| </ivy:buildlist> |
| </ac:else> |
| </ac:if> |
| </project> |