Package io.contextmap
Class ContextMapScannerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.contextmap.ContextMapScannerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="scan",
defaultPhase=GENERATE_RESOURCES,
requiresDependencyResolution=RUNTIME_PLUS_SYSTEM)
public class ContextMapScannerMojo
extends org.apache.maven.plugin.AbstractMojo
Usage: mvn contextmap:scan
Add to pom:
<build>
<plugins>
<plugin>
<groupId>io.contextmap</groupId>
<artifactId>java-spring-compiletime</artifactId>
<version>...</version>
</plugin>
</plugins>
</build>
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()static booleanisRootOfModules(org.apache.maven.project.MavenProject mavenProject) We are not using executionRoot, just to avoid errors when someone accidentally scans from a child module instead of from the root.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
ContextMapScannerMojo
public ContextMapScannerMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isRootOfModules
public static boolean isRootOfModules(org.apache.maven.project.MavenProject mavenProject) We are not using executionRoot, just to avoid errors when someone accidentally scans from a child module instead of from the root. Instead we check whether the parent project knows the current child project. If so then it is not the root, if the parent does not know the child, then the current child is the root :-)
-