git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@405226 13f79535-47bb-0310-9956-ffa450edef68
76 lines
3.7 KiB
XML
76 lines
3.7 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
/*
|
|
* Copyright 2001-2005 The Apache Software Foundation.
|
|
*
|
|
* Licensed 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 the need to declare "test" as a namespace because it is used in the template -->
|
|
<project
|
|
xmlns:ant="jelly:ant"
|
|
xmlns:maven="jelly:maven"
|
|
xmlns:test="test"
|
|
xmlns:j="jelly:core">
|
|
<!-- ================================================================== -->
|
|
<!-- A N T B U I L D G E N E R A T O R -->
|
|
<!-- ================================================================== -->
|
|
<!-- This plugin generates a stand alone ant build.xml file that can be -->
|
|
<!-- used without having Maven installed. The dependencies are -->
|
|
<!-- retrieved using the ant <get> task and then the standard <javac> -->
|
|
<!-- and <jar> tasks are used to produce a JAR. This is primarily for -->
|
|
<!-- people who want to build from sources but don't want to use Maven. -->
|
|
<!-- ================================================================== -->
|
|
|
|
<goal name="ant"
|
|
description="Generate an Ant build file"
|
|
prereqs="ant:generate-build"/>
|
|
|
|
<goal
|
|
name="ant:generate-build"
|
|
description="Generate an Ant build file">
|
|
<j:if test="${context.getVariable('maven.ant.generatebuild.file') != null and !context.getVariable('maven.ant.generatebuild.file').equals('')}">
|
|
<ant:echo>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</ant:echo>
|
|
<ant:echo>The property "maven.ant.generatebuild.file" is no more used.</ant:echo>
|
|
<ant:echo>Use the properties "maven.ant.generate.dir" and "maven.ant.generate.script" instead</ant:echo>
|
|
<ant:echo>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</ant:echo>
|
|
</j:if>
|
|
<ant:echo>Generating ${maven.ant.generate.dir}/${maven.ant.generate.script} ...</ant:echo>
|
|
<j:file name="${maven.ant.generate.dir}/${maven.ant.generate.script}" prettyPrint="true">
|
|
<j:import file="${plugin.resources}/templates/build.jelly" inherit="true"/>
|
|
</j:file>
|
|
<ant:echo>${maven.ant.generate.dir}/${maven.ant.generate.script} generated.</ant:echo>
|
|
</goal>
|
|
|
|
<goal
|
|
name="ant:execute"
|
|
description="Execute an Ant build file">
|
|
|
|
<ant:echo>Executing ${maven.ant.execute.dir}/${maven.ant.execute.script} ...</ant:echo>
|
|
<ant:ant>
|
|
<j:if test="${context.getVariable('maven.ant.execute.script') != null and !context.getVariable('maven.ant.execute.script').equals('')}">
|
|
<ant:setProperty name="antfile" value="${context.getVariable('maven.ant.execute.script')}" />
|
|
</j:if>
|
|
<j:if test="${context.getVariable('maven.ant.execute.dir') != null and !context.getVariable('maven.ant.execute.dir').equals('')}">
|
|
<ant:setProperty name="dir" value="${context.getVariable('maven.ant.execute.dir')}" />
|
|
</j:if>
|
|
<j:if test="${context.getVariable('maven.ant.execute.target') != null and !context.getVariable('maven.ant.execute.target').equals('')}">
|
|
<ant:setProperty name="target" value="${context.getVariable('maven.ant.execute.target')}" />
|
|
</j:if>
|
|
</ant:ant>
|
|
<ant:echo>${maven.ant.execute.dir}/${maven.ant.execute.script} executed.</ant:echo>
|
|
</goal>
|
|
|
|
</project>
|