You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2019/04/13 15:24:54 UTC
[yetus] branch master updated: YETUS-760. Update
yetus-maven-plugin's releasedocmaker options
This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/master by this push:
new bc5961a YETUS-760. Update yetus-maven-plugin's releasedocmaker options
bc5961a is described below
commit bc5961af276bbdcbf4d5775dba3f4938d7e0c9d9
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Tue Apr 9 13:40:53 2019 -0700
YETUS-760. Update yetus-maven-plugin's releasedocmaker options
Signed-off-by: Allen Wittenauer <aw...@apache.org>
---
.../documentation/in-progress/releasedocmaker.md | 4 ++
.../in-progress/yetus-maven-plugin.md | 9 ++---
.../src/main/python/releasedocmaker/__init__.py | 3 +-
.../maven/plugin/rdm/ReleaseDocMakerMojo.java | 44 +++++++++++++++++-----
4 files changed, 44 insertions(+), 16 deletions(-)
diff --git a/asf-site-src/source/documentation/in-progress/releasedocmaker.md b/asf-site-src/source/documentation/in-progress/releasedocmaker.md
index 0a26337..13b3eb0 100644
--- a/asf-site-src/source/documentation/in-progress/releasedocmaker.md
+++ b/asf-site-src/source/documentation/in-progress/releasedocmaker.md
@@ -20,6 +20,8 @@
releasedocmaker
===============
+<!-- MarkdownTOC levels="1,2" autolink="true" -->
+
* [Purpose](#purpose)
* [Requirements](#requirements)
* [Basic Usage](#basic-usage)
@@ -32,6 +34,8 @@ releasedocmaker
* [Index Mode](#index-mode)
* [Release Version](#release-version)
+<!-- /MarkdownTOC -->
+
# Purpose
Building changelog information in a form that is human digestible but still containing as much useful information is difficult. Many attempts over the years have resulted in a variety of methods that projects use to solve this problem:
diff --git a/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.md b/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.md
index 58b6920..8cfa6d9 100644
--- a/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.md
+++ b/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.md
@@ -178,8 +178,6 @@ This goal runs releasedocmaker without the need to download or build an Apache Y
</execution>
</plugin>
-
-
The configuration options generally map 1:1 to the `releasedocmaker` executable's options. Unless otherwise specified, defaults are set by the actual executable.
| Option | Description | Default |
@@ -190,14 +188,15 @@ The configuration options generally map 1:1 to the `releasedocmaker` executable'
| `incompatibleLabel` | --incompatiblelabel | |
| `index` | boolean; --index | false |
| `license` | boolean; --license | false |
-| `lint` | boolean; --lint | false |
+| `lintFilters` | ArrayList; --lint | |
| `outputDir` | --outputdir | `${project.build.directory}/generated-site/markdown` |
| `projects` | ArrayList; --projects | `${project.name}` |
| `projectTitle` | --projecttitle | |
| `range` | boolean; --range | false |
+| `retries` | integer; --retries | |
| `skipcredits` | boolean; --skipcredits | false |
-| `sortorder` | --sortorder | older |
-| `sorttype` | --sorttype | resolutiondate |
+| `sortorder` | --sortorder | |
+| `sorttype` | --sorttype | |
| `useToday` | --usetoday | false |
| `versions` | ArrayList; --versions | `${project.version}` |
diff --git a/releasedocmaker/src/main/python/releasedocmaker/__init__.py b/releasedocmaker/src/main/python/releasedocmaker/__init__.py
index 47f104c..c536b24 100755
--- a/releasedocmaker/src/main/python/releasedocmaker/__init__.py
+++ b/releasedocmaker/src/main/python/releasedocmaker/__init__.py
@@ -892,7 +892,8 @@ def main(): # pylint: disable=too-many-statements, too-many-branches, too-many-l
print(linter.message())
if linter.had_errors():
haderrors = True
- shutil.rmtree(vstr)
+ if os.path.exists(vstr):
+ shutil.rmtree(vstr)
continue
reloutputs.write_all("\n\n")
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java
index fde7a49..c1c9810 100644
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java
+++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java
@@ -15,7 +15,6 @@ package org.apache.yetus.maven.plugin.rdm;
import java.io.File;
import java.util.ArrayList;
-import org.apache.yetus.maven.plugin.utils.Utils;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
@@ -68,7 +67,7 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
private Boolean fileversions;
/**
- * label for incompatible issues
+ * label for incompatible issues.
*/
@Parameter
private String incompatibleLabel;
@@ -88,10 +87,17 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
/**
* Run in --lint mode.
*/
+ @Deprecated
@Parameter(defaultValue = "false")
private Boolean lint;
/**
+ * lint filters.
+ */
+ @Parameter
+ private String[] lintFilters;
+
+ /**
* Location of output.
*/
@Parameter(defaultValue = "${project.build.directory}/generated-site/markdown")
@@ -116,23 +122,30 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
private Boolean range;
/**
- * Drop reporter/assignee
+ * Number of times to retry the HTTPS connection.
+ */
+ @Parameter
+ private Integer retries;
+
+ /**
+ * Drop reporter/assignee.
*/
@Parameter(defaultValue = "false")
private Boolean skipcredits;
/**
- * Set the sort order
+ * Set the sort order.
*/
- @Parameter(defaultValue = "older")
+ @Parameter
private String sortorder;
/**
- * Set the type order
+ * Set the type order.
*/
- @Parameter(defaultValue = "resolutiondate")
+ @Parameter
private String sorttype;
+
/**
* Use today.
*/
@@ -159,9 +172,9 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
public void execute() throws MojoExecutionException {
buildArgs();
- String [] args = argList.toArray(new String[0]);
+ String[] args = argList.toArray(new String[0]);
- ReleaseDocMaker rdm=new ReleaseDocMaker();
+ ReleaseDocMaker rdm = new ReleaseDocMaker();
rdm.main(args);
}
@@ -171,7 +184,7 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
*/
private void buildArgs() {
- if (baseUrl != null ) {
+ if (baseUrl != null) {
argList.add("--baseurl");
argList.add(baseUrl);
}
@@ -203,6 +216,12 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
if (lint) {
argList.add("--lint");
+ argList.add("all");
+ }
+
+ for (String f: lintFilters) {
+ argList.add("--lint");
+ argList.add(f);
}
argList.add("--outputdir");
@@ -222,6 +241,11 @@ public final class ReleaseDocMakerMojo extends AbstractMojo {
argList.add("--range");
}
+ if (retries != null) {
+ argList.add("--retries");
+ argList.add(retries.toString());
+ }
+
if (skipcredits) {
argList.add("--skipcredits");
}