[
https://issues.apache.org/jira/browse/MCHANGELOG-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906467#comment-17906467
]
ASF GitHub Bot commented on MCHANGELOG-119:
-------------------------------------------
elharo commented on code in PR #21:
URL:
https://github.com/apache/maven-changelog-plugin/pull/21#discussion_r1888886301
##########
pom.xml:
##########
@@ -371,7 +371,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
- <version>2.2</version>
+ <version>3.0.0-SNAPSHOT</version>
Review Comment:
Not sure if we're ready to change the version or not
##########
src/main/java/org/apache/maven/plugins/changelog/ChangeLogReport.java:
##########
@@ -1218,9 +1224,13 @@ private void doChangedSetDetail(ChangeSet entry, Sink
sink) {
sink.tableCell_();
sink.tableCell();
- // doRevision( entry.getFiles(), bundle, sink );
- doChangedFiles(entry.getFiles(), sink);
- sink.lineBreak();
+
+ if (displayFileAndRevInfo) {
+ // doRevision( entry.getFiles(), bundle, sink );
Review Comment:
delete commented code
##########
src/test/plugin-configs/changelog/display-file-and-rev-info-explicitly-plugin-config.xml:
##########
@@ -0,0 +1,44 @@
+<!--
+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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-changelog-plugin</artifactId>
+ <configuration>
+ <displayFileAndRevInfo>true</displayFileAndRevInfo>
+ <type>range</type>
+ <range>-1</range>
+ <dateFormat>yyyy-MM-dd</dateFormat>
+ <basedir>${basedir}/src/main/java</basedir>
+
<outputXML>${basedir}/src/test/changelog-xml/min-changelog.xml</outputXML>
+ <outputXMLExpiration>60</outputXMLExpiration>
+ <outputEncoding>ISO-8859-1</outputEncoding>
Review Comment:
why not UTF-8?
##########
src/test/plugin-configs/changelog/dont-display-file-and-rev-info-plugin-config.xml:
##########
@@ -0,0 +1,44 @@
+<!--
+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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-changelog-plugin</artifactId>
+ <configuration>
+ <displayFileAndRevInfo>false</displayFileAndRevInfo>
+ <type>range</type>
+ <range>-1</range>
+ <dateFormat>yyyy-MM-dd</dateFormat>
+ <basedir>${basedir}/src/main/java</basedir>
+
<outputXML>${basedir}/src/test/changelog-xml/min-changelog.xml</outputXML>
+ <outputXMLExpiration>60</outputXMLExpiration>
+ <outputEncoding>ISO-8859-1</outputEncoding>
Review Comment:
UTF-8?
##########
src/main/java/org/apache/maven/plugins/changelog/ChangeLogReport.java:
##########
@@ -283,6 +283,12 @@ public class ChangeLogReport extends AbstractMavenReport {
@Parameter(defaultValue = "connection", required = true)
private String connectionType;
+ /**
+ * If true, file and file revision information is displayed for each SCM
entry.
+ */
+ @Parameter(property = "displayFileAndRevInfo", defaultValue = "true")
+ private boolean displayFileAndRevInfo = true;
Review Comment:
perhaps false by default? What's the current behavior?
> Add option to disable displaying file and file revision information on report
> -----------------------------------------------------------------------------
>
> Key: MCHANGELOG-119
> URL: https://issues.apache.org/jira/browse/MCHANGELOG-119
> Project: Maven Changelog Plugin
> Issue Type: New Feature
> Affects Versions: 2.2
> Reporter: Ivan Mrva
> Priority: Major
> Attachments: changelog-disable-file-and-rev-info.diff,
> sample-report-with-disabled-file-and-rev-info.png
>
>
> Sometimes, it is better to not display all the information on the HTML
> report, such as file and file revision information, which makes the report
> unnecessarily long and less readable. For example, in our company, we would
> like to use this report as a changelog not only for developers, but also for
> testers, etc., who really don't care about concrete changed files and their
> revisions.
> This feature is especially useful, if used in connection with feature
> described in MCHANGELOG-118.
> I am submitting a very simple patch that implements this feature by providing
> one new configuration parameter:
> * *displayFileAndRevInfo* - If true, file and file revision information is
> displayed for each SCM entry.
> ** default value: true - so current behavior of report generation will not be
> changed, unless explicitly specified in configuration
> Patch also contains integration tests that test if report is created, if this
> param is used.
> Example report without file and file revision information is displayed on
> attached screenshot.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)