commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: svn commit: r1171027 - in /commons/proper/commons-parent/trunk: pom.xml src/changes/ src/changes/changes.xml src/changes/release-notes.vm
Date Thu, 15 Sep 2011 10:11:08 GMT
Hi Seb,
this is nice, it helps reducing redundancies. Would be wise adopting
it in all components? is there a way the parent brings the template
when referenced in the components, or this already does it?
thanks in advance!
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Thu, Sep 15, 2011 at 12:00 PM,  <sebb@apache.org> wrote:
> Author: sebb
> Date: Thu Sep 15 10:00:16 2011
> New Revision: 1171027
>
> URL: http://svn.apache.org/viewvc?rev=1171027&view=rev
> Log:
> Add release-notes profile and VM template
> Make a start on changes.xml
>
> Added:
>    commons/proper/commons-parent/trunk/src/changes/
>    commons/proper/commons-parent/trunk/src/changes/changes.xml   (with props)
>    commons/proper/commons-parent/trunk/src/changes/release-notes.vm   (with props)
> Modified:
>    commons/proper/commons-parent/trunk/pom.xml
>
> Modified: commons/proper/commons-parent/trunk/pom.xml
> URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=1171027&r1=1171026&r2=1171027&view=diff
> ==============================================================================
> --- commons/proper/commons-parent/trunk/pom.xml (original)
> +++ commons/proper/commons-parent/trunk/pom.xml Thu Sep 15 10:00:16 2011
> @@ -31,6 +31,7 @@
>   <version>22-SNAPSHOT</version>
>   <name>Commons Parent</name>
>   <url>http://commons.apache.org/</url>
> +  <description>The Apache Commons Parent Pom provides common settings for all
Apache Commons components.</description>
>
>   <ciManagement>
>     <system>continuum</system>
> @@ -926,6 +927,46 @@
>       </build>
>     </profile>
>
> +    <profile>
> +      <!--
> +          Generate release notes in top-level directory from src/changes/changes.xml
> +          Usage:
> +          mvn changes:announcement-generate -Prelease-notes
> +
> +          Requires file src/changes/release-notes.vm.
> +          A sample template is available from:
> +          https://svn.apache.org/repos/asf/commons/proper/commons-parent/trunk/src/changes/release-notes.vm
> +       -->
> +      <id>release-notes</id>
> +      <build>
> +        <plugins>
> +           <plugin>
> +            <groupId>org.apache.maven.plugins</groupId>
> +            <artifactId>maven-changes-plugin</artifactId>
> +            <version>2.6</version>
> +            <configuration>
> +              <template>release-notes.vm</template>
> +              <templateDirectory>src/changes</templateDirectory>
> +              <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
> +              <outputDirectory>.</outputDirectory>
> +              <announcementFile>RELEASE-NOTES.txt</announcementFile>
> +              <announceParameters>
> +                <releaseVersion>${commons.release.version}</releaseVersion>
> +              </announceParameters>
> +            </configuration>
> +            <executions>
> +              <execution>
> +                <id>create-release-notes</id>
> +                <phase>generate-resources</phase>
> +                <goals>
> +                  <goal>announcement-generate</goal>
> +                </goals>
> +              </execution>
> +            </executions>
> +          </plugin>
> +        </plugins>
> +      </build>
> +    </profile>
>   </profiles>
>
>   <properties>
>
> Added: commons/proper/commons-parent/trunk/src/changes/changes.xml
> URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/src/changes/changes.xml?rev=1171027&view=auto
> ==============================================================================
> --- commons/proper/commons-parent/trunk/src/changes/changes.xml (added)
> +++ commons/proper/commons-parent/trunk/src/changes/changes.xml Thu Sep 15 10:00:16 2011
> @@ -0,0 +1,89 @@
> +<?xml version="1.0"?>
> +<!--
> +
> +   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.
> +
> +-->
> +<!--
> +This file is also used by the maven-changes-plugin to generate the release notes.
> +Useful ways of finding items to add to this file are:
> +
> +1.  Add items when you fix a bug or add a feature (this makes the
> +release process easy :-).
> +
> +2.  Do a JIRA search for tickets closed since the previous release.
> +
> +3.  Use the report generated by the maven-changelog-plugin to see all
> +SVN commits. TBA how to use this with SVN.
> +
> +To generate the release notes from this file:
> +
> +mvn changes:announcement-generate
> +then tweak the formatting if necessary
> +and commit
> +
> +The <action> type attribute can be add,update,fix,remove.
> +-->
> +
> +<document>
> +    <properties>
> +        <title>Changes</title>
> +        <author email="dev@commons.apache.org">Apache Commons devlopers</author>
> +        <intro>
> +    Starting with version 22, the RAT plugin has changed Maven group and id, so any
existing configuration
> +    needs to be updated.
> +    To fix component POMs, please change any occurrences of:
> +        &lt;groupId>org.codehaus.mojo&lt;/groupId>
> +        &lt;artifactId>rat-maven-plugin&lt;/artifactId>
> +    to the new values:
> +        &lt;groupId>org.apache.rat&lt;/groupId>
> +        &lt;artifactId>apache-rat-plugin&lt;/artifactId>
> +        </intro>
> +    </properties>
> +
> +    <!-- NOTE:
> +    The description below is specially formatted so as to improve the layout of the
generated release notes:
> +    The parsing process removes all line feeds, replacing them with a single space.
> +    The Velocity template in resources/templates has been enhanced to replace pairs
of adjacent spaces
> +    with a new-line in the release notes. (These spaces are ignored when displaying
HTML).
> +    If the output is not quite correct, check for invisible trailing spaces!
> +
> +    N.B. The release notes template groups actions by type, and only extracts data
for the current release.
> +    The changes report outputs actions in the order they appear in this file.
> +     -->
> +
> +    <body>
> +        <release version="22" date="TBA" description="
> +Starting with version 22, the RAT plugin has changed Maven group and id,
> + so any existing configuration needs to be updated.
> + To fix component POMs, please change any occurrences of:
> +  &lt;groupId>org.codehaus.mojo&lt;/groupId>
> +  &lt;artifactId>rat-maven-plugin&lt;/artifactId>
> + to the new values:
> +  &lt;groupId>org.apache.rat&lt;/groupId>
> +  &lt;artifactId>apache-rat-plugin&lt;/artifactId>
> +">
> +            <action dev="sebb" type="update">
> +            Add release-notes profile to generate RELEASE-NOTES.txt from changes.xml.
> +            Added changes.xml and template release-notes.vm
> +            </action>
> +            <action dev="sebb" type="update">
> +            Add pom description
> +            </action>
> +        </release>
> +
> +    </body>
> +</document>
>
> Propchange: commons/proper/commons-parent/trunk/src/changes/changes.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Added: commons/proper/commons-parent/trunk/src/changes/release-notes.vm
> URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/src/changes/release-notes.vm?rev=1171027&view=auto
> ==============================================================================
> --- commons/proper/commons-parent/trunk/src/changes/release-notes.vm (added)
> +++ commons/proper/commons-parent/trunk/src/changes/release-notes.vm Thu Sep 15 10:00:16
2011
> @@ -0,0 +1,140 @@
> +## 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.
> +##
> +              Apache ${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
> +
> +Historical list of changes: ${project.url}changes-report.html
> +
> +For complete information on ${project.name}, including instructions on how to submit
bug reports,
> +patches, or suggestions for improvement, see the Apache ${project.name} website:
> +
> +${project.url}
> \ No newline at end of file
>
> Propchange: commons/proper/commons-parent/trunk/src/changes/release-notes.vm
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message