mpoeschl 2003/02/07 11:27:11
Added: src/maven-plugin project.xml plugin.jelly
src/maven-plugin/src/plugin-resources/src/pom
project.properties project.xml
Log:
start of a turbine plugin
don't expect it to work!
i just want to get it in as it may help to get some help ;-)
the idea is to have multiple goals:
turbine:base - generates the directory structure and adds needed config files
turbine:sample - generates a sample app (taken from tdk)
maybe the sample goal could be splitted (e.g. turbine:flux to install flux)
Revision Changes Path
1.1 jakarta-turbine-2/src/maven-plugin/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<!--
<extend>${basedir}/../project.xml</extend>
-->
<!-- the version of maven's project object model -->
<pomVersion>3</pomVersion>
<!-- a unique name for this project -->
<id>maven-turbine-plugin</id>
<!-- a short but descriptive name for the project -->
<name>Maven Turbine Plugin</name>
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>2.3-dev</currentVersion>
<!-- a short description of what the project does -->
<shortDescription>
Maven Turbine Plugin
</shortDescription>
<!-- the project home page -->
<url>http://jakarta.apache.org/turbine/turbine-2/maven-plugin/</url>
<issueTrackingUrl>http://jira.werken.com/BrowseProject.jspa?id=10030</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/turbine-2/maven-plugin/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-2/</distributionDirectory>
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-2/src/maven-plugin/</connection>
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-2/src/maven-plugin/</url>
</repository>
<!-- any mailing lists for the project -->
<mailingLists/>
<!-- who the developers are for the project -->
<developers>
<developer>
<name>dIon Gillard</name>
<id>dion</id>
<email>[EMAIL PROTECTED]</email>
<organization>Multitask Consulting</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Martin Poeschl</name>
<id>mpoeschl</id>
<email>[EMAIL PROTECTED]</email>
<organization>tucana.at</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<!-- jar files the project is dependent on -->
<dependencies/>
<build>
<sourceDirectory>${basedir}/src/main</sourceDirectory>
<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
<resources>
<resource>
<directory>${basedir}/src/plugin-resources</directory>
<targetPath>plugin-resources</targetPath>
</resource>
<resource>
<directory>${basedir}</directory>
<includes>
<include>plugin.jelly</include>
<include>plugin.properties</include>
<include>project.properties</include>
<include>project.xml</include>
</includes>
</resource>
</resources>
</build>
</project>
1.1 jakarta-turbine-2/src/maven-plugin/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:u="jelly:util">
<goal
name="turbine:base"
description="Generate the base for a Turbine Application using 'maven
-Dpackage=org.mycompany.project turbine:base'">
<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>
<!-- Make webapp directory and populate. -->
<j:set var="weppappDirectory" value="${basedir}/src/webapp"/>
<mkdir dir="${weppappDirectory}/WEB-INF/conf"/>
<mkdir dir="${weppappDirectory}/templates/app/screens"/>
<mkdir dir="${weppappDirectory}/templates/app/navigations"/>
<mkdir dir="${weppappDirectory}/templates/app/layouts"/>
<copy todir="${weppappDirectory}" 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>
<goal
name="turbine:sample"
description="Generate a sample Application using 'maven
-Dpackage=org.mycompany.project turbine:sample'">
<attainGoal name="turbine:base"/>
</goal>
</project>
1.1
jakarta-turbine-2/src/maven-plugin/src/plugin-resources/src/pom/project.properties
Index: project.properties
===================================================================
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
1.1
jakarta-turbine-2/src/maven-plugin/src/plugin-resources/src/pom/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<!-- the version of maven's project object model -->
<pomVersion>3</pomVersion>
<!-- a unique name for this project -->
<id>app</id>
<!-- a short but descriptive name for the project -->
<name>Maven example projects</name>
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>1.0</currentVersion>
<!-- details about the organization that 'owns' the project -->
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
<logo>http://jakarta.apache.org/turbine/maven/images/jakarta-logo-blue.gif</logo>
</organization>
<!-- the year the project started -->
<inceptionYear>2002</inceptionYear>
<package>@PACKAGE@</package>
<logo>http://jakarta.apache.org/turbine/maven/images/maven.jpg</logo>
<!-- a short description of what the project does -->
<shortDescription>
A collection of example projects showing how to use maven in different
situations
</shortDescription>
<!-- the project home page -->
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/examples/</url>
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/examples/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
<!-- the version control repository and http url for online access
the connection element has the form:
scm:<system>:<system specific connection string> -->
<repository>
<connection>scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-turbine-maven/src/plugins-build/examples</connection>
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/src/plugins-build/examples/</url>
</repository>
<!-- any mailing lists for the project -->
<mailingLists/>
<!-- who the developers are for the project -->
<developers>
<developer>
<name>Jason van Zyl</name>
<id>jvanzyl</id>
<email>[EMAIL PROTECTED]</email>
<organization>Zenplex</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<!-- jar files the project is dependent on -->
<dependencies/>
<!-- build information for the project -->
<build>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/NaughtyTest.java</exclude>
</excludes>
</unitTest>
<resources>
<resource>
<directory>src/conf</directory>
<includes>
<include>*.properties</include>
</includes>
</resource>
</resources>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]