feat(create-mvn-plugin): added docs to mvn plugin
This commit is contained in:
parent
3f4c712257
commit
3c50c07181
|
@ -13,16 +13,26 @@
|
||||||
<name>counter-maven-plugin Maven Mojo</name>
|
<name>counter-maven-plugin Maven Mojo</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
<!--<licenses>
|
<organization>
|
||||||
<license>
|
<name>Software Ingenieur Begerad</name>
|
||||||
<name>GNU General Public License</name>
|
<url>https://www.swingbe.de/</url>
|
||||||
<url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
|
</organization>
|
||||||
</license>
|
|
||||||
</licenses>-->
|
|
||||||
|
|
||||||
<scm>
|
<reporting>
|
||||||
<!--<url>https://github.com/Software-Ingenieur-Begerad/sandbox-java</url>-->
|
<plugins>
|
||||||
</scm>
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>report</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
@ -51,12 +61,22 @@
|
||||||
<artifactId>maven-project</artifactId>
|
<artifactId>maven-project</artifactId>
|
||||||
<version>2.2.1</version>
|
<version>2.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>3.6.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>3.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -15,16 +15,11 @@ import java.util.List;
|
||||||
public class DependencyCounterMojo extends AbstractMojo {
|
public class DependencyCounterMojo extends AbstractMojo {
|
||||||
|
|
||||||
@Parameter(defaultValue = "${project}", required = true, readonly = true)
|
@Parameter(defaultValue = "${project}", required = true, readonly = true)
|
||||||
|
|
||||||
MavenProject project;
|
MavenProject project;
|
||||||
|
|
||||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||||
|
|
||||||
List<Dependency> dependencies = project.getDependencies();
|
List<Dependency> dependencies = project.getDependencies();
|
||||||
|
|
||||||
long numDependencies = dependencies.stream().count();
|
long numDependencies = dependencies.stream().count();
|
||||||
|
|
||||||
getLog().info("Number of dependencies: " + numDependencies);
|
getLog().info("Number of dependencies: " + numDependencies);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue