------ Cloning Projects ------ Paul Gier ------ 2008-08-02 ------ ~~ 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. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Cloning Projects By default the projects will be executed in the same directory where they are found. This means that build output will be generated with the project files. It may be helpful to copy the projects to another directory before running them, for example <<>>. This will allow <<>> to remove the output generated by all of the test projects. +------------------ ... maven-invoker-plugin ${project.version} src/it \${project.build.directory}/it integration-test run ... +------------------ There is another benefit of cloning the projects to a temporary location besides keeping the source tree free of build output. When the projects are not cloned, the plugin must use temporary POMs to perform their filtering. In contrast, cloning the projects enables the plugin to simply filter the cloned POMs in-place. Since a POM's file name remains unchanged this way, the inter-project dependencies expressed in the POMs via <<<\>>> and <<<\>>> elements remain intact, too. This in turn allows the plugin to filter all POMs that participate in a forked build rather than only the root POM of the execution. Last but not least, once the projects have been cloned and filtered by an execution of <<>>, you can browse to a cloned project and manually invoke Maven on it. This can be useful to debug the build.