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>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<!--<licenses>
|
||||
<license>
|
||||
<name>GNU General Public License</name>
|
||||
<url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
|
||||
</license>
|
||||
</licenses>-->
|
||||
<organization>
|
||||
<name>Software Ingenieur Begerad</name>
|
||||
<url>https://www.swingbe.de/</url>
|
||||
</organization>
|
||||
|
||||
<scm>
|
||||
<!--<url>https://github.com/Software-Ingenieur-Begerad/sandbox-java</url>-->
|
||||
</scm>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<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>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
@ -51,12 +61,22 @@
|
|||
<artifactId>maven-project</artifactId>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</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>
|
||||
|
|
|
@ -15,16 +15,11 @@ import java.util.List;
|
|||
public class DependencyCounterMojo extends AbstractMojo {
|
||||
|
||||
@Parameter(defaultValue = "${project}", required = true, readonly = true)
|
||||
|
||||
MavenProject project;
|
||||
|
||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||
|
||||
List<Dependency> dependencies = project.getDependencies();
|
||||
|
||||
long numDependencies = dependencies.stream().count();
|
||||
|
||||
getLog().info("Number of dependencies: " + numDependencies);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue