Class FrontendScannerConfig.ArtifactMatcher

java.lang.Object
com.vaadin.flow.plugin.maven.FrontendScannerConfig.ArtifactMatcher
Enclosing class:
FrontendScannerConfig

public static class FrontendScannerConfig.ArtifactMatcher extends Object
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.*
  • *
Invalid example: com.*.vaadin
  • Constructor Details

    • ArtifactMatcher

      public ArtifactMatcher()
      Creates an undefined instance that matches everything.
    • ArtifactMatcher

      public ArtifactMatcher(String groupId, String artifactId)
      Creates a matcher for the given group and artifact name patterns.
      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

      public String 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

      public void setGroupId(String groupId)
      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

      public String 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

      public void setArtifactId(String artifactId)
      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:
      true if the artifact matches the patterns, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object