You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2003/01/01 10:05:30 UTC
cvs commit: jakarta-turbine-maven/src/plugins-build/plugin .cvsignore plugin.jelly plugin.properties project.xml project.properties
dion 2003/01/01 01:05:30
Added: src/plugins-build/plugin/templates goals.jelly
goals-empty.jelly properties.jelly
properties-empty.jelly navigation.jelly
src/plugins-build/plugin/xdocs index.xml
src/plugins-build/plugin .cvsignore plugin.jelly
plugin.properties project.xml project.properties
Log:
Added plugin plugin
Revision Changes Path
1.1 jakarta-turbine-maven/src/plugins-build/plugin/templates/goals.jelly
Index: goals.jelly
===================================================================
<project
xmlns:x="jelly:xml"
xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>Maven ${plugin} Plug-in Goals</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<goals>
<x:forEach var="goal" select="$def/*/goal" sort="@name">
<goal>
<name><x:expr select="$goal/@name"/></name>
<description>
<x:expr select="$goal/@description"/>
</description>
</goal>
</x:forEach>
</goals>
</body>
</document>
</j:whitespace>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/templates/goals-empty.jelly
Index: goals-empty.jelly
===================================================================
<project xmlns:x="jelly:xml" xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>Maven ${plugin} Plug-in Goals</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="${plugin} Goals">
<p>This plugin defines no goals</p>
</section>
</body>
</document>
</j:whitespace>
<project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/templates/properties.jelly
Index: properties.jelly
===================================================================
<project xmlns:x="jelly:xml" xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>${plugin} Properties</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="${plugin} Settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
<j:forEach var="var" items="${vars}">
<j:if test="${var.key.startsWith('maven.')}" trim="no">
<tr>
<td>${var.key}</td>
<td>Yes</td>
<td>
<p>Default value is <code>${var.value}</code>.</p>
<!-- More detailed description goes here -->
</td>
</tr>
</j:if>
</j:forEach>
</table>
</section>
</body>
</document>
</j:whitespace>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/templates/properties-empty.jelly
Index: properties-empty.jelly
===================================================================
<project xmlns:x="jelly:xml" xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>${plugin} Properties</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="${plugin} Settings">
<p>There are no settings to customize this plugin</p>
</section>
</body>
</document>
</j:whitespace>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/templates/navigation.jelly
Index: navigation.jelly
===================================================================
<project xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<project name="${pom.name}">
<title>${pom.name}</title>
<body>
<links>
<item name="Maven" href="http://jakarta.apache.org/turbine/maven/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
</menu>
</body>
</project>
</j:whitespace>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Plugin Plug-in</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="Maven Plugin Plug-in">
<p>
This plug-in provides ways of working with maven plugins
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/.cvsignore
Index: .cvsignore
===================================================================
target
velocity.log
maven.log
1.1 jakarta-turbine-maven/src/plugins-build/plugin/plugin.jelly
Index: plugin.jelly
===================================================================
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:x="jelly:xml">
<goal name="plugin" description="Build and install a plugin">
<!-- big change. Most plugins are just a jar and have
copied the maven.xml to tweak the resources
Now it is up to the plugin to define the resources.
-->
<attainGoal name="java:jar"/>
<copy file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.repo.local}/maven/jars" />
</goal>
<goal name="plugin:install" prereqs="plugin"
description="Install the plugin in Maven's plugins dir">
<copy file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.home}/plugins"/>
</goal>
<goal name="plugin:deploy" prereqs="plugin"
description="Install an unpacked version of the plugin">
<mkdir dir="${maven.home}/plugins/${maven.final.name}"/>
<unzip src="${maven.build.dir}/${maven.final.name}.jar"
dest="${maven.home}/plugins/${maven.final.name}"/>
</goal>
<!-- generate documentation -->
<!-- generate docs that are usually missing -->
<goal name="plugin:generate-docs">
<attainGoal name="plugin:generate-navigation" />
<attainGoal name="plugin:generate-goals" />
<attainGoal name="plugin:generate-properties" />
</goal>
<!-- generate a skeletal navigation.xml for the plugin specified
by the 'plugin' variable -->
<goal name="plugin:generate-navigation">
<j:set var="skip" value="false" />
<j:set var="fileName">${maven.docs.src}/navigation.xml</j:set>
<u:available file="${fileName}">
<echo>Skipping file as '${fileName}' already exists</echo>
<j:set var="skip" value="true" />
</u:available>
<j:if test="${!skip}">
<mkdir dir="${maven.docs.src}" />
<echo>Generating file '${fileName}'</echo>
<j:file name="${fileName}" prettyPrint="true">
<j:import uri="templates/navigation.jelly" inherit="true"/>
</j:file>
</j:if>
</goal>
<!-- generate a skeletal goals.xml for the plugin specified -->
<goal name="plugin:generate-goals">
<j:set var="skip" value="false" />
<j:set var="fileName">${maven.docs.src}/goals.xml</j:set>
<u:available file="${fileName}">
<echo>Skipping file as '${fileName}' already exists</echo>
<j:set var="skip" value="true" />
</u:available>
<j:if test="${!skip}">
<j:set var="pluginScript" value="false" />
<u:available file="${basedir}/plugin.jelly">
<j:set var="pluginScript" value="true" />
</u:available>
<mkdir dir="${maven.docs.src}" />
<j:if test="${!pluginScript}">
<!-- no plugin.jelly - generate a file for empty goals -->
<echo>Generating 'empty' goals file '${fileName}'</echo>
<j:set var="template" value="templates/goals-empty.jelly" />
</j:if>
<j:if test="${pluginScript}">
<!-- generate docs based on plugin.jelly -->
<x:parse xml="${basedir}/plugin.jelly" var="def"/>
<echo>Generating file '${fileName}'</echo>
<j:set var="template" value="templates/goals.jelly"/>
</j:if>
<j:file name="${fileName}" prettyPrint="true">
<j:import uri="${template}" inherit="true"/>
</j:file>
</j:if>
</goal>
<!-- generate properties documentation -->
<goal name="plugin:generate-properties">
<j:set var="skip" value="false" />
<j:set var="fileName">${maven.docs.src}/properties.xml</j:set>
<u:available file="${fileName}">
<echo>Skipping file as '${fileName}' already exists</echo>
<j:set var="skip" value="true" />
</u:available>
<j:if test="${!skip}">
<j:set var="props" value="false"/>
<j:set var="propsFileName">${basedir}/plugin.properties</j:set>
<u:available file="${propsFileName}">
<j:set var="props" value="true" />
</u:available>
<j:if test="${!props}">
<echo>Generating 'empty' properties file '${fileName}'</echo>
<j:set var="template" value="templates/properties-empty.jelly"/>
</j:if>
<j:if test="${props}">
<echo>Generating file '${fileName}'</echo>
<j:scope>
<u:properties file="${propsFileName}" />
<j:set var="vars" value="${context.variables}" scope="parent"/>
</j:scope>
<j:set var="template" value="templates/properties.jelly"/>
</j:if>
<mkdir dir="${maven.docs.src}" />
<j:file name="${fileName}" prettyPrint="true">
<j:import uri="${template}" inherit="true"/>
</j:file>
</j:if>
</goal>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/plugin.properties
Index: plugin.properties
===================================================================
# -------------------------------------------------------------------
# P L U G I N P R O P E R I E S
# -------------------------------------------------------------------
# 'Plugin' plugin.
# -------------------------------------------------------------------
maven.docs.src=${basedir}/xdocs
1.1 jakarta-turbine-maven/src/plugins-build/plugin/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<id>maven-plugin-plugin</id>
<name>Maven Plugin Plugin</name>
<currentVersion>1.0-SNAPSHOT</currentVersion>
<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>
<inceptionYear>2001</inceptionYear>
<package>org.apache.maven.plugin</package>
<logo>http://jakarta.apache.org/turbine/maven/images/maven.jpg</logo>
<description>
</description>
<shortDescription>Maven Plugin plugin</shortDescription>
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/plugin/</url>
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/plugin/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-turbine-maven/src/plugins-build/plugin/</connection>
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/src/plugins-build/plugin/</url>
</repository>
<developers>
<developer>
<name>dIon Gillard</name>
<id>dion</id>
<email>dion@multitask.com.au</email>
<organization>Multitask Consulting</organization>
<roles>
<role>Documentation</role>
</roles>
</developer>
</developers>
<dependencies>
<dependency>
<id>werkz</id>
<version>1.0-beta-5</version>
<url>http://werkz.sourceforge.net/</url>
</dependency>
</dependencies>
<build>
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<!-- Unit test classes -->
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
<resources>
<resource>
<directory>${basedir}</directory>
<excludes>
<exclude>target/**</exclude>
<exclude>src/**</exclude>
<exclude>maven.xml</exclude>
<exclude>maven.log</exclude>
<exclude>velocity.log</exclude>
<exclude>.cvsignore</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/plugin/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}