Skip to content

Commit 2a72bd0

Browse files
Cleanups code and dependencies
Apply hints from dependencies:analyze
1 parent 0e65561 commit 2a72bd0

File tree

4 files changed

+51
-21
lines changed

4 files changed

+51
-21
lines changed

pom.xml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
<!-- override plugins -->
102102
<taglist-maven-plugin.version>${project.version}</taglist-maven-plugin.version>
103103
</properties>
104+
104105
<dependencyManagement>
105106
<dependencies>
106107
<dependency>
@@ -156,6 +157,16 @@
156157
<groupId>org.apache.maven.reporting</groupId>
157158
<artifactId>maven-reporting-impl</artifactId>
158159
<version>3.1.0</version>
160+
<exclusions>
161+
<exclusion>
162+
<groupId>org.apache.maven</groupId>
163+
<artifactId>maven-core</artifactId>
164+
</exclusion>
165+
<exclusion>
166+
<groupId>org.apache.maven</groupId>
167+
<artifactId>maven-plugin-api</artifactId>
168+
</exclusion>
169+
</exclusions>
159170
</dependency>
160171

161172
<!-- Doxia -->
@@ -164,6 +175,12 @@
164175
<artifactId>doxia-core</artifactId>
165176
<version>${doxiaVersion}</version>
166177
<scope>runtime</scope>
178+
<exclusions>
179+
<exclusion>
180+
<groupId>org.codehaus.plexus</groupId>
181+
<artifactId>plexus-container-default</artifactId>
182+
</exclusion>
183+
</exclusions>
167184
</dependency>
168185
<dependency>
169186
<groupId>org.apache.maven.doxia</groupId>
@@ -176,6 +193,27 @@
176193
<groupId>org.apache.maven.doxia</groupId>
177194
<artifactId>doxia-site-renderer</artifactId>
178195
<version>${doxia-sitetoolsVersion}</version>
196+
<exclusions>
197+
<exclusion>
198+
<groupId>org.apache.maven</groupId>
199+
<artifactId>maven-artifact</artifactId>
200+
</exclusion>
201+
<exclusion>
202+
<groupId>org.codehaus.plexus</groupId>
203+
<artifactId>plexus-container-default</artifactId>
204+
</exclusion>
205+
</exclusions>
206+
</dependency>
207+
208+
<!-- others -->
209+
<dependency>
210+
<groupId>org.apache.commons</groupId>
211+
<artifactId>commons-lang3</artifactId>
212+
<version>3.14.0</version>
213+
</dependency>
214+
<dependency>
215+
<groupId>org.codehaus.plexus</groupId>
216+
<artifactId>plexus-utils</artifactId>
179217
</dependency>
180218

181219
<!-- Test -->
@@ -201,11 +239,6 @@
201239
</exclusion>
202240
</exclusions>
203241
</dependency>
204-
<dependency>
205-
<groupId>org.eclipse.aether</groupId>
206-
<artifactId>aether-api</artifactId>
207-
<version>1.1.0</version>
208-
</dependency>
209242
<dependency>
210243
<groupId>org.slf4j</groupId>
211244
<artifactId>slf4j-simple</artifactId>
@@ -307,16 +340,6 @@
307340
<groupId>org.apache.maven.plugins</groupId>
308341
<artifactId>maven-javadoc-plugin</artifactId>
309342
</plugin>
310-
<!-- avoid recursive dep in CI build
311-
<plugin>
312-
<groupId>org.codehaus.mojo</groupId>
313-
<artifactId>findbugs-maven-plugin</artifactId>
314-
<version>1.2</version>
315-
<configuration>
316-
<threshold>Normal</threshold>
317-
</configuration>
318-
</plugin>
319-
-->
320343
<plugin>
321344
<groupId>org.codehaus.mojo</groupId>
322345
<artifactId>taglist-maven-plugin</artifactId>

src/main/java/org/codehaus/mojo/taglist/FileAnalyser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import java.util.List;
3333
import java.util.Locale;
3434

35-
import org.apache.commons.lang.StringUtils;
35+
import org.apache.commons.lang3.StringUtils;
3636
import org.apache.maven.plugin.logging.Log;
3737
import org.codehaus.mojo.taglist.beans.FileReport;
3838
import org.codehaus.mojo.taglist.beans.TagReport;

src/main/java/org/codehaus/mojo/taglist/TagListReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.apache.maven.project.MavenProject;
3939
import org.apache.maven.reporting.AbstractMavenReport;
4040
import org.apache.maven.reporting.MavenReportException;
41-
import org.apache.maven.shared.utils.io.FileUtils;
4241
import org.codehaus.mojo.taglist.beans.FileReport;
4342
import org.codehaus.mojo.taglist.beans.TagReport;
4443
import org.codehaus.mojo.taglist.options.Tag;
@@ -51,6 +50,7 @@
5150
import org.codehaus.mojo.taglist.tags.InvalidTagException;
5251
import org.codehaus.mojo.taglist.tags.TagClass;
5352
import org.codehaus.mojo.taglist.tags.TagFactory;
53+
import org.codehaus.plexus.util.FileUtils;
5454
import org.codehaus.plexus.util.PathTool;
5555
import org.codehaus.plexus.util.StringUtils;
5656

src/test/java/org/codehaus/mojo/taglist/beans/FileReportTestCase.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@
2121

2222
import java.io.File;
2323

24-
import org.codehaus.plexus.PlexusTestCase;
24+
import org.junit.jupiter.api.Test;
25+
26+
import static org.junit.jupiter.api.Assertions.assertEquals;
2527

2628
/**
2729
* Tests for file report.
2830
*
2931
* @author Dennis Lundberg
3032
*/
31-
public class FileReportTestCase extends PlexusTestCase {
32-
public void testGetClassName() {
33-
File file = new File(getBasedir() + "/src/test/resources/org/codehaus/mojo/taglist/beans/XYjavatest.java");
33+
class FileReportTestCase {
34+
35+
@Test
36+
void testGetClassName() throws Exception {
37+
38+
File file = new File(getClass()
39+
.getResource("/org/codehaus/mojo/taglist/beans/XYjavatest.java")
40+
.toURI());
3441
FileReport fileReport = new FileReport(file, "UTF-8");
3542
assertEquals("org.codehaus.mojo.taglist.beans.XYjavatest", fileReport.getClassName());
3643
}

0 commit comments

Comments
 (0)