Skip to content

Commit

Permalink
Cleanups code and dependencies
Browse files Browse the repository at this point in the history
Apply hints from dependencies:analyze
  • Loading branch information
slawekjaranowski committed Jul 1, 2024
1 parent 0e65561 commit 2a72bd0
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 21 deletions.
53 changes: 38 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<!-- override plugins -->
<taglist-maven-plugin.version>${project.version}</taglist-maven-plugin.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -156,6 +157,16 @@
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Doxia -->
Expand All @@ -164,6 +175,12 @@
<artifactId>doxia-core</artifactId>
<version>${doxiaVersion}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
Expand All @@ -176,6 +193,27 @@
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-site-renderer</artifactId>
<version>${doxia-sitetoolsVersion}</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- others -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>

<!-- Test -->
Expand All @@ -201,11 +239,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand Down Expand Up @@ -307,16 +340,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<!-- avoid recursive dep in CI build
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<threshold>Normal</threshold>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/codehaus/mojo/taglist/FileAnalyser.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.List;
import java.util.Locale;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugin.logging.Log;
import org.codehaus.mojo.taglist.beans.FileReport;
import org.codehaus.mojo.taglist.beans.TagReport;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/codehaus/mojo/taglist/TagListReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
import org.apache.maven.reporting.MavenReportException;
import org.apache.maven.shared.utils.io.FileUtils;
import org.codehaus.mojo.taglist.beans.FileReport;
import org.codehaus.mojo.taglist.beans.TagReport;
import org.codehaus.mojo.taglist.options.Tag;
Expand All @@ -51,6 +50,7 @@
import org.codehaus.mojo.taglist.tags.InvalidTagException;
import org.codehaus.mojo.taglist.tags.TagClass;
import org.codehaus.mojo.taglist.tags.TagFactory;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.PathTool;
import org.codehaus.plexus.util.StringUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@

import java.io.File;

import org.codehaus.plexus.PlexusTestCase;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Tests for file report.
*
* @author Dennis Lundberg
*/
public class FileReportTestCase extends PlexusTestCase {
public void testGetClassName() {
File file = new File(getBasedir() + "/src/test/resources/org/codehaus/mojo/taglist/beans/XYjavatest.java");
class FileReportTestCase {

@Test
void testGetClassName() throws Exception {

File file = new File(getClass()
.getResource("/org/codehaus/mojo/taglist/beans/XYjavatest.java")
.toURI());
FileReport fileReport = new FileReport(file, "UTF-8");
assertEquals("org.codehaus.mojo.taglist.beans.XYjavatest", fileReport.getClassName());
}
Expand Down

0 comments on commit 2a72bd0

Please sign in to comment.