Unless otherwise specificed the default selection mechanism is based on the current working directory. Projects to be included within a selection are resolved such that any project declaring a base directory equal to or deeper than the current working directory will be handled as a selection candidate.
Example of directory-based selection:
$ cd main/metro $ build -l
Selection: [9] [1] project:dpml/metro/dpml-state-api [2] project:dpml/metro/dpml-state-impl [3] project:dpml/metro/dpml-metro-component [4] project:dpml/metro/dpml-metro-model [5] project:dpml/metro/dpml-metro-runtime [6] project:dpml/metro/dpml-metro-tools [7] project:dpml/metro/dpml-metro-test [8] project:dpml/metro/dpml-station-exec [9] module:dpml/metro
Project selection can be overriden by providing the fully-qualified project path in the form <module>[/<module>[..]]/<resource-name>].
Example of a request to build a specific project:
$ build -select dpml/metro/dpml-metro-model clean install
$ build -s dpml/metro/dpml-metro-model clean install
-------------------------------------------------------------------------
dpml/metro/dpml-metro-model
-------------------------------------------------------------------------
standard.init:
init:
clean:
[delete] Deleting directory C:\dev\dpml\main\metro\model\target
standard.init:
init:
prepare:
[x:prepare] Created dir: C:\dev\dpml\main\metro\model\target
[x:prepare] Created dir: C:\dev\dpml\main\metro\model\target\build\main
[x:prepare] Copying 43 files to C:\dev\dpml\main\metro\model\target\build\main
[x:prepare] Created dir: C:\dev\dpml\main\metro\model\target\build\test
[x:prepare] Copying 13 files to C:\dev\dpml\main\metro\model\target\build\test
[x:prepare] Created dir: C:\dev\dpml\main\metro\model\target\test
build:
[javac] Created dir: C:\dev\dpml\main\metro\model\target\classes\main
[javac] Compiling 40 source files to C:\dev\dpml\main\metro\model\target\classes\main
[javac] Copying 3 files to C:\dev\dpml\main\metro\model\target\classes\main
package:
[jar] Created dir: C:\dev\dpml\main\metro\model\target\deliverables\jars
[jar] Building jar: C:\dev\dpml\main\metro\model\target\deliverables\jars\dpml-metro-model-SNAPSHOT.jar
[jar] Creating md5 checksum
test:
[javac] Created dir: C:\dev\dpml\main\metro\model\target\classes\test
[javac] Compiling 13 source files to C:\dev\dpml\main\metro\model\target\classes\test
[junit] Created dir: C:\dev\dpml\main\metro\model\target\reports\test
[junit] executing in local jvm
[junit] Running net.dpml.metro.data.test.ComponentDirectiveTestCase
[junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 0.281 sec
[junit] Running net.dpml.metro.data.test.FeatureDirectiveTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.031 sec
[junit] Running net.dpml.metro.data.test.PartReferenceTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.031 sec
[junit] Running net.dpml.metro.data.test.ReferenceDirectiveTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.032 sec
[junit] Running net.dpml.metro.info.test.CategoryDescriptorTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.031 sec
[junit] Running net.dpml.metro.info.test.ContextDescriptorTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
[junit] Running net.dpml.metro.info.test.EntryDescriptorTestCase
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
[junit] Running net.dpml.metro.info.test.InfoDescriptorTestCase
[junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed: 0.063 sec
[junit] Running net.dpml.metro.info.test.TypeTestCase
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.125 sec
[junit] Running net.dpml.metro.test.ValidationExceptionTestCase
[junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.015 sec
install:
[x:install] Copying 2 files to C:\osm\Data\cache\dpml\metro
BUILD SUCCESSFUL
Total time: 6 secondsThe builder provides support for the selection of multiple project for both build and list scenarios. Wildcards include the ** and * patterns.
Example command to list of all top-level projects:
$ build -list *
Example command to list all projects:
$ build -list **/*
Example command to list all projects ending with -api:
$ build -list **/*-api
Example command to select all projects in a module:
$ build -select dpml/util/*
Example command to select all projects containing the word tools:
$ build -select **/*tools*
When using the -list option the information listed to console will be expanded if the selection is a single project. If the selection is multi-project the projects will be listed a number sequence in normal build order.
Example of a multi-project listing:
$ build -list **/dpml-metro-*
Selection: [5] [1] project:dpml/metro/dpml-metro-model [2] project:dpml/metro/dpml-metro-runtime [3] project:dpml/metro/dpml-metro-tools [4] project:dpml/metro/dpml-metro-test [5] project:dpml/metro/dpml-station-exec
Example of a single project listing:
$ build -list **/dpml-metro-runtime
Listing project: dpml/metro/dpml-metro-model
project:dpml/metro/dpml-metro-model
version: SNAPSHOT
basedir: C:\dev\dpml\main\metro\model
types: (1)
jar
runtime providers: (5)
project:dpml/metro/dpml-state-api
project:dpml/util/dpml-parameters-api
project:dpml/util/dpml-configuration-api
resource:dpml/transit/dpml-transit-main
project:dpml/metro/dpml-metro-component
test providers: (12)
resource:ant/ant-launcher
resource:ant/ant-trax
resource:ant/ant-xslp
resource:ant/ant
resource:junit/junit
resource:ant/ant-junit
project:dpml/metro/dpml-state-api
project:dpml/util/dpml-configuration-api
project:dpml/util/dpml-configuration-impl
project:dpml/metro/dpml-state-impl
project:dpml/util/dpml-parameters-api
project:dpml/util/dpml-parameters-impl