You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2007/07/08 00:13:05 UTC

svn commit: r554273 - in /maven/plugins/trunk/maven-changes-plugin/src/site: apt/examples/using-a-custom-announcement-template.apt apt/index.apt site.xml

Author: dennisl
Date: Sat Jul  7 15:13:03 2007
New Revision: 554273

URL: http://svn.apache.org/viewvc?view=rev&rev=554273
Log:
[MCHANGES-77] Document the variables available to the announcement template.

Added:
    maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt
Modified:
    maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt
    maven/plugins/trunk/maven-changes-plugin/src/site/site.xml

Added: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt?view=auto&rev=554273
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt Sat Jul  7 15:13:03 2007
@@ -0,0 +1,138 @@
+ ------
+ Using a Custom Announcement Template
+ ------
+ Dennis Lundberg
+ ------
+ 7 July 2007
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+Using a Custom Announcement Template
+
+ The announcement Mojo uses a {{{http://velocity.apache.org/}Velocity}}
+ template to create an announcement. If you want to, you can create your own
+ custom template.
+
+* Configuring the Plugin
+
+ First you must configure the plugin and tell it where your template is. In
+ this example we want to use the template
+ <<<${basedir}/src/main/resources/our-announcements/my-announcement.vm>>>
+
++-----------------+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <configuration>
+          <template>my-announcement.vm</template>
+          <templateDirectory>our-announcements</templateDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++-----------------+
+
+* Creating Your Template
+
+ Next you want to create your own template. A wise thing is to start with the
+ default one that is included in the plugin. You can download it from
+ Subversion
+ {{{http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changes-plugin/src/main/resources/org/apache/maven/plugin/announcement/announcement.vm}here}}.
+ It will provide you with examples on how to iterate over the actions of a
+ release among other things.
+
+* Available Variables
+
+ Here's a list of the variables that you have at your disposal, when creating
+ your own template:
+
+*-----------------+----------+-------------+
+| <<Variable>>    | <<Type>> | <<Contents>>
+*-----------------+----------+-------------+
+| releases*       | List     | All the releases from either the changes.xml file or from JIRA.
+*-----------------+----------+-------------+
+| groupId*        | String   | The groupId from your project's pom.
+*-----------------+----------+-------------+
+| artifactId*     | String   | The artifactId from your project's pom.
+*-----------------+----------+-------------+
+| version*        | String   | The version from your project's pom.
+*-----------------+----------+-------------+
+| packaging*      | String   | The packaging from your project's pom.
+*-----------------+----------+-------------+
+| url             | String   | Distribution url of the artifact. Default-value: <<<$\{project.url\}>>>.
+*-----------------+----------+-------------+
+| introduction    | String   | A short description or introduction of the released artifact. Default-value: <<<$\{project.description\}>>>.
+*-----------------+----------+-------------+
+| developmentTeam | String   | Name of the team that develops the artifact. Default-value: <<<$\{project.artifactId\}-team>>>.
+*-----------------+----------+-------------+
+| finalName       | String   | The name of the artifact to be used in the announcement. Default-value: <<<$\{project.build.finalName\}.$\{project.packaging\}>>>.
+*-----------------+----------+-------------+
+| urlDownload     | String   | URL where the artifact can be downloaded. Default-value: <<<$\{project.url\}>>>.
+*-----------------+----------+-------------+
+| release*        | Release  | The release that you are announcing.
+*-----------------+----------+-------------+
+<Variables marked with * are read-only.>
+
+ Each <<<Release>>> also has a set of variables:
+
+*-----------------+----------+-------------+
+| <<Variable>>    | <<Type>> | <<Contents>>
+*-----------------+----------+-------------+
+| action*         | List     | All actions that were completed in this release.
+*-----------------+----------+-------------+
+| dateRelease*    | String   | The date when this release is made.
+*-----------------+----------+-------------+
+| description*    | String   | A description of the release.
+*-----------------+----------+-------------+
+| version*        | String   | The version of this release.
+*-----------------+----------+-------------+
+<Variables marked with * are read-only.>
+
+ Finally each <<<Action>>> has its own set of variables:
+
+*-----------------+----------+-------------+
+| <<Variable>>    | <<Type>> | <<Contents>>
+*-----------------+----------+-------------+
+| action*         | String   | What was done.
+*-----------------+----------+-------------+
+| dev*            | String   | The developer who made the change.
+*-----------------+----------+-------------+
+| dueTo*          | String   | If this was a contribution from a non-developer, the name of that person.
+*-----------------+----------+-------------+
+| dueToEmail*     | String   | If this was a contribution from a non-developer, the e-mail address of that person.
+*-----------------+----------+-------------+
+| issue*          | String   | The key of the issue in your issue tracking system.
+*-----------------+----------+-------------+
+| type*           | String   | What kind of change was this.
+*-----------------+----------+-------------+
+<Variables marked with * are read-only.>
+
+ For more information on how to access variables in your template and more,
+ please see the
+ {{{http://velocity.apache.org/engine/releases/velocity-1.4/user-guide.html}Velocity user guide}}.

Modified: maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt?view=diff&rev=554273&r1=554272&r2=554273
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt Sat Jul  7 15:13:03 2007
@@ -60,3 +60,5 @@
   * {{{examples/alternate-changes-xml-location.html}Alternate Location for the changes.xml File}}
 
   * {{{examples/smtp-authentication.html}SMTP authentication}}
+
+  * {{{examples/using-a-custom-announcement-template.html}Using a Custom Announcement Template}}

Modified: maven/plugins/trunk/maven-changes-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/site.xml?view=diff&rev=554273&r1=554272&r2=554273
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/site.xml Sat Jul  7 15:13:03 2007
@@ -33,6 +33,7 @@
     <menu name="Examples">
       <item name="Alternate Location for the changes.xml File" href="examples/alternate-changes-xml-location.html"/>
       <item name="SMTP Authentication" href="examples/smtp-authentication.html"/>
+      <item name="Using a Custom Announcement Template" href="examples/using-a-custom-announcement-template.html"/>
     </menu>
   </body>
 </project>