Initial revision

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112724 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jvanzyl committed 2003-01-24 03:44:26 +00:00
1 parent 66e44f2734
commit 530c640d4f
821 files changed
+55754

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
target
velocity.log
maven.log
+150
View File
@@ -0,0 +1,150 @@
<?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"
description="Generate navigation, goals and properties 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"
description="Generate navigation.xml for the plugin">
<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 file="${plugin.resources}/templates/navigation.jelly" inherit="true"/>
</j:file>
</j:if>
</goal>
<!-- generate a skeletal goals.xml for the plugin specified -->
<goal name="plugin:generate-goals"
description="Generate goals.xml for the plugin">
<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="${plugin.resources}/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="${plugin.resources}/templates/goals.jelly"/>
</j:if>
<j:file name="${fileName}" prettyPrint="true">
<j:import file="${template}" inherit="true"/>
</j:file>
</j:if>
</goal>
<!-- generate properties documentation -->
<goal name="plugin:generate-properties"
description="Generate properties.xml for the plugin">
<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="${plugin.resources}/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="${plugin.resources}/templates/properties.jelly"/>
</j:if>
<mkdir dir="${maven.docs.src}" />
<j:file name="${fileName}" prettyPrint="true">
<j:import file="${template}" inherit="true"/>
</j:file>
</j:if>
</goal>
</project>
+6
View File
@@ -0,0 +1,6 @@
# -------------------------------------------------------------------
# P L U G I N P R O P E R I E S
# -------------------------------------------------------------------
# 'Plugin' plugin.
# -------------------------------------------------------------------
maven.docs.src=${basedir}/xdocs
+5
View File
@@ -0,0 +1,5 @@
# -------------------------------------------------------------------
# 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}
+55
View File
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-plugin-plugin</id>
<name>Maven Plugin Plugin</name>
<currentVersion>1.0-SNAPSHOT</currentVersion>
<description>
</description>
<shortDescription>Maven Plugin plugin</shortDescription>
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/plugin/</url>
<issueTrackingUrl>http://jira.werken.com/BrowseProject.jspa?id=10030</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>
<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>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>SNAPSHOT</version>
<url>http://jakarta.apache.org/commons/sandbox/jelly/tags/xml/</url>
<properties>
<classloader>root.maven</classloader>
</properties>
</dependency>
<dependency>
<id>werkz</id>
<version>1.0-beta-5</version>
<url>http://werkz.sourceforge.net/</url>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,18 @@
<project xmlns:x="jelly:xml" xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>${pom.name} Goals</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="${pom.name} Goals">
<p>This plugin defines no goals</p>
</section>
</body>
</document>
</j:whitespace>
<project>
@@ -0,0 +1,26 @@
<project
xmlns:x="jelly:xml"
xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>${pom.name} 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>
@@ -0,0 +1,20 @@
<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>
@@ -0,0 +1,19 @@
<project xmlns:x="jelly:xml" xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>${pom.name} Properties</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="${pom.name} Settings">
<p>There are no settings to customize this plugin</p>
</section>
</body>
</document>
</j:whitespace>
</project>
@@ -0,0 +1,33 @@
<project xmlns:x="jelly:xml" xmlns:j="jelly:core">
<j:whitespace trim="no" xmlns="dummy">
<document>
<properties>
<title>${pom.name} Properties</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="${pom.name} 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>
+40
View File
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>Maven Plugin Plugin Goals</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<goals>
<goal>
<name>plugin</name>
<description>Build and install a plugin</description>
</goal>
<goal>
<name>plugin:deploy</name>
<description>Install an unpacked version of the plugin</description>
</goal>
<goal>
<name>plugin:generate-docs</name>
<description>Generate navigation, goals and properties docs</description>
</goal>
<goal>
<name>plugin:generate-goals</name>
<description>Generate goals.xml for the plugin</description>
</goal>
<goal>
<name>plugin:generate-navigation</name>
<description>Generate navigation.xml for the plugin</description>
</goal>
<goal>
<name>plugin:generate-properties</name>
<description>Generate properties.xml for the plugin</description>
</goal>
<goal>
<name>plugin:install</name>
<description>Install the plugin in Maven's plugins dir</description>
</goal>
</goals>
</body>
</document>
+16
View File
@@ -0,0 +1,16 @@
<?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>
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="Maven Plugin Plugin">
<title>Maven Plugin Plugin</title>
<body>
<links>
<item href="http://jakarta.apache.org/turbine/maven/" name="Maven">
</item>
</links>
<menu name="Overview">
<item href="/goals.html" name="Goals">
</item>
<item href="/properties.html" name="Properties">
</item>
</menu>
</body>
</project>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>Maven Plugin Plugin Properties</title>
<author email="dion@apache.org">dIon Gillard</author>
</properties>
<body>
<section name="Maven Plugin Plugin Settings">
<table>
<tr>
<th>Property</th>
<th>Optional?</th>
<th>Description</th>
</tr>
<tr>
<td>maven.docs.src</td>
<td>Yes</td>
<td>
<p>Default value is
<code>${basedir}/xdocs</code>.</p>
</td>
</tr>
</table>
</section>
</body>
</document>