[MCHANGES-376] Improve log messages on issue management misconfiguration

During site generation, the inability to generate a report is logged as WARNING instead of ERROR since it doesn't fail the build. For the announcement generation, an error is still raised. Adding ITs to test for the various errors during announcement generation, and that no errors are raised during site generation. This closes #20.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1765156 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/it/announce-generate-inconsistent-issue-management/invoker.properties b/src/it/announce-generate-inconsistent-issue-management/invoker.properties
new file mode 100644
index 0000000..3262594
--- /dev/null
+++ b/src/it/announce-generate-inconsistent-issue-management/invoker.properties
@@ -0,0 +1,20 @@
+# 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.
+
+invoker.goals = clean changes:announcement-generate
+
+invoker.buildResult = failure
diff --git a/src/it/announce-generate-inconsistent-issue-management/pom.xml b/src/it/announce-generate-inconsistent-issue-management/pom.xml
new file mode 100644
index 0000000..85754a2
--- /dev/null
+++ b/src/it/announce-generate-inconsistent-issue-management/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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 xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-changes-plugin-test</artifactId>
+  <version>1.1</version>
+  <name>Maven</name>
+  <packaging>jar</packaging>
+  <description>Test that an exception is thrown if an issue management system is set but there is no Issue Management
+  with this system in the POM</description>
+  <url>http://www.foo.com</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <issueManagement>
+    <system>GitHub</system>
+    <url>http://localhost/bla</url>
+  </issueManagement>
+  <properties>
+    <changesPluginVersion>@pom.version@</changesPluginVersion>
+  </properties>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-changes-plugin</artifactId>
+          <version>${changesPluginVersion}</version>          
+        </plugin>
+      </plugins>
+    </pluginManagement>    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${changesPluginVersion}</version>
+        <configuration>
+          <issueManagementSystems>
+            <issueManagementSystem>Trac</issueManagementSystem> <!-- POM has GitHub but not Trac -->
+          </issueManagementSystems>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>  
+</project>
diff --git a/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml b/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
new file mode 100644
index 0000000..7c86280
--- /dev/null
+++ b/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
@@ -0,0 +1,65 @@
+<!--
+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.
+-->
+
+<document xmlns="http://maven.apache.org/changes/1.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd">
+  <properties>
+    <title>Changes report Project</title>
+    <author email="zloug@toto.com">Mr Zloug</author>
+  </properties>
+  <body>
+    <release version="1.1" date="2005-03-01" description="Subsequent release">
+      <action dev="me" type="add">
+        Added additional documentation on how to configure the plugin.
+      </action>
+      <action dev="me" type="fix" issue="MCHANGES-88">
+        Enable retrieving component-specific issues.
+      </action>
+      <action dev="jruiz" type="remove" issue="MCHANGES-899">
+        The element type " link " must be terminated by the matching end-tag.
+        Deleted the erroneous code.
+        <fixes issue="MCHANGES-1"/>
+        <fixes issue="JIRA-12"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+      <action dev="you" type="update" issue="MCHANGES-999" system="bugzilla" due-to="External Submitter">
+        Handle different issue systems.
+        <fixes issue="bug-12345"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+      </action>
+      <action dev="him" type="update">
+        Updated dependencies.
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+
+    <release version="1.0" date="2005-01-01" description="First release">
+      <action dev="me" type="update" issue="MCHANGES-47" due-to="others" due-to-email="others@users.com">
+        Uploaded documentation on how to use the plugin.
+        <fixes issue="MCHANGES-88"/>
+        <fixes issue="JIRA-YYY"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+  </body>
+</document>
\ No newline at end of file
diff --git a/src/it/announce-generate-no-issue-management/invoker.properties b/src/it/announce-generate-no-issue-management/invoker.properties
new file mode 100644
index 0000000..3262594
--- /dev/null
+++ b/src/it/announce-generate-no-issue-management/invoker.properties
@@ -0,0 +1,20 @@
+# 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.
+
+invoker.goals = clean changes:announcement-generate
+
+invoker.buildResult = failure
diff --git a/src/it/announce-generate-no-issue-management/pom.xml b/src/it/announce-generate-no-issue-management/pom.xml
new file mode 100644
index 0000000..1ea8477
--- /dev/null
+++ b/src/it/announce-generate-no-issue-management/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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 xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-changes-plugin-test</artifactId>
+  <version>1.1</version>
+  <name>Maven</name>
+  <packaging>jar</packaging>
+  <description>Test that an exception is thrown if an issue management system is set but there is no Issue Management
+  in the POM</description>
+  <url>http://www.foo.com</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <!-- no issue management -->
+  <properties>
+    <changesPluginVersion>@pom.version@</changesPluginVersion>
+  </properties>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-changes-plugin</artifactId>
+          <version>${changesPluginVersion}</version>          
+        </plugin>
+      </plugins>
+    </pluginManagement>    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${changesPluginVersion}</version>
+        <configuration>
+          <issueManagementSystems>
+            <issueManagementSystem>JIRA</issueManagementSystem>
+          </issueManagementSystems>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>  
+</project>
diff --git a/src/it/announce-generate-no-issue-management/src/changes/changes.xml b/src/it/announce-generate-no-issue-management/src/changes/changes.xml
new file mode 100644
index 0000000..7c86280
--- /dev/null
+++ b/src/it/announce-generate-no-issue-management/src/changes/changes.xml
@@ -0,0 +1,65 @@
+<!--
+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.
+-->
+
+<document xmlns="http://maven.apache.org/changes/1.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd">
+  <properties>
+    <title>Changes report Project</title>
+    <author email="zloug@toto.com">Mr Zloug</author>
+  </properties>
+  <body>
+    <release version="1.1" date="2005-03-01" description="Subsequent release">
+      <action dev="me" type="add">
+        Added additional documentation on how to configure the plugin.
+      </action>
+      <action dev="me" type="fix" issue="MCHANGES-88">
+        Enable retrieving component-specific issues.
+      </action>
+      <action dev="jruiz" type="remove" issue="MCHANGES-899">
+        The element type " link " must be terminated by the matching end-tag.
+        Deleted the erroneous code.
+        <fixes issue="MCHANGES-1"/>
+        <fixes issue="JIRA-12"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+      <action dev="you" type="update" issue="MCHANGES-999" system="bugzilla" due-to="External Submitter">
+        Handle different issue systems.
+        <fixes issue="bug-12345"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+      </action>
+      <action dev="him" type="update">
+        Updated dependencies.
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+
+    <release version="1.0" date="2005-01-01" description="First release">
+      <action dev="me" type="update" issue="MCHANGES-47" due-to="others" due-to-email="others@users.com">
+        Uploaded documentation on how to use the plugin.
+        <fixes issue="MCHANGES-88"/>
+        <fixes issue="JIRA-YYY"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+  </body>
+</document>
\ No newline at end of file
diff --git a/src/it/announce-generate-no-url/invoker.properties b/src/it/announce-generate-no-url/invoker.properties
new file mode 100644
index 0000000..3262594
--- /dev/null
+++ b/src/it/announce-generate-no-url/invoker.properties
@@ -0,0 +1,20 @@
+# 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.
+
+invoker.goals = clean changes:announcement-generate
+
+invoker.buildResult = failure
diff --git a/src/it/announce-generate-no-url/pom.xml b/src/it/announce-generate-no-url/pom.xml
new file mode 100644
index 0000000..f34d3ac
--- /dev/null
+++ b/src/it/announce-generate-no-url/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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 xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-changes-plugin-test</artifactId>
+  <version>1.1</version>
+  <name>Maven</name>
+  <packaging>jar</packaging>
+  <description>Test that an exception is thrown if an issue management system is set but there is no URL in the Issue
+  Management in the POM</description>
+  <url>http://www.foo.com</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <issueManagement>
+    <system>GitHub</system>
+    <!-- no URL -->
+  </issueManagement>
+  <properties>
+    <changesPluginVersion>@pom.version@</changesPluginVersion>
+  </properties>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-changes-plugin</artifactId>
+          <version>${changesPluginVersion}</version>          
+        </plugin>
+      </plugins>
+    </pluginManagement>    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${changesPluginVersion}</version>
+        <configuration>
+          <issueManagementSystems>
+            <issueManagementSystem>GitHub</issueManagementSystem>
+          </issueManagementSystems>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>  
+</project>
diff --git a/src/it/announce-generate-no-url/src/changes/changes.xml b/src/it/announce-generate-no-url/src/changes/changes.xml
new file mode 100644
index 0000000..7c86280
--- /dev/null
+++ b/src/it/announce-generate-no-url/src/changes/changes.xml
@@ -0,0 +1,65 @@
+<!--
+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.
+-->
+
+<document xmlns="http://maven.apache.org/changes/1.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd">
+  <properties>
+    <title>Changes report Project</title>
+    <author email="zloug@toto.com">Mr Zloug</author>
+  </properties>
+  <body>
+    <release version="1.1" date="2005-03-01" description="Subsequent release">
+      <action dev="me" type="add">
+        Added additional documentation on how to configure the plugin.
+      </action>
+      <action dev="me" type="fix" issue="MCHANGES-88">
+        Enable retrieving component-specific issues.
+      </action>
+      <action dev="jruiz" type="remove" issue="MCHANGES-899">
+        The element type " link " must be terminated by the matching end-tag.
+        Deleted the erroneous code.
+        <fixes issue="MCHANGES-1"/>
+        <fixes issue="JIRA-12"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+      <action dev="you" type="update" issue="MCHANGES-999" system="bugzilla" due-to="External Submitter">
+        Handle different issue systems.
+        <fixes issue="bug-12345"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+      </action>
+      <action dev="him" type="update">
+        Updated dependencies.
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+
+    <release version="1.0" date="2005-01-01" description="First release">
+      <action dev="me" type="update" issue="MCHANGES-47" due-to="others" due-to-email="others@users.com">
+        Uploaded documentation on how to use the plugin.
+        <fixes issue="MCHANGES-88"/>
+        <fixes issue="JIRA-YYY"/>
+        <dueto name="John Doe" email="john@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+  </body>
+</document>
\ No newline at end of file
diff --git a/src/it/report-jira-invalid-issuemanagement/pom.xml b/src/it/report-jira-invalid-issuemanagement/pom.xml
new file mode 100644
index 0000000..fb53f58
--- /dev/null
+++ b/src/it/report-jira-invalid-issuemanagement/pom.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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 xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-changes-plugin-test</artifactId>
+  <version>99.0</version>
+  <name>Maven</name>
+  <packaging>jar</packaging>
+  <description>https://issues.apache.org/jira/browse/MCHANGES-376</description>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <properties>
+    <changesPluginVersion>@pom.version@</changesPluginVersion>
+  </properties>
+  <issueManagement>
+    <system>jira</system>
+    <url>http://localhost</url>
+  </issueManagement>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-changes-plugin</artifactId>
+          <version>${changesPluginVersion}</version>          
+        </plugin>
+      </plugins>
+    </pluginManagement>    
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <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>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>@sitePluginVersion@</version>
+      </plugin>      
+    </plugins>
+  </build>  
+  <reporting>
+    <excludeDefaults>true</excludeDefaults>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>@pom.version@</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <!-- Issue Management in the POM is JIRA, but we're trying to generate GitHub and Trac report -->
+              <report>github-report</report>
+              <report>trac-report</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+  
+</project>
diff --git a/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml b/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
new file mode 100644
index 0000000..6e8d498
--- /dev/null
+++ b/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
@@ -0,0 +1,53 @@
+<!--
+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.
+-->
+
+<document xmlns="http://maven.apache.org/changes/1.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd">
+  <properties>
+    <title>Changes report Project</title>
+    <author email="zloug@toto.com">Mr Zloug</author>
+  </properties>
+  <body>
+    <release version="1.1" date="2005-03-01" description="Subsequent release">
+      <action dev="me" type="add">
+        Added additional documentation on how to configure the plugin.
+      </action>
+      <action dev="me" type="fix" issue="MCHANGES-88">
+        Enable retrieving component-specific issues.
+      </action>
+      <action dev="me" type="fix" issue="1212" system="qc">
+        Enable retrieving component-specific issues.
+      </action>      
+      <action dev="TheOneAndOnly" type="update" issue="88" system="redmine">
+        Updated library dependency.
+      </action>
+      <action dev="jruiz" type="remove" due-to="others" due-to-email="users@users.com">
+        The element type " link " must be terminated by the matching end-tag.
+        Deleted the erroneous code.
+      </action>
+    </release>
+
+    <release version="1.0" date="2005-01-01" description="First release">
+      <action dev="me" type="update" date="2008-01-01">
+        Uploaded documentation on how to use the plugin.
+      </action>
+    </release>
+  </body>
+</document>
diff --git a/src/it/report-jira-invalid-issuemanagement/verify.groovy b/src/it/report-jira-invalid-issuemanagement/verify.groovy
new file mode 100644
index 0000000..eaf850d
--- /dev/null
+++ b/src/it/report-jira-invalid-issuemanagement/verify.groovy
@@ -0,0 +1,28 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+
+content = new File( basedir, 'build.log' ).text;
+
+assert !content.contains( '[ERROR]' );
+
+return true;
\ No newline at end of file
diff --git a/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java b/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
index 83fb121..be04f80 100644
--- a/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
+++ b/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
@@ -19,6 +19,15 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.changes.ChangesXML;
 import org.apache.maven.plugin.changes.IssueAdapter;
@@ -50,15 +59,6 @@
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.velocity.VelocityComponent;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
 /**
  * Goal which generate an announcement from the announcement template.
  *
@@ -524,7 +524,8 @@
 
             if ( issueManagementSystems.contains( JIRA ) )
             {
-                if ( ProjectUtils.validateIfIssueManagementComplete( project, JIRA, "JIRA announcement", getLog() ) )
+                String message = ProjectUtils.validateIssueManagement( project, JIRA, "JIRA announcement" );
+                if ( message == null )
                 {
                     List<Release> jiraReleases = getJiraReleases();
                     releases = releaseUtils.mergeReleases( releases, jiraReleases );
@@ -533,13 +534,14 @@
                 else
                 {
                     throw new MojoExecutionException( "Something is wrong with the Issue Management section. "
-                        + "See previous error messages." );
+                        + message );
                 }
             }
 
             if ( issueManagementSystems.contains( TRAC ) )
             {
-                if ( ProjectUtils.validateIfIssueManagementComplete( project, TRAC, "Trac announcement", getLog() ) )
+                String message = ProjectUtils.validateIssueManagement( project, TRAC, "Trac announcement" );
+                if ( message == null )
                 {
                     List<Release> tracReleases = getTracReleases();
                     releases = releaseUtils.mergeReleases( releases, tracReleases );
@@ -548,14 +550,14 @@
                 else
                 {
                     throw new MojoExecutionException( "Something is wrong with the Issue Management section. "
-                        + "See previous error messages." );
+                                    + message );
                 }
             }
 
             if ( issueManagementSystems.contains( GIT_HUB ) )
             {
-                if ( ProjectUtils.validateIfIssueManagementComplete( project, GIT_HUB, "GitHub announcement",
-                                                                     getLog() ) )
+                String message = ProjectUtils.validateIssueManagement( project, GIT_HUB, "GitHub announcement" );
+                if ( message == null )
                 {
                     List<Release> gitHubReleases = getGitHubReleases();
                     releases = releaseUtils.mergeReleases( releases, gitHubReleases );
@@ -564,7 +566,7 @@
                 else
                 {
                     throw new MojoExecutionException( "Something is wrong with the Issue Management section. "
-                        + "See previous error messages." );
+                                    + message );
                 }
             }
 
diff --git a/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java b/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
index 2ef3eb0..cf95d18 100644
--- a/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
+++ b/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
@@ -19,7 +19,6 @@
  * under the License.
  */
 
-import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.project.MavenProject;
 
 /**
@@ -29,42 +28,40 @@
  * @version $Id$
  * @since 2.4
  */
-public class ProjectUtils
+public final class ProjectUtils
 {
+
+    private ProjectUtils()
+    {
+    }
+
     /**
      * Check if the issue management system has been properly configured in the Maven project.
      *
      * @param project The Maven project
      * @param issueManagementSystem The name of the issue management system that is required
      * @param mojoResult What the calling mojo produces, used in the error messages
-     * @param log A log
-     * @return <code>true</code> if the &lt;issueManagement&gt; element of the POM is complete, otherwise
-     *         <code>false</code>
+     * @return <code>null</code> if the &lt;issueManagement&gt; element of the POM is complete, otherwise a String
+     *         containing the reason of the failed validation.
      */
-    public static boolean validateIfIssueManagementComplete( MavenProject project, String issueManagementSystem,
-                                                             String mojoResult, Log log )
+    public static String validateIssueManagement( MavenProject project, String issueManagementSystem,
+                                                  String mojoResult )
     {
         if ( project.getIssueManagement() == null )
         {
-            log.error( "No Issue Management set. No " + mojoResult + " will be generated." );
-
-            return false;
+            return "No Issue Management set. No " + mojoResult + " will be generated.";
         }
         else if ( ( project.getIssueManagement().getUrl() == null )
             || ( project.getIssueManagement().getUrl().trim().equals( "" ) ) )
         {
-            log.error( "No URL set in Issue Management. No " + mojoResult + " will be generated." );
-
-            return false;
+            return "No URL set in Issue Management. No " + mojoResult + " will be generated.";
         }
         else if ( ( project.getIssueManagement().getSystem() != null )
             && !( project.getIssueManagement().getSystem().equalsIgnoreCase( issueManagementSystem ) ) )
         {
-            log.error( "The " + mojoResult + " only supports " + issueManagementSystem + ".  No " + mojoResult
-                + " will be generated." );
-
-            return false;
+            return "The " + mojoResult + " only supports " + issueManagementSystem + ".  No " + mojoResult
+                + " will be generated.";
         }
-        return true;
+        return null;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java b/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
index ae32330..ef947ad 100644
--- a/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
+++ b/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
@@ -19,6 +19,13 @@
  * under the License.
  */
 
+import java.net.MalformedURLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
 import org.apache.maven.plugin.changes.AbstractChangesReport;
 import org.apache.maven.plugin.changes.ProjectUtils;
 import org.apache.maven.plugin.issues.Issue;
@@ -30,13 +37,6 @@
 import org.apache.maven.reporting.MavenReportException;
 import org.apache.maven.settings.Settings;
 
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
 /**
  * Goal which downloads issues from GitHub and generates a report.
  *
@@ -151,7 +151,12 @@
             getLog().info( "Skipping the GitHub Report in this project because it's not the Execution Root" );
             return false;
         }
-        return ProjectUtils.validateIfIssueManagementComplete( project, "GitHub", "GitHub Report", getLog() );
+        String message = ProjectUtils.validateIssueManagement( project, "GitHub", "GitHub Report" );
+        if ( message != null )
+        {
+            getLog().warn( message );
+        }
+        return message == null;
     }
 
     @Override
diff --git a/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java b/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
index 09ddcaf..4b02740 100644
--- a/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
+++ b/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
@@ -19,6 +19,13 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.plugin.changes.AbstractChangesReport;
 import org.apache.maven.plugin.changes.ProjectUtils;
@@ -31,13 +38,6 @@
 import org.apache.maven.reporting.MavenReportException;
 import org.apache.maven.settings.Settings;
 
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
 /**
  * Goal which downloads issues from the Issue Tracking System and generates a report.
  *
@@ -308,7 +308,12 @@
         {
             return true;
         }
-        return ProjectUtils.validateIfIssueManagementComplete( project, "JIRA", "JIRA Report", getLog() );
+        String message = ProjectUtils.validateIssueManagement( project, "JIRA", "JIRA Report" );
+        if ( message != null )
+        {
+            getLog().warn( message );
+        }
+        return message == null;
     }
 
     public void executeReport( Locale locale )
diff --git a/src/main/java/org/apache/maven/plugin/trac/TracMojo.java b/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
index 8a93fb5..2813a71 100644
--- a/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
+++ b/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
@@ -135,7 +135,12 @@
             getLog().info( "Skipping the Trac Report in this project because it's not the Execution Root" );
             return false;
         }
-        return ProjectUtils.validateIfIssueManagementComplete( project, "Trac", "Trac Report", getLog() );
+        String message = ProjectUtils.validateIssueManagement( project, "Trac", "Trac Report" );
+        if ( message != null )
+        {
+            getLog().warn( message );
+        }
+        return message == null;
     }
 
     public void executeReport( Locale locale )