Author: olamy Date: Wed Jul 30 15:53:40 2008 New Revision: 681236 URL: http://svn.apache.org/viewvc?rev=681236&view=rev Log: add documentation on the new mojo : changes:changes-validate
Added: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt (with props) Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt maven/plugins/trunk/maven-changes-plugin/src/site/site.xml Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml?rev=681236&r1=681235&r2=681236&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml (original) +++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/pom.xml Wed Jul 30 15:53:40 2008 @@ -48,7 +48,19 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> - <version>${changesPluginVersion}</version> + <version>${changesPluginVersion}</version> + <executions> + <execution> + <id>validate-changes</id> + <phase>pre-site</phase> + <goals> + <goal>changes-validate</goal> + </goals> + <configuration> + <failOnError>true</failOnError> + </configuration> + </execution> + </executions> </plugin> </plugins> </build> Modified: maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml?rev=681236&r1=681235&r2=681236&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml (original) +++ maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/src/changes/changes.xml Wed Jul 30 15:53:40 2008 @@ -17,7 +17,8 @@ under the License. --> -<document> +<document xmlns="http://maven.apache.org/changes/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <properties> <title>Changes report Project</title> <author email="[EMAIL PROTECTED]">Mr Zloug</author> Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java?rev=681236&r1=681235&r2=681236&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java (original) +++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java Wed Jul 30 15:53:40 2008 @@ -20,7 +20,6 @@ */ import java.io.File; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java?rev=681236&r1=681235&r2=681236&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java (original) +++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java Wed Jul 30 15:53:40 2008 @@ -38,7 +38,6 @@ * @goal changes-validate * * @author <a href="mailto:[EMAIL PROTECTED]">olamy</a> - * @since 28 juil. 2008 * @version $Id$ * @since 2.1 */ @@ -118,12 +117,12 @@ private void logSchemaValidation( List /*SAXException*/errors ) { - getLog().error( "failed to validate changes " + xmlPath.getAbsolutePath() ); - getLog().error( "validation errors : " ); + getLog().warn( "failed to validate changes " + xmlPath.getAbsolutePath() ); + getLog().warn( "validation errors : " ); for ( Iterator iterator = errors.iterator(); iterator.hasNext(); ) { SAXException error = (SAXException) iterator.next(); - getLog().error( error.getMessage() ); + getLog().warn( error.getMessage() ); } } Added: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt?rev=681236&view=auto ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt (added) +++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt Wed Jul 30 15:53:40 2008 @@ -0,0 +1,66 @@ + ------ + Validate your changes file + ------ + Olivier Lamy + ------ + 31 July 2008 + ------ + + ~~ 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/doxia/references/apt-format.html + + +Validate your changes file + + Since 2.1, a {{{../changes-validate-mojo.html}mojo}} is now provided a schema file and a mojo is now + provided to validate your changes file.\ + You can attach this mojo to the pre-site phase. + +* Configuring the Plugin + + First you must configure the plugin and tell it to validate your changes file. + ++-----------------+ +<project> + ... + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changes-plugin</artifactId> + <version>2.1</version> + <executions> + <execution> + <id>validate-changes</id> + <phase>pre-site</phase> + <goals> + <goal>changes-validate</goal> + </goals> + <configuration> + <!-- if true the build will fail if the changes is not, if false warn will be logged. --> + <failOnError>true</failOnError> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + ... +</project> ++-----------------+ + Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/changes-file-validation.apt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" 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?rev=681236&r1=681235&r2=681236&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt (original) +++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt Wed Jul 30 15:53:40 2008 @@ -3,7 +3,7 @@ ------ Dennis Lundberg ------ - 16 July 2006 + 31 July 2008 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -45,6 +45,8 @@ * {{{changes-report-mojo.html}changes:changes-report}} create a report showing what has changed between different releases of the project. * {{{jira-report-mojo.html}changes:jira-report}} create a report from issues downloaded from JIRA. + + * {{{changes-validate-mojo.html.html}changes:changes-validate}} create a report from issues downloaded from JIRA. [] @@ -64,3 +66,5 @@ * {{{examples/using-a-custom-announcement-template.html}Using a Custom Announcement Template}} * {{{examples/specifying-mail-sender.html}Specifying the mail sender}} + + * {{{examples/changes-file-validation.html}Validate your changes file}} 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?rev=681236&r1=681235&r2=681236&view=diff ============================================================================== --- maven/plugins/trunk/maven-changes-plugin/src/site/site.xml (original) +++ maven/plugins/trunk/maven-changes-plugin/src/site/site.xml Wed Jul 30 15:53:40 2008 @@ -38,6 +38,7 @@ <item name="SMTP Authentication" href="examples/smtp-authentication.html"/> <item name="Specifying the Mail Sender" href="examples/specifying-mail-sender.html"/> <item name="Using a Custom Announcement Template" href="examples/using-a-custom-announcement-template.html"/> + <item name="Validate your changes file" href="examples/changes-file-validation.html"/> </menu> </body> </project>