Author: bodewig Date: Thu Oct 19 21:28:08 2006 New Revision: 465982 URL: http://svn.apache.org/viewvc?view=rev&rev=465982 Log: Support for Maven changes-plugin like changes.xml
Added: ant/antlibs/common/trunk/stylesheets/ ant/antlibs/common/trunk/stylesheets/changes2readmehtml.xsl (with props) ant/antlibs/common/trunk/stylesheets/changes2whatsnew.xsl (with props) ant/antlibs/common/trunk/stylesheets/contributors.xsl - copied unchanged from r465135, ant/antlibs/common/trunk/contributors.xsl Removed: ant/antlibs/common/trunk/contributors.xsl Modified: ant/antlibs/common/trunk/build.xml Modified: ant/antlibs/common/trunk/build.xml URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/build.xml?view=diff&rev=465982&r1=465981&r2=465982 ============================================================================== --- ant/antlibs/common/trunk/build.xml (original) +++ ant/antlibs/common/trunk/build.xml Thu Oct 19 21:28:08 2006 @@ -284,7 +284,7 @@ <include name="INSTALL"/> <include name="NOTICE"/> <include name="TODO"/> - <include name="WHATSNEW"/> + <include name="changes.xml"/> <include name="contributors.xml"/> <include name="build.xml"/> <include name="version.properties"/> @@ -304,8 +304,9 @@ <include name="**/*.java"/> </fixcrlf> - <xslt style="common/contributors.xsl" in="contributors.xml" - out="${src.dist.dir}/CONTRIBUTORS"/> + <antcall target="create-readable-documents"> + <param name="dest.dir" value="${src.dist.dir}"/> + </antcall> </target> <target name="bin-dist" depends="checksum-target-jar,m2-pom"> @@ -318,7 +319,7 @@ <include name="INSTALL"/> <include name="NOTICE"/> <include name="TODO"/> - <include name="WHATSNEW"/> + <include name="changes.xml"/> <include name="contributors.xml"/> </fileset> <fileset dir="common"> @@ -333,8 +334,9 @@ <exclude name="etc/testcases/"/> </fileset> </copy> - <xslt style="common/contributors.xsl" in="contributors.xml" - out="${bin.dist.dir}/CONTRIBUTORS"/> + <antcall target="create-readable-documents"> + <param name="dest.dir" value="${bin.dist.dir}"/> + </antcall> </target> <target name="distribution" description="creates a complete distribution" @@ -445,4 +447,31 @@ </fileset> </checksum> </target> + + <target name="check-contributors"> + <available property="contributors.file.exists?" + file="contributors.xml"/> + </target> + + <target name="check-changes"> + <available property="changes.file.exists?" + file="changes.xml"/> + </target> + + <target name="style-contributors" depends="check-contributors" + if="contributors.file.exists?"> + <xslt style="common/stylesheets/contributors.xsl" in="contributors.xml" + out="${dest.dir}/CONTRIBUTORS"/> + </target> + + <target name="style-changes" depends="check-changes" + if="changes.file.exists?"> + <xslt style="common/stylesheets/changes2whatsnew.xsl" in="changes.xml" + out="${dest.dir}/WHATSNEW"/> + <xslt style="common/stylesheets/changes2readmehtml.xsl" in="changes.xml" + out="${dest.dir}/README.html"/> + </target> + + <target name="create-readable-documents" + depends="style-contributors,style-changes"/> </project> Added: ant/antlibs/common/trunk/stylesheets/changes2readmehtml.xsl URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/stylesheets/changes2readmehtml.xsl?view=auto&rev=465982 ============================================================================== --- ant/antlibs/common/trunk/stylesheets/changes2readmehtml.xsl (added) +++ ant/antlibs/common/trunk/stylesheets/changes2readmehtml.xsl Thu Oct 19 21:28:08 2006 @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="html" indent="yes"/> + + <xsl:template match="/document/release[1]"> + <body> + <h1> + <xsl:text>Changes in </xsl:text> + <xsl:value-of select="@version"/> + </h1> + <h2> + <xsl:text>Changes that Could Break Older Environments:</xsl:text> + </h2> + <ul> + <xsl:apply-templates select="./[EMAIL PROTECTED]'true']" mode="li"/> + </ul> + <h2> + <xsl:text>Fixed Bugs:</xsl:text> + </h2> + <ul> + <xsl:apply-templates select="./[EMAIL PROTECTED]'fix']" mode="li"/> + </ul> + <h2> + <xsl:text>Other Changes:</xsl:text> + </h2> + <ul> + <xsl:apply-templates select="./action[not(@type='fix')]" mode="li"/> + </ul> + </body> + </xsl:template> + + <xsl:template match="action" mode="li"> + <li> + <xsl:value-of select="text()"/> + <xsl:if test="not(@issue='')"> + <a> + <xsl:attribute name="href">http://issues.apache.org/bugzilla/show_bug.cgi?id=<xsl:value-of select="@issue"/></xsl:attribute> + <xsl:text>BugZilla Issue </xsl:text><xsl:value-of select="@issue"/><xsl:text></xsl:text> + </a> + </xsl:if> + </li> + </xsl:template> + + <!-- dont copy the text and unmatched nodes as per default in xsl --> + <xsl:template match="text()"/> + +</xsl:stylesheet> Propchange: ant/antlibs/common/trunk/stylesheets/changes2readmehtml.xsl ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/antlibs/common/trunk/stylesheets/changes2whatsnew.xsl URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/stylesheets/changes2whatsnew.xsl?view=auto&rev=465982 ============================================================================== --- ant/antlibs/common/trunk/stylesheets/changes2whatsnew.xsl (added) +++ ant/antlibs/common/trunk/stylesheets/changes2whatsnew.xsl Thu Oct 19 21:28:08 2006 @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="text" indent="no"/> + + <xsl:template match="release"> + <xsl:text>Changes in </xsl:text> + <xsl:value-of select="@version"/> + <xsl:text> +</xsl:text> + <xsl:text>============================================== + +</xsl:text> + <xsl:text>Changes that Could Break Older Environments: +-------------------------------------------- + +</xsl:text> + + <xsl:apply-templates select="./[EMAIL PROTECTED]'true']" mode="li"/> + + <xsl:text>Fixed Bugs: +----------- + +</xsl:text> + + <xsl:apply-templates select="./[EMAIL PROTECTED]'fix' and not(@breaks-bwc='true')]" mode="li"/> + + <xsl:text>Other Changes: +-------------- + +</xsl:text> + + <xsl:apply-templates select="./action[not(@type='fix') and not(@breaks-bwc='true')]" mode="li"/> + <xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="action" mode="li"> + <xsl:value-of select="text()"/> + <xsl:if test="not(@issue='')"> + <xsl:text> + BugZilla Issue </xsl:text><xsl:value-of select="@issue"/><xsl:text> + +</xsl:text> + </xsl:if> + </xsl:template> + + <!-- dont copy the text and unmatched nodes as per default in xsl --> + <xsl:template match="text()"/> + +</xsl:stylesheet> Propchange: ant/antlibs/common/trunk/stylesheets/changes2whatsnew.xsl ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]