Repository: commons-release-plugin
Updated Branches:
  refs/heads/master 48568c968 -> e76d50eff


Adding site publication automation to pom


Project: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/commons-release-plugin/commit/e76d50ef
Tree: 
http://git-wip-us.apache.org/repos/asf/commons-release-plugin/tree/e76d50ef
Diff: 
http://git-wip-us.apache.org/repos/asf/commons-release-plugin/diff/e76d50ef

Branch: refs/heads/master
Commit: e76d50eff1062d4be368aef3175bb31426af14bb
Parents: 48568c9
Author: Rob Tompkins <chtom...@apache.org>
Authored: Wed Jan 10 20:15:55 2018 -0500
Committer: Rob Tompkins <chtom...@apache.org>
Committed: Wed Jan 10 20:15:55 2018 -0500

----------------------------------------------------------------------
 pom.xml                      |  72 +++++++++++++++++----
 src/changes/release-notes.vm | 133 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 193 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/e76d50ef/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 355776a..a7df965 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,7 @@
         <site>
             <id>commons.site</id>
             <name>Apache Commons Site SVN</name>
-            <url>scm:svn:${commons.scmPubUrl}</url>
+            
<url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-release-plugin</url>
         </site>
     </distributionManagement>
 
@@ -60,7 +60,7 @@
         <developer>
             <name>Rob Tompkins</name>
             <id>chtompki</id>
-            <email>chtompki AT apache.org</email>
+            <email>chtom...@apache.org</email>
             <timezone>-5</timezone>
         </developer>
     </developers>
@@ -165,7 +165,8 @@
     </dependencies>
 
     <build>
-        <defaultGoal>clean verify apache-rat:check clirr:check 
checkstyle:check findbugs:check javadoc:javadoc</defaultGoal>
+        <defaultGoal>clean verify apache-rat:check clirr:check 
checkstyle:check findbugs:check javadoc:javadoc
+        </defaultGoal>
         <resources>
             <resource>
                 <directory>src/main/resources</directory>
@@ -251,15 +252,16 @@
                     </descriptors>
                     <tarLongFileMode>gnu</tarLongFileMode>
                 </configuration>
-            </plugin><plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>findbugs-maven-plugin</artifactId>
-            <!-- Use version from parent pom as that is adjusted according to 
the Java version used to run Maven -->
-            <version>${commons.findbugs.version}</version>
-            <configuration>
-                
<excludeFilterFile>${basedir}/fb-excludes.xml</excludeFilterFile>
-            </configuration>
-        </plugin>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <!-- Use version from parent pom as that is adjusted according 
to the Java version used to run Maven -->
+                <version>${commons.findbugs.version}</version>
+                <configuration>
+                    
<excludeFilterFile>${basedir}/fb-excludes.xml</excludeFilterFile>
+                </configuration>
+            </plugin>
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
@@ -503,4 +505,50 @@
             </plugin>
         </plugins>
     </reporting>
+
+    <profiles>
+        <profile>
+            <id>setup-checkout</id>
+            <activation>
+                <file>
+                    <missing>site-content</missing>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>prepare-checkout</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <phase>pre-site</phase>
+                                <configuration>
+                                    <tasks>
+                                        <exec executable="svn">
+                                            <arg line="checkout --depth 
immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}"/>
+                                        </exec>
+
+                                        <exec executable="svn">
+                                            <arg line="update --set-depth 
exclude ${commons.scmPubCheckoutDirectory}/javadocs"/>
+                                        </exec>
+
+                                        <pathconvert pathsep=" " 
property="dirs">
+                                            <dirset 
dir="${commons.scmPubCheckoutDirectory}" includes="*"/>
+                                        </pathconvert>
+                                        <exec executable="svn">
+                                            <arg line="update --set-depth 
infinity ${dirs}"/>
+                                        </exec>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/e76d50ef/src/changes/release-notes.vm
----------------------------------------------------------------------
diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm
new file mode 100644
index 0000000..deba478
--- /dev/null
+++ b/src/changes/release-notes.vm
@@ -0,0 +1,133 @@
+## 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.
+##
+
+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 ${version}
+Release Notes
+
+
+INTRODUCTION:
+
+This document contains the release notes for the ${version} version of Apache 
commons-release-plgin.
+The commons-release-plugin is meant to be a mechanism for automating The 
Apache Commons Project's
+release process.
+
+$introduction.replaceAll("(?<!\015)\012", "
+").replaceAll("(?m)^ +","")
+
+## 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("  ", "
+")
+
+## set up indent sizes. Only change indent1
+#set($props=${project.properties})
+#set($jiralen=$props.get("commons.jira.id").length())
+## indent1 =   POOL-nnnn:
+#set($blanklen=$jiralen+6)## +6 for "-nnnn:"
+## must be at least as long as the longest JIRA id
+#set($blanks="                                  ")
+#set($indent1=$blanks.substring(0,$blanklen))
+## indent2 allows for issue wrapper
+#set($indent2="$indent1   ")
+##
+#macro ( processaction )
+## Use replaceAll to fix up LF-only line ends on Windows.
+    #set($action=$actionItem.getAction().replaceAll("\n","
+"))
+## Fix up indentation for multi-line action descriptions
+    #set($action=$action.replaceAll("(?m)^  +",$indent2))
+    #if ($actionItem.getIssue())
+        #set($issue="$actionItem.getIssue():")
+    ## Pad shorter issue numbers
+        #if ($issue.length() < $indent1.length())#set ($issue="$issue ")#end
+        #if ($issue.length() < $indent1.length())#set ($issue="$issue ")#end
+        #if ($issue.length() < $indent1.length())#set ($issue="$issue ")#end
+    #else
+        #set($issue=$indent1)
+    #end
+    #if ($actionItem.getDueTo())
+        #set($dueto=" Thanks to $actionItem.getDueTo().")
+    #else
+        #set($dueto="")
+    #end
+o $issue ${action}$dueto
+    #set($action="")
+    #set($issue="")
+    #set($dueto="")
+#end
+##
+#if ($release.getActions().size() == 0)
+No changes defined in this version.
+#else
+Changes in this version include:
+
+    #if ($release.getActions('add').size() !=0)
+    New features:
+        #foreach($actionItem in $release.getActions('add'))
+            #processaction()
+        #end
+    #end
+
+    #if ($release.getActions('fix').size() !=0)
+    Fixed Bugs:
+        #foreach($actionItem in $release.getActions('fix'))
+            #processaction()
+        #end
+    #end
+
+    #if ($release.getActions('update').size() !=0)
+    Changes:
+        #foreach($actionItem in $release.getActions('update'))
+            #processaction()
+        #end
+    #end
+
+    #if ($release.getActions('remove').size() !=0)
+    Removed:
+        #foreach($actionItem in $release.getActions('remove'))
+            #processaction()
+        #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

Reply via email to