Skip to content

Commit 4d8a9cf

Browse files
committed
[MJAVADOC-801] Upgrade to Clirr Maven Plugin 2.8 in fix goals
This closes #296
1 parent 7e5dea4 commit 4d8a9cf

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

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

Lines changed: 5 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> *
@@ -228,7 +227,7 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo {
228227

229228
/**
230229
* Version to compare the current code against using the
231-
* <a href="http://mojo.codehaus.org/clirr-maven-plugin/">Clirr Maven Plugin</a>.
230+
* <a href="https://www.mojohaus.org/clirr-maven-plugin/">Clirr Maven Plugin</a>.
232231
* <br/>
233232
* See <a href="#defaultSince">defaultSince</a>.
234233
*/
@@ -632,17 +631,13 @@ private void executeClirr() throws MavenInvocationException {
632631

633632
String clirrGoal = getFullClirrGoal();
634633

635-
// http://mojo.codehaus.org/clirr-maven-plugin/check-mojo.html
634+
// https://www.mojohaus.org/clirr-maven-plugin/check-mojo.html
636635
File clirrTextOutputFile = FileUtils.createTempFile(
637636
"clirr", ".txt", new File(project.getBuild().getDirectory()));
638637
Properties properties = new Properties();
639638
properties.put("textOutputFile", clirrTextOutputFile.getAbsolutePath());
640639
properties.put("comparisonVersion", comparisonVersion);
641640
properties.put("failOnError", "false");
642-
if (JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("8")) {
643-
// ensure that Java7 picks up TLSv1.2 when connecting with Central
644-
properties.put("https.protocols", "TLSv1.2");
645-
}
646641

647642
File invokerDir = new File(project.getBuild().getDirectory(), "invoker");
648643
invokerDir.mkdirs();
@@ -724,7 +719,7 @@ private void parseClirrTextOutputFile(File clirrTextOutputFile) throws IOExcepti
724719
continue;
725720
}
726721

727-
// http://clirr.sourceforge.net/clirr-core/exegesis.html
722+
// https://clirr.sourceforge.net/clirr-core/exegesis.html
728723
// 7011 - Method Added
729724
// 7012 - Method Added to Interface
730725
// 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)