depclean-maven-plugin
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>se.kth.castor</groupId>
<artifactId>depclean-maven-plugin</artifactId>
<version>2.2.0</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- Parent -->
<parent>
<groupId>se.kth.castor</groupId>
<artifactId>depclean-parent-pom</artifactId>
<version>2.2.0</version>
</parent>
<!-- Coordinates -->
<artifactId>depclean-maven-plugin</artifactId>
<version>2.2.0</version>
<packaging>maven-plugin</packaging>
<name>depclean-maven-plugin</name>
<description>DepClean automatically removes unused dependencies in Maven projects</description>
<properties>
<!-- Dependencies -->
<gson.version>2.14.0</gson.version>
<itf-jupiter-extension.version>0.13.1</itf-jupiter-extension.version>
<maven-dependency-tree-parser.version>1.0.6</maven-dependency-tree-parser.version>
<maven-dependency-tree.version>3.3.0</maven-dependency-tree.version>
<maven-plugin-annotations.version>3.15.2</maven-plugin-annotations.version>
<plexus-xml.version>4.2.0</plexus-xml.version>
<!-- Plugins -->
<maven-failsafe-plugin.version>3.6.0</maven-failsafe-plugin.version>
<maven-plugin-plugin.version>3.15.2</maven-plugin-plugin.version>
<!-- Build settings -->
<checkstyle.config.location>../checkstyle.xml</checkstyle.config.location>
<sonar.coverage.jacoco.xmlReportPaths>
target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>
<!-- Build options -->
<dependencies>
<!-- Project module -->
<dependency>
<groupId>se.kth.castor</groupId>
<artifactId>depclean-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!--Maven
tools for plugin construction-->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-core.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven-core.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${maven-plugin-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-dependency-tree</artifactId>
<version>${maven-dependency-tree.version}</version>
</dependency>
<!-- Xpp3Dom is exported by the Maven core class realm at runtime -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<version>${plexus-xml.version}</version>
<scope>provided</scope>
</dependency>
<!-- Utils -->
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>${jspecify.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>org.whitesource</groupId>
<artifactId>maven-dependency-tree-parser</artifactId>
<version>${maven-dependency-tree-parser.version}</version>
</dependency>
<!-- Integration tests -->
<!-- see
https://khmarbaise.github.io/maven-it-extension/itf-documentation/usersguide/usersguide.html#_grouping_test_cases -->
<dependency>
<groupId>com.soebes.itf.jupiter.extension</groupId>
<artifactId>itf-extension-maven</artifactId>
<version>${itf-jupiter-extension.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.soebes.itf.jupiter.extension</groupId>
<artifactId>itf-assertj</artifactId>
<version>${itf-jupiter-extension.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.soebes.itf.jupiter.extension</groupId>
<artifactId>itf-jupiter-extension</artifactId>
<version>${itf-jupiter-extension.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<filtering>false</filtering>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<filtering>true</filtering>
<directory>src/test/resources-its</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>com.soebes.itf.jupiter.extension</groupId>
<artifactId>itf-maven-plugin</artifactId>
<version>${itf-jupiter-extension.version}</version>
<executions>
<execution>
<id>installing</id>
<goals>
<goal>install</goal>
</goals>
<phase>pre-integration-test</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
<!-- Each IT forks an isolated mvn build (own project dir, own local repo, own
target), so they are safe to run concurrently; threads mostly wait on the
forked process, hence a parallelism above the core count. -->
<properties>
<configurationParameters>
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
junit.jupiter.execution.parallel.config.strategy = fixed
junit.jupiter.execution.parallel.config.fixed.parallelism = 6
</configurationParameters>
</properties>
<!-- Instrument the Maven processes forked by the ITs with the JaCoCo agent -->
<environmentVariables>
<MAVEN_OPTS>${itCoverageAgent}</MAVEN_OPTS>
</environmentVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Collect coverage from the Maven processes forked by the integration tests -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<propertyName>itCoverageAgent</propertyName>
</configuration>
</execution>
<execution>
<id>report-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven plugin to create Maven plugins-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>depclean</goalPrefix>
<skipErrorNoDescriptorsFound>false</skipErrorNoDescriptorsFound>
<!-- The runtime floor is Java 8 (main sources emit Java 8 bytecode);
without this, the plugin-plugin derives 17 from the enforcer's
requireJavaVersion, which is only the BUILD requirement. -->
<requiredJavaVersion>${java.version}</requiredJavaVersion>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
<!-- Checkstyle-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>check for errors</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
<configuration>
<!-- Change to warning to enforce strong style rules -->
<violationSeverity>error</violationSeverity>
<failsOnError>true</failsOnError>
<!-- Google style is adopted,
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml -->
<configLocation>${checkstyle.config.location}</configLocation>
<consoleOutput>true</consoleOutput>
</configuration>
</execution>
<execution>
<id>checkstyle report</id>
<goals>
<!-- Generate a Checkstyle report -->
<goal>checkstyle</goal>
</goals>
<phase>verify</phase>
<configuration>
<failsOnError>true</failsOnError>
<!-- Google style is adopted,
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml -->
<configLocation>${checkstyle.config.location}</configLocation>
<consoleOutput>true</consoleOutput>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- When JaCoCo is skipped, prepare-agent-integration never sets itCoverageAgent;
define it as empty here so failsafe does not pass the literal expression as MAVEN_OPTS -->
<profile>
<id>jacoco-skipped</id>
<activation>
<property>
<name>jacoco.skip</name>
<value>true</value>
</property>
</activation>
<properties>
<itCoverageAgent />
</properties>
</profile>
</profiles>
</project>