alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (release-notes.vm)

This example Java source code file (release-notes.vm) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

apache, asf, changes, foundation, hack, lf-only, license, removed, see, thanks, the, use, warranties, windows

The release-notes.vm Java example source code

## 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.

              ${project.name} ${version} RELEASE NOTES

The ${developmentTeam} is pleased to announce the release of ${finalName}

$introduction.replaceAll("(?<!\015)\012", "
")

## N.B. the available variables are described here:
## http://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html
##
## Hack to improve layout: replace all pairs of spaces with a single new-line
$release.description.replaceAll("  ", "
")

#if ($release.getActions().size() == 0)
No changes defined in this version.
#else
Changes in this version include:

## indent to be used if there is no issue attribute.
## should be the same as the indent in the changes.xml file
## less 2 spaces for the 'o' and trailing space
#set($indent='          ')
#if ($release.getActions('add').size() !=0)
New features:
#foreach($actionItem in $release.getActions('add'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
"))
#if ($actionItem.getIssue())
#set($issue=$actionItem.getIssue())
#else
#set($issue="")
#end
#if ($actionItem.getDueTo())
#set($dueto=$actionItem.getDueTo())
#else
#set($dueto="")
#end
o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end

#set($issue="")
#set($dueto="")
#end 
#end

#if ($release.getActions('fix').size() !=0)
Fixed Bugs:
#foreach($actionItem in $release.getActions('fix'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
"))
#if ($actionItem.getIssue())
#set($issue=$actionItem.getIssue())
#else
#set($issue="")
#end
#if ($actionItem.getDueTo())
#set($dueto=$actionItem.getDueTo())
#else
#set($dueto="")
#end
o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end

#set($issue="")
#set($dueto="")
#end
#end

#if ($release.getActions('update').size() !=0)
Changes:
#foreach($actionItem in $release.getActions('update'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
"))
#if ($actionItem.getIssue())
#set($issue=$actionItem.getIssue())
#else
#set($issue="")
#end
#if ($actionItem.getDueTo())
#set($dueto=$actionItem.getDueTo())
#else
#set($dueto="")
#end
o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end

#set($issue="")
#set($dueto="")
#end
#end

#if ($release.getActions('remove').size() !=0)
Removed:
#foreach($actionItem in $release.getActions('remove'))
## Use replaceAll to fix up LF-only line ends on Windows.
#set($action=$actionItem.getAction().replaceAll("\n","
"))
#if ($actionItem.getIssue())
#set($issue=$actionItem.getIssue())
#else
#set($issue="")
#end
#if ($actionItem.getDueTo())
#set($dueto=$actionItem.getDueTo())
#else
#set($dueto="")
#end
o#if($!issue != "") $issue: #else$indent#end ${action} #if($!dueto != "")Thanks to $dueto. #end

#set($issue="")
#set($dueto="")
#end
#end
## End of main loop
#end

For complete information on ${project.name}, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the ${project.name} website:

${project.url}


Other Java examples (source code examples)

Here is a short list of links related to this Java release-notes.vm source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.