Package com.vaadin.flow.plugin.maven
Class FrontendScannerConfig.ArtifactMatcher
java.lang.Object
com.vaadin.flow.plugin.maven.FrontendScannerConfig.ArtifactMatcher
- Enclosing class:
FrontendScannerConfig
Represents a pattern-based matcher for Maven artifacts.
Patterns can use the wildcard *, but only at the beginning or end
of the rule. Examples of valid patterns:
com.vaadin**.vaadin*.vaadin.**
com.*.vaadin-
Constructor Summary
ConstructorsConstructorDescriptionCreates an undefined instance that matches everything.ArtifactMatcher(String groupId, String artifactId) Creates a matcher for the givengroupandartifact namepatterns. -
Method Summary
Modifier and TypeMethodDescriptionGets the pattern for matching the artifact's artifact ID.Gets the pattern for matching the artifact's group ID.booleanmatches(org.apache.maven.artifact.Artifact artifact) Evaluates whether a given artifact matches the configured patterns.voidsetArtifactId(String artifactId) Sets the pattern for matching the artifact's artifact ID.voidsetGroupId(String groupId) Sets the pattern for matching the artifact's group ID.toString()
-
Constructor Details
-
ArtifactMatcher
public ArtifactMatcher()Creates an undefined instance that matches everything. -
ArtifactMatcher
Creates a matcher for the givengroupandartifact namepatterns.- Parameters:
groupId- the pattern for matching the artifact's group ID; can be null.artifactId- the pattern for matching the artifact's artifact ID; can be null.
-
-
Method Details
-
getGroupId
Gets the pattern for matching the artifact's group ID.- Returns:
- the pattern for matching the artifact's group ID; can be null.
-
setGroupId
Sets the pattern for matching the artifact's group ID.The argument must be a valid pattern as describe in the class Javadoc. null is and allowed and value, and it acts like setting
*, meaning every group ID is allowed.- Parameters:
groupId- the pattern for matching the artifact's group ID; can be null.
-
getArtifactId
Gets the pattern for matching the artifact's artifact ID.- Returns:
- the pattern for matching the artifact's artifact ID; can be null.
-
setArtifactId
Sets the pattern for matching the artifact's artifact ID.The argument must be a valid pattern as describe in the class Javadoc. null is and allowed and value, and it acts like setting
*, meaning every artifact ID is allowed.- Parameters:
artifactId- the pattern for matching the artifact's artifact ID; can be null.
-
matches
public boolean matches(org.apache.maven.artifact.Artifact artifact) Evaluates whether a given artifact matches the configured patterns.- Parameters:
artifact- the artifact to be checked.- Returns:
trueif the artifact matches the patterns,falseotherwise.
-
toString
-