smor 2002/11/01 14:43:15
Modified: xdocs/reference user-guide.xml
xdocs changes.xml
Added: src/templates/sourceforge project.xml
src/templates/standard project.xml
Log:
o Added some documentation in the User's Guide
o Added a changes note
o Added two templates: "standard" and "sourceforge"
Revision Changes Path
1.23 +130 -0 jakarta-turbine-maven/xdocs/reference/user-guide.xml
Index: user-guide.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/reference/user-guide.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- user-guide.xml 21 Oct 2002 16:47:46 -0000 1.22
+++ user-guide.xml 1 Nov 2002 22:43:15 -0000 1.23
@@ -14,6 +14,11 @@
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#The Project Object Model">Project Object Model</a></li>
<li><a href="#POM Processing">POM Processing</a></li>
+ <ol>
+ <li><a href="#POM Interpolation">POM Interpolation</a></li>
+ <li><a href="#POM Inheritance">POM Inheritance</a></li>
+ <li><a href="#POM Templating">POM Templating</a></li>
+ </ol>
<li><a href="#Using Plugin-ins">Using Plug-ins</a></li>
<li><a href="#maven.xml">The maven.xml file</a>
<ol>
@@ -249,6 +254,131 @@
If you don't use inheritance or interpolation then everything should
work as per usual. The maven site itself is looking ok and the last few
sites deployed have used what I'm going to commit later tonight.
+ </p>
+ </subsection>
+ <subsection name="POM Templating">
+ <p>
+ Maven POM Templates use the POM Inheritance mechanism to provide users
+ with pre-cooked templates to ease the creation of new projects.
+ </p>
+ <p>
+ The need for POM Templates comes from the fact that the extend mechanism
+ becomes quite arbitrary when the project is distributed. If the target
+ system has a different directory layout, Maven will never be able to find
+ the parent project.
+ If we store them under Maven's home directory, projects can share
templates
+ without having to force a directory layout.
+ You can move your projects across your file system without having to
change
+ the path every time.
+ </p>
+ <p>
+ Those templates provide basic directory layout and properties so that a
+ new project's POM is only a few tags long.
+ </p>
+ <p>
+ Maven POM Templates are found under ${maven.home}/templates.
+ Each template consists of a directory with the name of the template,
+ containing a project.xml file. For instance, a "standard" template would
+ be in <source>${maven.home}/templates/standard/project.xml</source>.
+ </p>
+ <p>
+ The "standard" template looks like this:
+ </p>
+ <source><![CDATA[
+<project>
+
+ <pomVersion>3</pomVersion>
+ <currentVersion>1.0</currentVersion>
+ <logo>/images/logo.gif</logo>
+ <inceptionYear>2002</inceptionYear>
+
+ <distributions>
+ </distributions>
+
+ <branches/>
+
+ <mailingLists>
+ <mailingList>
+ <name>${pom.name} Dev List</name>
+ </mailingList>
+ <mailingList>
+ <name>${pom.name} User List</name>
+ </mailingList>
+ </mailingLists>
+
+ <build>
+
+ <sourceDirectory>src/java</sourceDirectory>
+
+ <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+
+ <integrationUnitTestSourceDirectory/>
+
+ <aspectSourceDirectories/>
+ <!-- Unit test classes -->
+
+ <unitTestPatterns>
+ <unitTestPattern>**/*Test.java</unitTestPattern>
+ </unitTestPatterns>
+ <!-- Integration unit test classes -->
+
+ <integrationUnitTestPatterns/>
+ <!-- J A R R E S O U R C E S -->
+ <!-- Resources that are packaged up inside the JAR file -->
+
+ <resources/>
+
+ <jars/>
+
+ </build>
+
+</project>]]>
+ </source>
+ <p>
+ To use the templating feature, the extend tag of a project must look
+ like: "template:${template}".
+ A new project with a standard layout would be something like this:
+ </p>
+ <source><![CDATA[
+<project>
+
+ <extend>template:standard</extend>
+ <id>foo-project</id>
+ <name>Foo Project</name>
+ <description>
+ The Foo Project creates PowerPoint presentations from goal-oriented
+ customer-centric global web application frameworks.
+ </description>
+
+</project>]]>
+ </source>
+ <p>
+ You would then get all your build information for free, allowing you
+ to start compiling and distributing straight away.
+ </p>
+ <p>
+ Currently, Maven provides two templates:
+ <ul>
+ <li>
+ <b>standard</b>: The standard template provides a standard
+ directory layout.
+ </li>
+ <li>
+ <b>sourceforge</b>: The sourceforge template provides a standard
+ directory layout for SourceForge projects.
+ </li>
+ </ul>
+ </p>
+ <p>
+ What would be nice is to have cascading templates, so that we could
+ have templates that extend other templates. This would allow a great
+ variety of templates for the user to choose from, depending on the
+ needs.
+ </p>
+ <p>
+ Another great feature would be to be able to extend several templates,
+ so that we could get the build structure from a project and the CVS
+ info from another.
</p>
</subsection>
</section>
1.7 +5 -4 jakarta-turbine-maven/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/changes.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- changes.xml 1 Nov 2002 18:49:12 -0000 1.6
+++ changes.xml 1 Nov 2002 22:43:15 -0000 1.7
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>Changes</title>
@@ -7,9 +7,10 @@
<body>
<release version="1.0-beta-8" date="in CVS">
- <action dev="evenisse" type="add">
- Added support for inherits properties where a project extend to an
- another project.
+ <action dev="smor" type="add">
+ Added support for templates.
+ Added a "standard" template providing a standard directory layout, and a
"sourceforge" template
+ providing most of the SourceForge directory layout and organization.
</action>
<action dev="dion" type="add" due-to="Jim Birchfield">
Added <a
href="http://jakarta.apache.org/turbine/maven/reference/plugins/console/">Console
plugin</a>
1.1 jakarta-turbine-maven/src/templates/sourceforge/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<currentVersion>1.0</currentVersion>
<organization>
<name>SourceForge</name>
<url>http://sourceforge.net/projects/${pom.id}/</url>
<logo>http://sourceforge.net/sflogo.php?group_id=1&type=5</logo>
</organization>
<inceptionYear>2002</inceptionYear>
<!-- Gump integration -->
<gumpRepositoryId>${pom.id}</gumpRepositoryId>
<url>http://${pom.id}.sourceforge.net</url>
<!-- Hard to guess the issuetracking id ...
<issueTrackingUrl>http://sourceforge.net/tracker/?group_id=${maven.sourceforge.issuetracking.id}</issueTrackingUrl>
-->
<siteAddress>${pom.id}.sourceforge.net</siteAddress>
<siteDirectory>/home/groups/${pom.id.substring(0,1)}/${pom.id.substring(0,2)}/${pom.id}/htdocs/</siteDirectory>
<distributionDirectory>/home/groups/${pom.id.substring(0,1)}/${pom.id.substring(0,2)}/${pom.id}/htdocs/distributions/</distributionDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.${pom.id}.sourceforge.net:/cvsroot/${pom.id}:${pom.id}</connection>
<url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/${pom.id}/${pom.id}/</url>
</repository>
<versions>
</versions>
<branches>
</branches>
<mailingLists>
<mailingList>
<name>${pom.name} User List</name>
<subscribe>${pom.id}[EMAIL PROTECTED]</subscribe>
<unsubscribe>${pom.id}[EMAIL PROTECTED]</unsubscribe>
<!-- Hard to guess the mailing-list id ...
<archive>http://sourceforge.net/mailarchive/forum.php?forum_id=${maven.sourceforge.ml.user}</archive>
-->
</mailingList>
<mailingList>
<name>${pom.name} Developer List</name>
<subscribe>${pom.id}[EMAIL PROTECTED]</subscribe>
<unsubscribe>${pom.id}[EMAIL PROTECTED]</unsubscribe>
<!-- Hard to guess the mailing-list id ...
<archive>http://sourceforge.net/mailarchive/forum.php?forum_id=${maven.sourceforge.ml.dev}</archive>
-->
</mailingList>
<mailingList>
<name>${pom.name} CVS Commits List</name>
<subscribe>${pom.id}[EMAIL PROTECTED]</subscribe>
<unsubscribe>${pom.id}[EMAIL PROTECTED]</unsubscribe>
<!-- Hard to guess the mailing-list id ...
<archive>http://sourceforge.net/mailarchive/forum.php?forum_id=${maven.sourceforge.ml.cvs}</archive>
-->
</mailingList>
</mailingLists>
<build>
<nagEmailAddress>${pom.id}@sourceforge.net</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectory></aspectSourceDirectory>
<!-- Unit test classes -->
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
<!-- J A R R E S O U R C E S -->
<!-- Resources that are packaged up inside the JAR file -->
<resources>
</resources>
<jars>
</jars>
</build>
</project>
1.1 jakarta-turbine-maven/src/templates/standard/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<currentVersion>1.0</currentVersion>
<logo>/images/logo.gif</logo>
<inceptionYear>2002</inceptionYear>
<distributions>
</distributions>
<branches/>
<mailingLists>
<mailingList>
<name>${pom.name} Dev List</name>
</mailingList>
<mailingList>
<name>${pom.name} User List</name>
</mailingList>
</mailingLists>
<build>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<integrationUnitTestSourceDirectory/>
<aspectSourceDirectories/>
<!-- Unit test classes -->
<unitTestPatterns>
<unitTestPattern>**/*Test.java</unitTestPattern>
</unitTestPatterns>
<!-- Integration unit test classes -->
<integrationUnitTestPatterns/>
<!-- J A R R E S O U R C E S -->
<!-- Resources that are packaged up inside the JAR file -->
<resources/>
<jars/>
</build>
</project>
--
To unsubscribe, e-mail: <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>