Author: gboue
Date: Sun Oct 16 13:54:35 2016
New Revision: 1765156

URL: http://svn.apache.org/viewvc?rev=1765156&view=rev
Log:
[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.

Added:
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml
   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/
    
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/
    
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/
    
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/
    
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
   (with props)
    
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy
   (with props)
Modified:
    
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
    
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
    
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
    
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
    
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties
 Sun Oct 16 13:54:35 2016
@@ -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

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml
 Sun Oct 16 13:54:35 2016
@@ -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>

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
 Sun Oct 16 13:54:35 2016
@@ -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="zl...@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="j...@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="j...@doe.com"/>
+      </action>
+      <action dev="him" type="update">
+        Updated dependencies.
+        <dueto name="John Doe" email="j...@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="oth...@users.com">
+        Uploaded documentation on how to use the plugin.
+        <fixes issue="MCHANGES-88"/>
+        <fixes issue="JIRA-YYY"/>
+        <dueto name="John Doe" email="j...@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+  </body>
+</document>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-inconsistent-issue-management/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties
 Sun Oct 16 13:54:35 2016
@@ -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

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml
 Sun Oct 16 13:54:35 2016
@@ -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>

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml
 Sun Oct 16 13:54:35 2016
@@ -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="zl...@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="j...@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="j...@doe.com"/>
+      </action>
+      <action dev="him" type="update">
+        Updated dependencies.
+        <dueto name="John Doe" email="j...@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="oth...@users.com">
+        Uploaded documentation on how to use the plugin.
+        <fixes issue="MCHANGES-88"/>
+        <fixes issue="JIRA-YYY"/>
+        <dueto name="John Doe" email="j...@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+  </body>
+</document>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-issue-management/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties
 Sun Oct 16 13:54:35 2016
@@ -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

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml
 Sun Oct 16 13:54:35 2016
@@ -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>

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml
 Sun Oct 16 13:54:35 2016
@@ -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="zl...@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="j...@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="j...@doe.com"/>
+      </action>
+      <action dev="him" type="update">
+        Updated dependencies.
+        <dueto name="John Doe" email="j...@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="oth...@users.com">
+        Uploaded documentation on how to use the plugin.
+        <fixes issue="MCHANGES-88"/>
+        <fixes issue="JIRA-YYY"/>
+        <dueto name="John Doe" email="j...@doe.com"/>
+        <dueto name="Jane Doe"/>
+      </action>
+    </release>
+  </body>
+</document>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate-no-url/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml
 Sun Oct 16 13:54:35 2016
@@ -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>

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
 Sun Oct 16 13:54:35 2016
@@ -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="zl...@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="us...@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>

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/src/changes/changes.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy?rev=1765156&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy
 (added)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy
 Sun Oct 16 13:54:35 2016
@@ -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

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-changes-plugin/src/it/report-jira-invalid-issuemanagement/verify.groovy
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java?rev=1765156&r1=1765155&r2=1765156&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
 Sun Oct 16 13:54:35 2016
@@ -19,6 +19,15 @@ package org.apache.maven.plugin.announce
  * 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.ReaderFa
 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 @@ public class AnnouncementMojo
 
             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 @@ public class AnnouncementMojo
                 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 @@ public class AnnouncementMojo
                 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 @@ public class AnnouncementMojo
                 else
                 {
                     throw new MojoExecutionException( "Something is wrong with 
the Issue Management section. "
-                        + "See previous error messages." );
+                                    + message );
                 }
             }
 

Modified: 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java?rev=1765156&r1=1765155&r2=1765156&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
 (original)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
 Sun Oct 16 13:54:35 2016
@@ -19,7 +19,6 @@ package org.apache.maven.plugin.changes;
  * under the License.
  */
 
-import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.project.MavenProject;
 
 /**
@@ -29,42 +28,40 @@ import org.apache.maven.project.MavenPro
  * @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;
     }
 }

Modified: 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java?rev=1765156&r1=1765155&r2=1765156&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
 Sun Oct 16 13:54:35 2016
@@ -19,6 +19,13 @@ package org.apache.maven.plugin.github;
  * 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.plugins.annotati
 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 @@ public class GitHubMojo
             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

Modified: 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java?rev=1765156&r1=1765155&r2=1765156&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
 Sun Oct 16 13:54:35 2016
@@ -19,6 +19,13 @@ package org.apache.maven.plugin.jira;
  * 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.plugins.annotati
 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 @@ public class JiraMojo
         {
             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 )

Modified: 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java?rev=1765156&r1=1765155&r2=1765156&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
 Sun Oct 16 13:54:35 2016
@@ -135,7 +135,12 @@ public class TracMojo
             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 )


Reply via email to