MPANNOUNCEMENT-19: added property maven.announcement.lenient
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@331807 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aecfd29e24
commit
a44f732cf8
@ -59,11 +59,15 @@
|
|||||||
<util:file var="inputFile" name="${maven.docs.src}/changes.xml"/>
|
<util:file var="inputFile" name="${maven.docs.src}/changes.xml"/>
|
||||||
|
|
||||||
<j:useBean var="stringUtils" class="org.apache.commons.lang.StringUtils"/>
|
<j:useBean var="stringUtils" class="org.apache.commons.lang.StringUtils"/>
|
||||||
|
<j:set var="isLenient" value="${maven.announcement.lenient}"/>
|
||||||
|
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<goal name="announcement:check-version" prereqs="announcement:init">
|
<goal name="announcement:check-version" prereqs="announcement:init">
|
||||||
|
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${! isLenient}">
|
||||||
|
|
||||||
<x:parse var="doc" xml="${inputFile}"/>
|
<x:parse var="doc" xml="${inputFile}"/>
|
||||||
|
|
||||||
<jsl:stylesheet select="$doc">
|
<jsl:stylesheet select="$doc">
|
||||||
@ -94,6 +98,29 @@
|
|||||||
<ant:fail>Missing "version" element in the POM for release ${versionVariable}.</ant:fail>
|
<ant:fail>Missing "version" element in the POM for release ${versionVariable}.</ant:fail>
|
||||||
</j:if>
|
</j:if>
|
||||||
</j:if>
|
</j:if>
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<!-- creates an empty changes.xml file -->
|
||||||
|
<j:set var="emptyChangesXml" value="${maven.build.dir}/empty-changes.xml"/>
|
||||||
|
<j:file
|
||||||
|
name="${emptyChangesXml}"
|
||||||
|
encoding="${maven.announcement.encoding}"
|
||||||
|
outputMode="xml"
|
||||||
|
omitXmlDeclaration="true"
|
||||||
|
prettyPrint="false">
|
||||||
|
<document>
|
||||||
|
<properties>
|
||||||
|
<title>Release Notes</title>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
<release version="${pom.currentVersion}" description="No description"/>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
|
</j:file>
|
||||||
|
<util:file var="emptyChangesXmlFile" name="${emptyChangesXml}"/>
|
||||||
|
<x:parse var="doc" xml="${emptyChangesXmlFile}"/>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
@ -107,6 +134,13 @@
|
|||||||
<goal name="announcement:generate-all" prereqs="announcement:init"
|
<goal name="announcement:generate-all" prereqs="announcement:init"
|
||||||
description="Generate release announcement for all releases">
|
description="Generate release announcement for all releases">
|
||||||
|
|
||||||
|
<j:set var="changesXmlAvailable" value="false"/>
|
||||||
|
<util:available file="${inputFile}">
|
||||||
|
<j:set var="changesXmlAvailable" value="true"/>
|
||||||
|
</util:available>
|
||||||
|
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${changesXmlAvailable}">
|
||||||
<x:parse var="doc" xml="${inputFile}"/>
|
<x:parse var="doc" xml="${inputFile}"/>
|
||||||
|
|
||||||
<jsl:stylesheet select="$doc">
|
<jsl:stylesheet select="$doc">
|
||||||
@ -119,6 +153,15 @@
|
|||||||
<jsl:template match="@*"/>
|
<jsl:template match="@*"/>
|
||||||
<jsl:template match="text()"/>
|
<jsl:template match="text()"/>
|
||||||
</jsl:stylesheet>
|
</jsl:stylesheet>
|
||||||
|
</j:when>
|
||||||
|
<j:when test="${!changesXmlAvailable and isLenient}">
|
||||||
|
<ant:echo>File ${inputFile} not found, but maven.announcement.lenient set to true: calling announcement!</ant:echo>
|
||||||
|
<attainGoal name="announcement"/>
|
||||||
|
</j:when>
|
||||||
|
<j:when test="${!changesXmlAvailable and !isLenient}">
|
||||||
|
<ant:fail>File ${inputFile} not available</ant:fail>
|
||||||
|
</j:when>
|
||||||
|
</j:choose>
|
||||||
|
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
|
|||||||
@ -53,3 +53,11 @@ maven.announcement.mail.client = localhost
|
|||||||
|
|
||||||
# Mail subject to use when sending an announcement email.
|
# Mail subject to use when sending an announcement email.
|
||||||
maven.announcement.mail.subject = [ANN] ${pom.name} %VERSION% released
|
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 <versions> tag
|
||||||
|
# If set to true, these restrictions are ignored
|
||||||
|
maven.announcement.lenient = false
|
||||||
|
|||||||
22
announcement/src/plugin-test/maven.xml
Normal file
22
announcement/src/plugin-test/maven.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:assert="assert" xmlns:ant="jelly:ant">
|
||||||
|
<goal name="testPlugin">
|
||||||
|
<maven:reactor basedir="${basedir}" includes="*Test/project.xml" goals="testPlugin" banner="Test" ignoreFailures="false"/>
|
||||||
|
</goal>
|
||||||
|
</project>
|
||||||
59
announcement/src/plugin-test/missingReleaseTest/maven.xml
Normal file
59
announcement/src/plugin-test/missingReleaseTest/maven.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" xmlns:assert="assert" xmlns:util="jelly:util" default="testPlugin">
|
||||||
|
|
||||||
|
<goal name="testPlugin" prereqs="testAnnouncement">
|
||||||
|
<attainGoal name="clean"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="testAnnouncement" prereqs="test-default,test-lenient,test-non-lenient"/>
|
||||||
|
|
||||||
|
<goal name="test-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="true"/>
|
||||||
|
<attainGoal name="announcement"/>
|
||||||
|
<attainGoal name="assert-generated-file"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-non-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="false"/>
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-default" prereqs="clean">
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="assert-generated-file">
|
||||||
|
<maven:property var="announcementFile" name="maven.announcement.file"
|
||||||
|
defaultValue="${maven.gen.docs}/announcements/announcement-${pom.currentVersion}.txt"/>
|
||||||
|
<assert:assertFileExists file="${announcementFile}"/>
|
||||||
|
<util:file var="generatedFile" name="${announcementFile}"/>
|
||||||
|
<j:set var="fileSize" value="${generatedFile.length()}"/>
|
||||||
|
<j:if test="${fileSize==0}">
|
||||||
|
<ant:fail>File ${announcementFile} was generated empty!</ant:fail>
|
||||||
|
</j:if>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="catch-it" prereqs="clean">
|
||||||
|
<j:catch var="e">
|
||||||
|
<attainGoal name="announcement"/>
|
||||||
|
</j:catch>
|
||||||
|
<j:if test="${empty(e)}">
|
||||||
|
<ant:fail>Goal announcement should have failed</ant:fail>
|
||||||
|
</j:if>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
</project>
|
||||||
37
announcement/src/plugin-test/missingReleaseTest/project.xml
Normal file
37
announcement/src/plugin-test/missingReleaseTest/project.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/3.0.0
|
||||||
|
http://maven.apache.org/maven-v3_0_0.xsd">
|
||||||
|
<pomVersion>3</pomVersion>
|
||||||
|
<name>Announcment Plugin - Ignore Missing Release Test</name>
|
||||||
|
<artifactId>test-maven-announcement-ignore-missing-release-test</artifactId>
|
||||||
|
<inceptionYear>2005</inceptionYear>
|
||||||
|
<shortDescription>Tests missing release element on changes.xml</shortDescription>
|
||||||
|
<description>Tests missing release element on changes.xml when property maven.announcement.lenient is set</description>
|
||||||
|
<currentVersion>1.0</currentVersion>
|
||||||
|
<url/>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Felipe Leme</name>
|
||||||
|
<id>felipeal</id>
|
||||||
|
<email>maven@felipeal.net</email>
|
||||||
|
<organization>Falcon Informatica</organization>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
</project>
|
||||||
8
announcement/src/plugin-test/missingReleaseTest/xdocs/changes.xml
Executable file
8
announcement/src/plugin-test/missingReleaseTest/xdocs/changes.xml
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<document>
|
||||||
|
<body>
|
||||||
|
<release version="6.6.6" >
|
||||||
|
<action dev="felipeal" type="add">Bogus version.</action>
|
||||||
|
</release>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
59
announcement/src/plugin-test/missingVersionTest/maven.xml
Normal file
59
announcement/src/plugin-test/missingVersionTest/maven.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" xmlns:assert="assert" xmlns:util="jelly:util" default="testPlugin">
|
||||||
|
|
||||||
|
<goal name="testPlugin" prereqs="testAnnouncement">
|
||||||
|
<attainGoal name="clean"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="testAnnouncement" prereqs="test-default,test-lenient,test-non-lenient"/>
|
||||||
|
|
||||||
|
<goal name="test-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="true"/>
|
||||||
|
<attainGoal name="announcement"/>
|
||||||
|
<attainGoal name="assert-generated-file"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-non-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="false"/>
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-default" prereqs="clean">
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="assert-generated-file">
|
||||||
|
<maven:property var="announcementFile" name="maven.announcement.file"
|
||||||
|
defaultValue="${maven.gen.docs}/announcements/announcement-${pom.currentVersion}.txt"/>
|
||||||
|
<assert:assertFileExists file="${announcementFile}"/>
|
||||||
|
<util:file var="generatedFile" name="${announcementFile}"/>
|
||||||
|
<j:set var="fileSize" value="${generatedFile.length()}"/>
|
||||||
|
<j:if test="${fileSize==0}">
|
||||||
|
<ant:fail>File ${announcementFile} was generated empty!</ant:fail>
|
||||||
|
</j:if>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="catch-it" prereqs="clean">
|
||||||
|
<j:catch var="e">
|
||||||
|
<attainGoal name="announcement"/>
|
||||||
|
</j:catch>
|
||||||
|
<j:if test="${empty(e)}">
|
||||||
|
<ant:fail>Goal announcement should have failed</ant:fail>
|
||||||
|
</j:if>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
</project>
|
||||||
44
announcement/src/plugin-test/missingVersionTest/project.xml
Normal file
44
announcement/src/plugin-test/missingVersionTest/project.xml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/3.0.0
|
||||||
|
http://maven.apache.org/maven-v3_0_0.xsd">
|
||||||
|
<pomVersion>3</pomVersion>
|
||||||
|
<name>Announcment Plugin - Ignore Missing Version Test</name>
|
||||||
|
<artifactId>test-maven-announcement-ignore-missing-version-test</artifactId>
|
||||||
|
<inceptionYear>2005</inceptionYear>
|
||||||
|
<shortDescription>Tests missing version element on project.xml</shortDescription>
|
||||||
|
<description>Tests missing element on project.xml when property maven.announcement.lenient is set</description>
|
||||||
|
<currentVersion>1.0</currentVersion>
|
||||||
|
<versions>
|
||||||
|
<version>
|
||||||
|
<id>6.6.6</id>
|
||||||
|
<name>6.6.6</name>
|
||||||
|
<tag>BOGUS-6.6.6</tag>
|
||||||
|
</version>
|
||||||
|
</versions>
|
||||||
|
<url/>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Felipe Leme</name>
|
||||||
|
<id>felipeal</id>
|
||||||
|
<email>maven@felipeal.net</email>
|
||||||
|
<organization>Falcon Informatica</organization>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
</project>
|
||||||
8
announcement/src/plugin-test/missingVersionTest/xdocs/changes.xml
Executable file
8
announcement/src/plugin-test/missingVersionTest/xdocs/changes.xml
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<document>
|
||||||
|
<body>
|
||||||
|
<release version="1.0" >
|
||||||
|
<action dev="felipeal" type="add">Bogus version.</action>
|
||||||
|
</release>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
74
announcement/src/plugin-test/noChangesXmlTest/maven.xml
Normal file
74
announcement/src/plugin-test/noChangesXmlTest/maven.xml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" xmlns:assert="assert" xmlns:util="jelly:util" default="testPlugin">
|
||||||
|
<goal name="testPlugin" prereqs="testAnnouncement,testAnnouncementAll">
|
||||||
|
<attainGoal name="clean"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="testAnnouncement" prereqs="test-default,test-lenient,test-non-lenient"/>
|
||||||
|
<goal name="testAnnouncementAll" prereqs="test-all-default,test-all-lenient,test-all-non-lenient"/>
|
||||||
|
|
||||||
|
<goal name="test-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="true"/>
|
||||||
|
<attainGoal name="announcement"/>
|
||||||
|
<attainGoal name="assert-generated-file"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-non-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="false"/>
|
||||||
|
<j:set var="catchItGoal" value="announcement"/>
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-default" prereqs="clean">
|
||||||
|
<j:set var="catchItGoal" value="announcement"/>
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="test-all-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="true"/>
|
||||||
|
<attainGoal name="announcement:generate-all"/>
|
||||||
|
<attainGoal name="assert-generated-file"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-all-non-lenient" prereqs="clean">
|
||||||
|
<j:set var="maven.announcement.lenient" value="false"/>
|
||||||
|
<j:set var="catchItGoal" value="announcement:generate-all"/>
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
<goal name="test-all-default" prereqs="clean">
|
||||||
|
<j:set var="catchItGoal" value="announcement:generate-all"/>
|
||||||
|
<attainGoal name="catch-it"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="assert-generated-file">
|
||||||
|
<maven:property var="announcementFile" name="maven.announcement.file"
|
||||||
|
defaultValue="${maven.gen.docs}/announcements/announcement-${pom.currentVersion}.txt"/>
|
||||||
|
<assert:assertFileExists file="${announcementFile}"/>
|
||||||
|
<util:file var="generatedFile" name="${announcementFile}"/>
|
||||||
|
<j:set var="fileSize" value="${generatedFile.length()}"/>
|
||||||
|
<j:if test="${fileSize==0}">
|
||||||
|
<ant:fail>File ${announcementFile} was generated empty!</ant:fail>
|
||||||
|
</j:if>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="catch-it" prereqs="clean">
|
||||||
|
<j:catch var="e">
|
||||||
|
<attainGoal name="${catchItGoal}"/>
|
||||||
|
</j:catch>
|
||||||
|
<j:if test="${empty(e)}">
|
||||||
|
<ant:fail>Goal ${catchItGoal} should have failed</ant:fail>
|
||||||
|
</j:if>
|
||||||
|
</goal>
|
||||||
|
</project>
|
||||||
@ -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
|
||||||
|
|
||||||
37
announcement/src/plugin-test/noChangesXmlTest/project.xml
Normal file
37
announcement/src/plugin-test/noChangesXmlTest/project.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/3.0.0
|
||||||
|
http://maven.apache.org/maven-v3_0_0.xsd">
|
||||||
|
<pomVersion>3</pomVersion>
|
||||||
|
<name>Announcment Plugin - No changes.xml Test</name>
|
||||||
|
<artifactId>test-maven-announcement-no-changes-xml-test</artifactId>
|
||||||
|
<inceptionYear>2005</inceptionYear>
|
||||||
|
<currentVersion>1.0</currentVersion>
|
||||||
|
<shortDescription>Tests missing changes.xml file</shortDescription>
|
||||||
|
<description>Tests missing changes.xml file when maven.announcement.lenient property is set</description>
|
||||||
|
<url/>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Felipe Leme</name>
|
||||||
|
<id>felipeal</id>
|
||||||
|
<email>maven@felipeal.net</email>
|
||||||
|
<organization>Falcon Informatica</organization>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
</project>
|
||||||
42
announcement/src/plugin-test/project.xml
Normal file
42
announcement/src/plugin-test/project.xml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<project>
|
||||||
|
<pomVersion>3</pomVersion>
|
||||||
|
<name>Test project for Maven Announcement Plugin</name>
|
||||||
|
<groupId>maven</groupId>
|
||||||
|
<currentVersion>1.0</currentVersion>
|
||||||
|
<organization>
|
||||||
|
<name>Apache Software Foundation</name>
|
||||||
|
<url>http://www.apache.org/</url>
|
||||||
|
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||||
|
</organization>
|
||||||
|
<inceptionYear>2005</inceptionYear>
|
||||||
|
<package>org.apache.maven</package>
|
||||||
|
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||||
|
<description>Test for Maven Announcement plugin</description>
|
||||||
|
<shortDescription>Test for Maven Announcement plugin</shortDescription>
|
||||||
|
<url>http://maven.apache.org/reference/plugins/announcement/</url>
|
||||||
|
<siteDirectory>/www/maven.apache.org/reference/plugins/announcement/</siteDirectory>
|
||||||
|
<repository>
|
||||||
|
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/announcement/</connection>
|
||||||
|
<url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/announcement/</url>
|
||||||
|
</repository>
|
||||||
|
</project>
|
||||||
@ -25,6 +25,8 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="1.4-SNAPSHOT" date="in SVN">
|
<release version="1.4-SNAPSHOT" date="in SVN">
|
||||||
|
<action dev="felipeal" type="add" issue="MPANNOUNCEMENT-19">Added property <code>maven.announcement.lenient</code>.
|
||||||
|
</action>
|
||||||
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
|
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
|
||||||
<ul>
|
<ul>
|
||||||
<li>commons-net v1.2.1 -> v1.4.0</li>
|
<li>commons-net v1.2.1 -> v1.4.0</li>
|
||||||
|
|||||||
@ -140,6 +140,21 @@
|
|||||||
<code>UTF-8</code>
|
<code>UTF-8</code>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.announcement.lenient</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
When set to <code>false</code>, the plugin will fail in the occurrence of any of the following conditions:<br/>
|
||||||
|
<ul>
|
||||||
|
<li><code>xdocs/changes.xml</code> file is not available</li>
|
||||||
|
<li><code>xdocs/changes.xml</code> has not a <code>release</code> entry for the current version</li>
|
||||||
|
<li><code>project.xml</code> has not a <code>version</code> entry for the current version</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<code>false</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user