git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112724 13f79535-47bb-0310-9956-ffa450edef68
52 lines
1.5 KiB
XML
52 lines
1.5 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<project
|
|
xmlns:j="jelly:core"
|
|
xmlns:u="jelly:util">
|
|
|
|
<goal
|
|
name="genapp"
|
|
description="Generate Application using 'maven -Dpackage=org.mycompany.project genapp'">
|
|
|
|
<j:if test="${package == null}">
|
|
<fail message="">
|
|
|
|
You must specifiy a package for your application!
|
|
|
|
</fail>
|
|
</j:if>
|
|
|
|
<!-- Turn the specified package into a path -->
|
|
<u:replace var="appPath" oldChar="." newChar="/" value="${package}"/>
|
|
|
|
<!-- We want to substitute in the package name. -->
|
|
<filter token="PACKAGE" value="${package}"/>
|
|
|
|
<!-- Make Java source directory and populate. -->
|
|
<j:set var="appDirectory" value="${basedir}/src/java/${appPath}"/>
|
|
<mkdir dir="${appDirectory}"/>
|
|
<copy todir="${appDirectory}" filtering="true">
|
|
<fileset dir="${plugin.resources}/src/java"/>
|
|
</copy>
|
|
|
|
<!-- Make Java unit test source directory and populate. -->
|
|
<j:set var="appTestDirectory" value="${basedir}/src/test/${appPath}"/>
|
|
<mkdir dir="${appTestDirectory}"/>
|
|
<copy todir="${appTestDirectory}" filtering="true">
|
|
<fileset dir="${plugin.resources}/src/test"/>
|
|
</copy>
|
|
|
|
<!-- Starter POM and POM properties. -->
|
|
<copy todir="${basedir}" filtering="true">
|
|
<fileset dir="${plugin.resources}/src/pom"/>
|
|
</copy>
|
|
|
|
<!-- Starter conf files to be placed in the JAR. -->
|
|
<copy todir="${basedir}/src/conf">
|
|
<fileset dir="${plugin.resources}/src/conf"/>
|
|
</copy>
|
|
|
|
</goal>
|
|
|
|
</project>
|