diff --git a/announcement/plugin.jelly b/announcement/plugin.jelly index 4cdb2ec5..28f4f2f3 100644 --- a/announcement/plugin.jelly +++ b/announcement/plugin.jelly @@ -59,42 +59,69 @@ + - - - - - - - - - - - - + + - - The ${versionVariable} release could not be found in the changes.xml file. - + - - - - - - - + + + + + + + + + + + + + The ${versionVariable} release could not be found in the changes.xml file. - - - Missing "version" element in the POM for release ${versionVariable}. - - + + + + + + + + + + + Missing "version" element in the POM for release ${versionVariable}. + + + + + + + + + + Release Notes + + + + + + + + + + + - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + File ${inputFile} not found, but maven.announcement.lenient set to true: calling announcement! + + + + File ${inputFile} not available + + diff --git a/announcement/plugin.properties b/announcement/plugin.properties index 29e775a2..992d10ac 100644 --- a/announcement/plugin.properties +++ b/announcement/plugin.properties @@ -53,3 +53,11 @@ maven.announcement.mail.client = localhost # Mail subject to use when sending an announcement email. maven.announcement.mail.subject = [ANN] ${pom.name} %VERSION% released + +# Flag indicating if the announcement should be generated when restrictions +# doesn't apply: +# - changes.xml is missing +# - release version is missing on changes.xml +# - release version is missing on project.xml tag +# If set to true, these restrictions are ignored +maven.announcement.lenient = false diff --git a/announcement/src/plugin-test/maven.xml b/announcement/src/plugin-test/maven.xml new file mode 100644 index 00000000..34300aa4 --- /dev/null +++ b/announcement/src/plugin-test/maven.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/announcement/src/plugin-test/missingReleaseTest/maven.xml b/announcement/src/plugin-test/missingReleaseTest/maven.xml new file mode 100644 index 00000000..5b31647e --- /dev/null +++ b/announcement/src/plugin-test/missingReleaseTest/maven.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File ${announcementFile} was generated empty! + + + + + + + + + Goal announcement should have failed + + + + diff --git a/announcement/src/plugin-test/missingReleaseTest/project.xml b/announcement/src/plugin-test/missingReleaseTest/project.xml new file mode 100644 index 00000000..317cb4c8 --- /dev/null +++ b/announcement/src/plugin-test/missingReleaseTest/project.xml @@ -0,0 +1,37 @@ + + + + 3 + Announcment Plugin - Ignore Missing Release Test + test-maven-announcement-ignore-missing-release-test + 2005 + Tests missing release element on changes.xml + Tests missing release element on changes.xml when property maven.announcement.lenient is set + 1.0 + + + + Felipe Leme + felipeal + maven@felipeal.net + Falcon Informatica + + + diff --git a/announcement/src/plugin-test/missingReleaseTest/xdocs/changes.xml b/announcement/src/plugin-test/missingReleaseTest/xdocs/changes.xml new file mode 100755 index 00000000..dc1449bb --- /dev/null +++ b/announcement/src/plugin-test/missingReleaseTest/xdocs/changes.xml @@ -0,0 +1,8 @@ + + + + + Bogus version. + + + diff --git a/announcement/src/plugin-test/missingVersionTest/maven.xml b/announcement/src/plugin-test/missingVersionTest/maven.xml new file mode 100644 index 00000000..5b31647e --- /dev/null +++ b/announcement/src/plugin-test/missingVersionTest/maven.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File ${announcementFile} was generated empty! + + + + + + + + + Goal announcement should have failed + + + + diff --git a/announcement/src/plugin-test/missingVersionTest/project.xml b/announcement/src/plugin-test/missingVersionTest/project.xml new file mode 100644 index 00000000..84389a9d --- /dev/null +++ b/announcement/src/plugin-test/missingVersionTest/project.xml @@ -0,0 +1,44 @@ + + + + 3 + Announcment Plugin - Ignore Missing Version Test + test-maven-announcement-ignore-missing-version-test + 2005 + Tests missing version element on project.xml + Tests missing element on project.xml when property maven.announcement.lenient is set + 1.0 + + + 6.6.6 + 6.6.6 + BOGUS-6.6.6 + + + + + + Felipe Leme + felipeal + maven@felipeal.net + Falcon Informatica + + + diff --git a/announcement/src/plugin-test/missingVersionTest/xdocs/changes.xml b/announcement/src/plugin-test/missingVersionTest/xdocs/changes.xml new file mode 100755 index 00000000..0a000cab --- /dev/null +++ b/announcement/src/plugin-test/missingVersionTest/xdocs/changes.xml @@ -0,0 +1,8 @@ + + + + + Bogus version. + + + diff --git a/announcement/src/plugin-test/noChangesXmlTest/maven.xml b/announcement/src/plugin-test/noChangesXmlTest/maven.xml new file mode 100644 index 00000000..efa87d60 --- /dev/null +++ b/announcement/src/plugin-test/noChangesXmlTest/maven.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File ${announcementFile} was generated empty! + + + + + + + + + Goal ${catchItGoal} should have failed + + + diff --git a/announcement/src/plugin-test/noChangesXmlTest/project.properties b/announcement/src/plugin-test/noChangesXmlTest/project.properties new file mode 100644 index 00000000..aebaf1e3 --- /dev/null +++ b/announcement/src/plugin-test/noChangesXmlTest/project.properties @@ -0,0 +1,17 @@ +# ------------------------------------------------------------------- +# Copyright 2005 The Apache Software Foundation. +# +# Licensed 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. +# ------------------------------------------------------------------- +maven.announcement.versions.ignore=true + diff --git a/announcement/src/plugin-test/noChangesXmlTest/project.xml b/announcement/src/plugin-test/noChangesXmlTest/project.xml new file mode 100644 index 00000000..2d99b18e --- /dev/null +++ b/announcement/src/plugin-test/noChangesXmlTest/project.xml @@ -0,0 +1,37 @@ + + + + 3 + Announcment Plugin - No changes.xml Test + test-maven-announcement-no-changes-xml-test + 2005 + 1.0 + Tests missing changes.xml file + Tests missing changes.xml file when maven.announcement.lenient property is set + + + + Felipe Leme + felipeal + maven@felipeal.net + Falcon Informatica + + + diff --git a/announcement/src/plugin-test/project.xml b/announcement/src/plugin-test/project.xml new file mode 100644 index 00000000..d16190ff --- /dev/null +++ b/announcement/src/plugin-test/project.xml @@ -0,0 +1,42 @@ + + + + + + 3 + Test project for Maven Announcement Plugin + maven + 1.0 + + Apache Software Foundation + http://www.apache.org/ + http://maven.apache.org/images/apache-maven-project.png + + 2005 + org.apache.maven + http://maven.apache.org/images/maven.gif + Test for Maven Announcement plugin + Test for Maven Announcement plugin + http://maven.apache.org/reference/plugins/announcement/ + /www/maven.apache.org/reference/plugins/announcement/ + + scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/announcement/ + http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/announcement/ + + \ No newline at end of file diff --git a/announcement/xdocs/changes.xml b/announcement/xdocs/changes.xml index d555932e..19f75966 100644 --- a/announcement/xdocs/changes.xml +++ b/announcement/xdocs/changes.xml @@ -25,6 +25,8 @@ + Added property maven.announcement.lenient. + Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
  • commons-net v1.2.1 -> v1.4.0
  • diff --git a/announcement/xdocs/properties.xml b/announcement/xdocs/properties.xml index b4e47836..d96d4875 100644 --- a/announcement/xdocs/properties.xml +++ b/announcement/xdocs/properties.xml @@ -140,6 +140,21 @@ UTF-8 + + maven.announcement.lenient + Yes + + When set to false, the plugin will fail in the occurrence of any of the following conditions:
    +
      +
    • xdocs/changes.xml file is not available
    • +
    • xdocs/changes.xml has not a release entry for the current version
    • +
    • project.xml has not a version entry for the current version
    • +
    + + + false + +