------ Mvn ------ Paul Gier ------ 2009-05-06 ------ ~~ 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 The Mvn Task <> The Maven Ant Tasks have some limited support for calling a full Maven build from Ant. The <<>> task is a subclass of the Ant {{{http://ant.apache.org/manual/CoreTasks/java.html}java}} task and supports all of its options such as args, fork, resultproperty, etc. If Maven is already installed on the local system, the Maven build can be called using this local installation by specifying the <<>> parameter. ----- ----- Maven will search for a pom.xml file in the current directory and run the <<>> goal. If the pom file is not located in the current directory, an alternate path to the pom can be specified. ----- ----- Running the Mvn Task without a Maven Installation If no local Maven installation is available, the mvn task will attempt to resolve (download) the necessary jar files from the central Maven repository and run the Maven build using these jar files. When the <<>> attribute is not set, the <<>> task will attempt to automatically resolve the required jar files. ----- ----- <> Using the Java Task The java task can be used directly without any need for the Maven Ant Tasks. However, this method requires that Maven is already installed on the system. A property called <<>> must be set to point to the local Maven installation, then an Ant macro can be defined for calling Maven. ----- ----- This example defines an Ant macro called <<>>. The macro can then be used in the build like this: ----- -----