diff --git a/src/site/apt/examples/classpaths.apt.vm b/src/site/apt/examples/classpaths.apt.vm deleted file mode 100644 index 5f90bf1..0000000 --- a/src/site/apt/examples/classpaths.apt.vm +++ /dev/null @@ -1,167 +0,0 @@ - ------ - Using the classpaths - ------ - Carlos Sanchez, Franz Allan Valencia See - ------ - 2006-07-27 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -Referencing the Maven Classpaths - - The plugin sets a property in the Ant build for each project dependency. - Each property name uses the format <>. - - For example, to show the path to a jar dependency with groupId "org.apache" and - artifactId "common-util", use this: - -+---+ -#set( $D = '$' ) - -+---+ - - If the dependency includes a classifier, the plugin appends the classifier - to the property name. For example, groupId "org.apache", artifactId - "common-util", type "jar", and classifier "jdk14": - -+---+ -#set( $D = '$' ) - -+---+ - - <> the old format <> is not supported - in version 3.0.0 of the plugin. - - You can also use these classpath references: - - * <<>> - - * <<>> - - * <<>> - - * <<>> - To display Maven's classpaths with antrun, use this: - -+---+ - - 4.0.0 - my-test-app - my-test-group - 1.0-SNAPSHOT - - - - - - org.apache.maven.plugins - maven-antrun-plugin - ${project.version} - - - compile - compile - - - - - - - - - - - - - - - run - - - - - - - - -+---+ - - Or use an external <<>>: - -+---+ - - 4.0.0 - my-test-app - my-test-group - 1.0-SNAPSHOT - - - - - - org.apache.maven.plugins - maven-antrun-plugin - ${project.version} - - - compile - compile - - - - - - - - - - - - - - run - - - - - - - -+---+ - - The <<>>: - -+---+ - - - - - - - - - - - - - -+---+ diff --git a/src/site/apt/examples/tasksAttributes.apt.vm b/src/site/apt/examples/tasksAttributes.apt.vm deleted file mode 100644 index 87adc20..0000000 --- a/src/site/apt/examples/tasksAttributes.apt.vm +++ /dev/null @@ -1,66 +0,0 @@ - ------ - Using tasks attributes - ------ - Vincent Siveton - ------ - 2006-09-30 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -Using <<<\>>> Attributes - - You can use attributes in the <<<\>>> configuration to run or skip - Ant tasks. The attributes depend on conditions. To skip the Ant call, add - this: - -+---+ - - ... - - - ... - - org.apache.maven.plugins - maven-antrun-plugin - ${project.version} - - - - - - - - - - - - run - - - - - ... - - - ... - -+---+ diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm deleted file mode 100644 index 3f74ab7..0000000 --- a/src/site/apt/index.apt.vm +++ /dev/null @@ -1,83 +0,0 @@ - ------ - Introduction - ------ - Kenney Westerhof, Franz Allan Valencia See - ------ - 2013-07-22 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -${project.name} - - This plugin runs Ant tasks from inside Maven. You can embed your Ant - scripts in the POM. - - This plugin does not intend to fill the POM with your Ant tasks. Move all - your Ant tasks to a <<>> file. Call the file from the POM with - Ant's {{{https://ant.apache.org/manual/Tasks/ant.html}\ task}}. - - The main purpose of this plugin is to help projects migrate from Ant to - Maven. Some projects depend on custom build functions that Maven does not - provide by default. These projects cannot migrate yet. - -* Goals Overview - - * {{{./run-mojo.html}antrun:run}} runs Ant tasks for Maven. - -* Major Version Upgrade to version 3.0.0 - - The following parameters are removed from the plugin configuration: - - * <<>>: use <<>> instead. - - * <<>> and <<>>: use the - {{{https://www.mojohaus.org/build-helper-maven-plugin/}build-helper-maven-plugin}} instead. Use its - {{{https://www.mojohaus.org/build-helper-maven-plugin/add-source-mojo.html}add-source}} and - {{{https://www.mojohaus.org/build-helper-maven-plugin/add-test-source-mojo.html}add-test-source}} goals. - - The format <<>> no longer references the path of a - project dependency as an Ant property. Use <<>> instead. - -* Usage - - The {{{./usage.html}usage page}} contains general instructions for the AntRun Plugin. The examples below - describe specific use cases. - - If you have questions about the plugin, read the {{{./faq.html}FAQ}}. Contact the - {{{./mailing-lists.html}user mailing list}}. The mailing list posts are archived. An older thread can - contain the answer to your question. Browse the {{{./mailing-lists.html}mail archive}}. - - If the plugin misses a feature or has a defect, report it in the {{{./issue-management.html}issue tracker}}. - Describe the issue in detail. The developers must reproduce your problem to fix a bug. Attach debug logs, - POMs, or a small demo project to the issue. Patches are welcome. Get the project from the - {{{./scm.html}source repository}}. Read the {{{/guides/development/guide-helping.html}guide to helping with Maven}} - for more information. - -* Examples - - These examples show how to use the Maven AntRun Plugin: - - * {{{./examples/classpaths.html}Referencing the Maven Classpaths}} - - * {{{./examples/tasksAttributes.html}Using <<<\>>> Attributes}} - - * {{{./examples/customTasks.html}Using tasks not included in Ant's default jar}} diff --git a/src/site/apt/tasks/attachArtifact.apt.vm b/src/site/apt/tasks/attachArtifact.apt.vm deleted file mode 100644 index 593242a..0000000 --- a/src/site/apt/tasks/attachArtifact.apt.vm +++ /dev/null @@ -1,75 +0,0 @@ - ------ - AttachArtifact Task - ------ - Paul Gier - ------ - 2010-05-21 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -AttachArtifact Task - - This task attaches an artifact to the current Maven project. Use the task - to install and deploy an artifact that the Ant tasks generate. - -* Task Parameters - -*---------------+--------------------------------------------------------+-----------------------------------* -|| Attribute || Description || Required | -*---------------+--------------------------------------------------------+-----------------------------------* -| file | The file to attach to the project | Yes | -*---------------+--------------------------------------------------------+-----------------------------------* -| classifier | The classifier assigned to the artifact | No. Defaults to no classifier | -*---------------+--------------------------------------------------------+-----------------------------------* -| type | The type of the artifact, zip, war, etc | No. Defaults to jar | -*---------------+--------------------------------------------------------+-----------------------------------* - - -* Example - - This example shows how to use the <<>> task. - -+---+ - - org.apache.maven.plugins - maven-antrun-plugin - ${project.version} - - - attach-artifact - package - - run - - - - - - - - - - -+---+ diff --git a/src/site/apt/tasks/dependencyFilesets.apt.vm b/src/site/apt/tasks/dependencyFilesets.apt.vm deleted file mode 100644 index 55818d7..0000000 --- a/src/site/apt/tasks/dependencyFilesets.apt.vm +++ /dev/null @@ -1,93 +0,0 @@ - ------ - DependencyFileSets Task - ------ - Paul Gier - ------ - 2010-03-19 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -DependencyFilesets Task - - This task creates fileset objects that contain the Maven project - dependencies. You can use the task to access a specific dependency - artifact. You can also use the task to operate on a set of dependency - artifacts. Each artifact gets a fileset ID in the form - <<<[prefix]groupId:artifactId:[classifier]:type>>>. A junit jar dependency - gets the fileset ID <<>>. - - The task also creates a fileset with all the project dependencies. The - fileset uses the default ID maven.project.dependencies. - -* Task Parameters - -*---------------+--------------------------------------------------------+-----------------------------------* -|| Attribute || Description || Required | -*---------------+--------------------------------------------------------+-----------------------------------* -| prefix | String to prepend to all fileset IDs | No. Defaults to empty string | -*---------------+--------------------------------------------------------+-----------------------------------* -| projectDependenciesId | RefId for the fileset with all project dependencies | No. Defaults to maven.project.dependencies | -*---------------+--------------------------------------------------------+-----------------------------------* -| scopes | Comma separated list of artifact scopes to include | No. Defaults to all artifacts | -*---------------+--------------------------------------------------------+-----------------------------------* -| types | Comma separated list of artifact types to include | No. Defaults to all artifacts | -*---------------+--------------------------------------------------------+-----------------------------------* - - -* Example - - This example shows how to access individual dependencies and the combined - dependency fileset. - -+---+ - - org.apache.maven.plugins - maven-antrun-plugin - ${project.version} - - - copy-dependencies - package - - run - - - - - - - - - - - - - - - - - - - - - -+---+ diff --git a/src/site/apt/tasks/tasks.apt.vm b/src/site/apt/tasks/tasks.apt.vm deleted file mode 100644 index fd92e17..0000000 --- a/src/site/apt/tasks/tasks.apt.vm +++ /dev/null @@ -1,43 +0,0 @@ - ------ - Ant Tasks - ------ - Paul Gier - ------ - 2010-03-19 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -Ant Tasks - - The Maven Antrun Plugin includes custom Ant tasks. The tasks improve the - integration with the Maven build. This page lists the tasks. Click a task - name for more information and examples. - -*-----------------------------------------------------+--------------------------------------------------------+ -|| Task || Description | -*---------------+--------------------------------------------------------+ -| {{{./attachArtifact.html}attachartifact}} | Attach an artifact to the current Maven project | -*---------------+--------------------------------------------------------+ -| {{{./dependencyFilesets.html}dependencyfilesets}} | Creates a fileset for each Maven project dependency and adds the filesets to the Ant build | -*---------------+--------------------------------------------------------+ -| {{{./versionMapper.html}versionMapper}} | Removes the version from artifact filenames | -*---------------+--------------------------------------------------------+ diff --git a/src/site/apt/tasks/versionMapper.apt.vm b/src/site/apt/tasks/versionMapper.apt.vm deleted file mode 100644 index ee183f6..0000000 --- a/src/site/apt/tasks/versionMapper.apt.vm +++ /dev/null @@ -1,68 +0,0 @@ - ------ - VersionMapper - ------ - Paul Gier - ------ - 2010-05-21 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -VersionMapper - - This is an Ant mapper. The mapper removes the version from a dependency - artifact filename. - -* Example - - This example shows how to use the version mapper. - -+---+ - - org.apache.maven.plugins - maven-antrun-plugin - ${project.version} - - - copy-dependencies - package - - run - - - - - - - - - - - - - - - - -+---+ diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm deleted file mode 100644 index 613682e..0000000 --- a/src/site/apt/usage.apt.vm +++ /dev/null @@ -1,225 +0,0 @@ - ------ - Usage - ------ - Kenney Westerhof, Franz Allan Valencia See, Vincent Siveton - ------ - 2006-09-30 - ------ - - ~~ 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: - ~~ https://maven.apache.org/doxia/references/apt-format.html - -Usage - -* Run - - The maven-antrun-plugin has only one goal, <<>>. - - This goal lets Maven run Ant tasks. You need an existing project. The - plugin must have its <<<\>>> tag configured. Without this tag, - the plugin executes but does nothing. Below is the template for - <<>>'s <<>>. - -+---+ - - [...] - - - - maven-antrun-plugin - ${project.version} - - - - - - - - - - - - run - - - - - - - [...] - -+---+ - - You can add a script to each lifecycle phase. Duplicate the - <<<\>>> section. Specify a new phase in each copy. - - You can specify Ant {{{http://ant.apache.org/manual/using.html#targets}<<<\>>>}} attributes in the - <<<\>>> tag. The plugin wraps all Ant <<<\>>> attributes except <<>>. - -+---+ -[...] - - - - - - - -[...] -+----+ - -* Additional source directories - - If your Ant tasks generate source code, use the - {{{http://www.mojohaus.org/build-helper-maven-plugin/}build-helper-maven-plugin}} to add the code to the - build. The <<>> and <<>> options are removed in version 3.0.0. - -* Using Maven properties - - All Maven properties are also available in the target configuration. When - you call an external Ant build script with the task, the plugin passes - only a subset of the properties. The subset prevents name conflicts. The - subset includes all properties in the section of the POM. The - subset also includes prefixed versions of common Maven properties. - ------- - maven.project.groupId - maven.project.artifactId - maven.project.name - etc. ------- - - If a Maven property is not available in an external file, define the - property before you call . - -+---+ - - -+---+ - -* Ant Expressions to Maven Expressions Mapping - - Some Ant expressions have a counterpart in Maven. You can use the Maven - expression instead of maven-antrun-plugin. This avoids extra work. - -*-----------------------------------+-----------------------------------+ -| <> | <> | -*-----------------------------------+-----------------------------------+ -| Built-in Tasks | | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-antrun-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-antrun-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{/guides/introduction/introduction-to-profiles.html}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{/guides/introduction/introduction-to-profiles.html}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-dependency-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-ear-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -| | | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-jar-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-jar-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-compiler-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-javadoc-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-jar-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -| | | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-war-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-assembly-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| Optional Tasks | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-antlr-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-dependency-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-ejb-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-deploy-plugin/}<<>>}} | -| | | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-compiler-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-compiler-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-compiler-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-surefire-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-surefire-report-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-deploy-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-deploy-plugin/}<<>>}} | -*-----------------------------------+-----------------------------------+ -| <<>> | {{{../maven-resources-plugin/}<<>>}} | -| | | -*-----------------------------------+-----------------------------------+ diff --git a/src/site/markdown/examples/classpaths.md.vm b/src/site/markdown/examples/classpaths.md.vm new file mode 100644 index 0000000..9bbd9cc --- /dev/null +++ b/src/site/markdown/examples/classpaths.md.vm @@ -0,0 +1,149 @@ + + +# Referencing the Maven Classpaths + +The plugin sets a property in the Ant build for each project dependency. Each property name uses the format **groupId:artifactId:type\[:classifier\]**. + +For example, to show the path to a jar dependency with groupId "org.apache" and artifactId "common-util", use this: + +```unknown +#set( $D = '$' ) + +``` + +If the dependency includes a classifier, the plugin appends the classifier to the property name. For example, groupId "org.apache", artifactId "common-util", type "jar", and classifier "jdk14": + +```unknown +#set( $D = '$' ) + +``` + +**Note:** the old format **maven.dependency.groupId.artifactId\[.classifier\].type.path** is not supported in version 3.0.0 of the plugin. + +You can also use these classpath references: + +- `maven.compile.classpath` +- `maven.runtime.classpath` +- `maven.test.classpath` +- `maven.plugin.classpath` To display Maven's classpaths with antrun, use this: + + ```xml + + 4.0.0 + my-test-app + my-test-group + 1.0-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${project.version} + + + compile + compile + + + + + + + + + + + + + + + run + + + + + + + + + ``` + + Or use an external `build.xml`: + + ```xml + + 4.0.0 + my-test-app + my-test-group + 1.0-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${project.version} + + + compile + compile + + + + + + + + + + + + + + run + + + + + + + + ``` + + The `build.xml`: + + ```xml + + + + + + + + + + + + + + ``` diff --git a/src/site/apt/examples/customTasks.apt.vm b/src/site/markdown/examples/customTasks.md.vm similarity index 63% rename from src/site/apt/examples/customTasks.apt.vm rename to src/site/markdown/examples/customTasks.md.vm index 22c070c..c6a36ff 100644 --- a/src/site/apt/examples/customTasks.apt.vm +++ b/src/site/markdown/examples/customTasks.md.vm @@ -1,38 +1,27 @@ - ------ - Using tasks not included in Ant's default jar - ------ - Carlos Sanchez - ------ - 2008-07-15 - ------ + -Using tasks not included in Ant's default jar +# Using tasks not included in Ant's default jar - To use Ant tasks that are not in the Ant jar, add the task dependencies to - the plugin classpath. Use the <<>> reference if - needed. +To use Ant tasks that are not in the Ant jar, add the task dependencies to the plugin classpath. Use the `maven.plugin.classpath` reference if needed. -+---+ +```xml 4.0.0 my-test-app @@ -53,7 +42,7 @@ Using tasks not included in Ant's default jar - + @@ -79,11 +68,11 @@ Using tasks not included in Ant's default jar -+---+ +``` - Another example uses the {{{http://ant-contrib.sourceforge.net/}Ant-Contrib}} tasks: +Another example uses the [Ant-Contrib](http://ant-contrib.sourceforge.net/) tasks: -+---+ +```xml [...] @@ -125,4 +114,4 @@ Using tasks not included in Ant's default jar -+---+ +``` diff --git a/src/site/markdown/examples/tasksAttributes.md.vm b/src/site/markdown/examples/tasksAttributes.md.vm new file mode 100644 index 0000000..cc65477 --- /dev/null +++ b/src/site/markdown/examples/tasksAttributes.md.vm @@ -0,0 +1,55 @@ + + +# Using `` Attributes + +You can use attributes in the `` configuration to run or skip Ant tasks. The attributes depend on conditions. To skip the Ant call, add this: + +```xml + + ... + + + ... + + org.apache.maven.plugins + maven-antrun-plugin + ${project.version} + + + + + + + + + + + + run + + + + + ... + + + ... + +``` diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md new file mode 100644 index 0000000..54a83b5 --- /dev/null +++ b/src/site/markdown/index.md @@ -0,0 +1,53 @@ + + +# Apache Maven AntRun Plugin +This plugin runs Ant tasks from inside Maven. You can embed your Ant scripts in the POM. + +This plugin does not intend to fill the POM with your Ant tasks. Move all your Ant tasks to a `build.xml` file. Call the file from the POM with Ant's [<ant/> task](https://ant.apache.org/manual/Tasks/ant.html). + +The main purpose of this plugin is to help projects migrate from Ant to Maven. Some projects depend on custom build functions that Maven does not provide by default. These projects cannot migrate yet. + +## Goals Overview + +- [antrun:run](./run-mojo.html) runs Ant tasks for Maven. +## Major Version Upgrade to version 3.0.0 + +The following parameters are removed from the plugin configuration: + +- `tasks`: use `target` instead. +- `sourceRoot` and `testSourceRoot`: use the [build-helper-maven-plugin](https://www.mojohaus.org/build-helper-maven-plugin/) instead. Use its [add-source](https://www.mojohaus.org/build-helper-maven-plugin/add-source-mojo.html) and [add-test-source](https://www.mojohaus.org/build-helper-maven-plugin/add-test-source-mojo.html) goals. + +The format `maven.dependency.groupId.artifactId[.classifier].type.path` no longer references the path of a project dependency as an Ant property. Use `groupId:artifactId:type[:classifier]` instead. + +## Usage + +The [usage page](./usage.html) contains general instructions for the AntRun Plugin. The examples below describe specific use cases. + +If you have questions about the plugin, read the [FAQ](./faq.html). Contact the [user mailing list](./mailing-lists.html). The mailing list posts are archived. An older thread can contain the answer to your question. Browse the [mail archive](./mailing-lists.html). + +If the plugin misses a feature or has a defect, report it in the [issue tracker](./issue-management.html). Describe the issue in detail. The developers must reproduce your problem to fix a bug. Attach debug logs, POMs, or a small demo project to the issue. Patches are welcome. Get the project from the [source repository](./scm.html). Read the [guide to helping with Maven](/guides/development/guide-helping.html) for more information. + +## Examples + +These examples show how to use the Maven AntRun Plugin: + +- [Referencing the Maven Classpaths](./examples/classpaths.html) +- [Using `` Attributes](./examples/tasksAttributes.html) +- [Using tasks not included in Ant's default jar](./examples/customTasks.html) diff --git a/src/site/markdown/tasks/attachArtifact.md.vm b/src/site/markdown/tasks/attachArtifact.md.vm new file mode 100644 index 0000000..850ff45 --- /dev/null +++ b/src/site/markdown/tasks/attachArtifact.md.vm @@ -0,0 +1,62 @@ + + +# AttachArtifact Task + +This task attaches an artifact to the current Maven project. Use the task to install and deploy an artifact that the Ant tasks generate. + +Task Parameters +--------------- + +|Attribute|Description|Required| +|:---|:---|:---:| +|file|The file to attach to the project|Yes| +|classifier|The classifier assigned to the artifact|No. Defaults to no classifier| +|type|The type of the artifact, zip, war, etc|No. Defaults to jar| + +Example +------- + +This example shows how to use the `attachartifact` task. + +```xml + + org.apache.maven.plugins + maven-antrun-plugin + ${project.version} + + + attach-artifact + package + + run + + + + + + + + + + +``` diff --git a/src/site/markdown/tasks/dependencyFilesets.md.vm b/src/site/markdown/tasks/dependencyFilesets.md.vm new file mode 100644 index 0000000..38e36a3 --- /dev/null +++ b/src/site/markdown/tasks/dependencyFilesets.md.vm @@ -0,0 +1,73 @@ + + +# DependencyFilesets Task + +This task creates fileset objects that contain the Maven project dependencies. You can use the task to access a specific dependency artifact. You can also use the task to operate on a set of dependency artifacts. Each artifact gets a fileset ID in the form `[prefix]groupId:artifactId:[classifier]:type`. A junit jar dependency gets the fileset ID `junit:junit:jar`. + +The task also creates a fileset with all the project dependencies. The fileset uses the default ID maven.project.dependencies. + +Task Parameters +--------------- + +|Attribute|Description|Required| +|:---|:---|:---:| +|prefix|String to prepend to all fileset IDs|No. Defaults to empty string| +|projectDependenciesId|RefId for the fileset with all project dependencies|No. Defaults to maven.project.dependencies| +|scopes|Comma separated list of artifact scopes to include|No. Defaults to all artifacts| +|types|Comma separated list of artifact types to include|No. Defaults to all artifacts| + +Example +------- + +This example shows how to access individual dependencies and the combined dependency fileset. + +```xml + + org.apache.maven.plugins + maven-antrun-plugin + ${project.version} + + + copy-dependencies + package + + run + + + + + + + + + + + + + + + + + + + + + +``` diff --git a/src/site/markdown/tasks/tasks.md b/src/site/markdown/tasks/tasks.md new file mode 100644 index 0000000..60ce3a0 --- /dev/null +++ b/src/site/markdown/tasks/tasks.md @@ -0,0 +1,28 @@ + + +# Ant Tasks + +The Maven Antrun Plugin includes custom Ant tasks. The tasks improve the integration with the Maven build. This page lists the tasks. Click a task name for more information and examples. + +|Task|Description| +|:---|:---| +|[attachartifact](./attachArtifact.html)|Attach an artifact to the current Maven project| +|[dependencyfilesets](./dependencyFilesets.html)|Creates a fileset for each Maven project dependency and adds the filesets to the Ant build| +|[versionMapper](./versionMapper.html)|Removes the version from artifact filenames| diff --git a/src/site/markdown/tasks/versionMapper.md.vm b/src/site/markdown/tasks/versionMapper.md.vm new file mode 100644 index 0000000..cc380aa --- /dev/null +++ b/src/site/markdown/tasks/versionMapper.md.vm @@ -0,0 +1,58 @@ + + +# VersionMapper + +This is an Ant mapper. The mapper removes the version from a dependency artifact filename. + +Example +------- + +This example shows how to use the version mapper. + +```xml + + org.apache.maven.plugins + maven-antrun-plugin + ${project.version} + + + copy-dependencies + package + + run + + + + + + + + + + + + + + + +``` diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm new file mode 100644 index 0000000..5ed2a0b --- /dev/null +++ b/src/site/markdown/usage.md.vm @@ -0,0 +1,159 @@ + + +# Usage + +Run +--- + +The maven-antrun-plugin has only one goal, `run`. + +This goal lets Maven run Ant tasks. You need an existing project. The plugin must have its `` tag configured. Without this tag, the plugin executes but does nothing. Below is the template for `maven-antrun-plugin`'s `pom.xml`. + +```xml + + [...] + + + + maven-antrun-plugin + ${project.version} + + + + + + + + + + + + run + + + + + + + [...] + +``` + +You can add a script to each lifecycle phase. Duplicate the `` section. Specify a new phase in each copy. + +You can specify Ant [``](http://ant.apache.org/manual/using.html#targets) attributes in the `` tag. The plugin wraps all Ant `` attributes except `depends`. + +```unknown +[...] + + + + + + + +[...] +``` + +Additional source directories +----------------------------- + +If your Ant tasks generate source code, use the [build-helper-maven-plugin](http://www.mojohaus.org/build-helper-maven-plugin/) to add the code to the build. The `sourceRoot` and `testSourceRoot` options are removed in version 3.0.0. + +Using Maven properties +---------------------- + +All Maven properties are also available in the target configuration. When you call an external Ant build script with the _ant_ task, the plugin passes only a subset of the properties. The subset prevents name conflicts. The subset includes all properties in the _properties_ section of the POM. The subset also includes prefixed versions of common Maven properties. + +``` + maven.project.groupId + maven.project.artifactId + maven.project.name + etc. +``` + +If a Maven property is not available in an external file, define the property before you call _ant_. + +```xml + + +``` + +Ant Expressions to Maven Expressions Mapping +-------------------------------------------- + +Some Ant expressions have a counterpart in Maven. You can use the Maven expression instead of maven-antrun-plugin. This avoids extra work. + +|Ant Expression|Maven Expression| +|:---|:---| +|Built-in Tasks| | +|`Ant`|[`maven-antrun-plugin`](../maven-antrun-plugin/)| +|`AntCall`|[`maven-antrun-plugin`](../maven-antrun-plugin/)| +|`Available`|[`profiles`](/guides/introduction/introduction-to-profiles.html)| +|`BUnzip2`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`BZip2`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Chmod`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Condition`|[`profiles`](/guides/introduction/introduction-to-profiles.html)| +|`Copy`|[`maven-resources-plugin`](../maven-resources-plugin/)| +|`Dependset`|[`maven-dependency-plugin`](../maven-dependency-plugin/)| +|`Ear`|[`maven-ear-plugin`](../maven-ear-plugin/)| +|`Filter`|[`maven-resources-plugin`](../maven-resources-plugin/) _Note: Filter uses the @...@ token while maven-resources-plugin uses the  ${esc.d}{...} token_| +|`FixCRLF`|[`maven-resources-plugin`](../maven-resources-plugin/)| +|`GenKey`|[`maven-jar-plugin`](../maven-jar-plugin/)| +|`GUnzip`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`GZip`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Jar`|[`maven-jar-plugin`](../maven-jar-plugin/)| +|`Javac`|[`maven-compiler-plugin`](../maven-compiler-plugin/)| +|`Javadoc/Javadoc2`|[`maven-javadoc-plugin`](../maven-javadoc-plugin/)| +|`LoadProperties`|[`maven-resources-plugin`](../maven-resources-plugin/)| +|`Manifest`|[`maven-jar-plugin`](../maven-jar-plugin/)| +|`Property`|[`maven-resources-plugin`](../maven-resources-plugin/)| +|`Replace`|[`maven-resources-plugin`](../maven-resources-plugin/) _Note: Replace can specify its token while maven-resources-plugin uses the  ${esc.d}{...} token_| +|`Tar`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Unjar`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Untar`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Unwar`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`Unzip`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|`War`|[`maven-war-plugin`](../maven-war-plugin/)| +|`Zip`|[`maven-assembly-plugin`](../maven-assembly-plugin/)| +|Optional Tasks| | +|`Antlr`|[`maven-antlr-plugin`](../maven-antlr-plugin/)| +|`Depend`|[`maven-dependency-plugin`](../maven-dependency-plugin/)| +|`EJB Tasks`|[`maven-ejb-plugin`](../maven-ejb-plugin/)| +|`FTP`|[`maven-deploy-plugin`](../maven-deploy-plugin/) _Note: maven-deploy-plugin can only deploy unto the FTP_| +|`JavaCC`|[`maven-compiler-plugin`](../maven-compiler-plugin/)| +|`JJDoc`|[`maven-compiler-plugin`](../maven-compiler-plugin/)| +|`JJTree`|[`maven-compiler-plugin`](../maven-compiler-plugin/)| +|`JUnit`|[`maven-surefire-plugin`](../maven-surefire-plugin/)| +|`JUnitReport`|[`maven-surefire-report-plugin`](../maven-surefire-report-plugin/)| +|`ServerDeploy`|[`maven-deploy-plugin`](../maven-deploy-plugin/)| +|`Setproxy`|[`maven-deploy-plugin`](../maven-deploy-plugin/)| +|`Translate`|[`maven-resources-plugin`](../maven-resources-plugin/) _Note: Translate can specify its own tokens and can have a different encoding scheme for reading and writing files. maven-resources-plugin however uses the  ${esc.d}{...} annotation only and has only one encoding scheme for reading and writing_|