Skip to content

Commit a6cff02

Browse files
committed
[MJAVADOC-801] Upgrade to Clirr Maven Plugin 2.8 in fix goals
This closes #296
1 parent 57774cf commit a6cff02

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
import org.apache.maven.settings.Settings;
8080
import org.apache.maven.shared.invoker.MavenInvocationException;
8181
import org.codehaus.plexus.components.interactivity.InputHandler;
82-
import org.codehaus.plexus.languages.java.version.JavaVersion;
8382
import org.codehaus.plexus.util.FileUtils;
8483
import org.codehaus.plexus.util.ReaderFactory;
8584
import org.codehaus.plexus.util.StringUtils;
@@ -193,9 +192,9 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo {
193192
private static final String CLIRR_MAVEN_PLUGIN_ARTIFACTID = "clirr-maven-plugin";
194193

195194
/**
196-
* The latest Clirr Maven plugin version <code>2.2.2</code> *
195+
* The latest Clirr Maven plugin version <code>2.8</code> *
197196
*/
198-
private static final String CLIRR_MAVEN_PLUGIN_VERSION = "2.2.2";
197+
private static final String CLIRR_MAVEN_PLUGIN_VERSION = "2.8";
199198

200199
/**
201200
* The Clirr Maven plugin goal <code>check</code> *
@@ -223,7 +222,7 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo {
223222

224223
/**
225224
* Version to compare the current code against using the
226-
* <a href="http://mojo.codehaus.org/clirr-maven-plugin/">Clirr Maven Plugin</a>.
225+
* <a href="https://www.mojohaus.org/clirr-maven-plugin/">Clirr Maven Plugin</a>.
227226
* <br/>
228227
* See <a href="#defaultSince">defaultSince</a>.
229228
*/
@@ -623,17 +622,14 @@ private void executeClirr() throws MavenInvocationException {
623622

624623
String clirrGoal = getFullClirrGoal();
625624

626-
// http://mojo.codehaus.org/clirr-maven-plugin/check-mojo.html
625+
// https://www.mojohaus.org/clirr-maven-plugin/check-mojo.html
627626
File clirrTextOutputFile = FileUtils.createTempFile(
628627
"clirr", ".txt", new File(project.getBuild().getDirectory()));
629628
Properties properties = new Properties();
630629
properties.put("textOutputFile", clirrTextOutputFile.getAbsolutePath());
631630
properties.put("comparisonVersion", comparisonVersion);
632631
properties.put("failOnError", "false");
633-
if (JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("8")) {
634-
// ensure that Java7 picks up TLSv1.2 when connecting with Central
635-
properties.put("https.protocols", "TLSv1.2");
636-
}
632+
properties.put("minSeverity", "info");
637633

638634
File invokerDir = new File(project.getBuild().getDirectory(), "invoker");
639635
invokerDir.mkdirs();
@@ -715,7 +711,7 @@ private void parseClirrTextOutputFile(File clirrTextOutputFile) throws IOExcepti
715711
continue;
716712
}
717713

718-
// http://clirr.sourceforge.net/clirr-core/exegesis.html
714+
// https://clirr.sourceforge.net/clirr-core/exegesis.html
719715
// 7011 - Method Added
720716
// 7012 - Method Added to Interface
721717
// 8000 - Class Added

src/site/apt/examples/fix-javadocs.apt.vm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Fixing Javadoc Comments
4949
selective tags like author, version, etc.
5050
You specify default value for some tags, for example, {{{../fix-mojo.html#defaultAuthor}\<defaultAuthor/\>}}.
5151

52-
The <javadoc:fix> goal can use Clirr ({{{http://clirr.sourceforge.net}}} via the
53-
{{{http://mojo.codehaus.org/clirr-maven-plugin/}clirr-maven-plugin}} to add
52+
The <javadoc:fix> goal can use Clirr ({{{https://clirr.sourceforge.net}}} via the
53+
{{{https://www.mojohaus.org/clirr-maven-plugin/}clirr-maven-plugin}} to add
5454
<@since> tags will be dynamically added for the current
5555
project version. You need to add the <comparisonVersion> parameter (see below).
5656

@@ -105,8 +105,8 @@ mvn javadoc:fix -DcomparisonVersion=1.0
105105

106106
** Using another Clirr version
107107

108-
By default, the <fix> and <test-fix> goals use the {{{https://www.mojohaus.org/clirr-maven-plugin}clirr-maven-plugin}},
109-
version <<<2.2.2>>>. To use another version, you need to add a dependency in the Javadoc plugin as shown here:
108+
By default, the <fix> and <test-fix> goals use the {{{https://www.mojohaus.org/clirr-maven-plugin/}clirr-maven-plugin}},
109+
version <<<2.8>>>. To use another version, you need to add a dependency in the Javadoc plugin as shown here:
110110

111111
+-----+
112112
<project>
@@ -124,7 +124,7 @@ mvn javadoc:fix -DcomparisonVersion=1.0
124124
<dependency>
125125
<groupId>org.codehaus.mojo</groupId>
126126
<artifactId>clirr-maven-plugin</artifactId>
127-
<version>2.3-SNAPSHOT</version>
127+
<version>2.9-SNAPSHOT</version>
128128
</dependency>
129129
</dependencies>
130130
</plugin>

0 commit comments

Comments
 (0)