Package com.vaadin.flow.plugin.maven
Class FrontendScannerConfig
java.lang.Object
com.vaadin.flow.plugin.maven.FrontendScannerConfig
Configuration class for filtering Maven artifacts to be scanned by the
plugin. This class allows enabling or disabling the scanner and defining
inclusion and exclusion rules.
Exclusions have higher priority and are checked first. If an artifact matches an exclusion rule, it is not scanned. If no exclusion rule applies, inclusion rules are evaluated. If the artifact doesn't even match the inclusion rule, it is not scanned.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a pattern-based matcher for Maven artifacts. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty configuration, accepting all artifacts. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExclude(FrontendScannerConfig.ArtifactMatcher artifactMatcher) Adds an artifact matcher to the exclude list.voidaddInclude(FrontendScannerConfig.ArtifactMatcher artifactMatcher) Adds an artifact matcher to the include list.Gets the list of artifact matchers specifying which artifacts should be excluded from the scan.Gets the ist of artifact matchers specifying which artifacts should be included in the scan.booleanIndicates whether the frontend scanning filtering is enabled.booleanDetermines if the output directory should be included in the scan.voidsetEnabled(boolean enabled) Sets whether the frontend scanner is enabled or not.voidsetIncludeOutputDirectory(boolean includeOutputDirectory) Sets if the output directory should be included in the scan.toString()
-
Constructor Details
-
FrontendScannerConfig
public FrontendScannerConfig()Creates a new empty configuration, accepting all artifacts.
-
-
Method Details
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the frontend scanner is enabled or not.- Parameters:
enabled-trueto enable frontend scan filtering, otherwisefalse.
-
isEnabled
public boolean isEnabled()Indicates whether the frontend scanning filtering is enabled. Default istrue.- Returns:
trueif frontend scanning filtering is enabled, otherwisefalse.
-
setIncludeOutputDirectory
public void setIncludeOutputDirectory(boolean includeOutputDirectory) Sets if the output directory should be included in the scan.Can be turned on to make scanning faster if the maven module itself does not have classes referencing frontend resources or Vaadin components or add-ons.
- Parameters:
includeOutputDirectory-trueto scan output directory, otherwisefalse.
-
isIncludeOutputDirectory
public boolean isIncludeOutputDirectory()Determines if the output directory should be included in the scan. Default istrue.- Returns:
trueif output directory should be included in the scan, otherwisefalse.
-
getExcludes
Gets the list of artifact matchers specifying which artifacts should be excluded from the scan.- Returns:
- the list of artifact exclusions.
-
addExclude
Adds an artifact matcher to the exclude list.- Parameters:
artifactMatcher- the artifact matcher to be excluded, not null.
-
getIncludes
Gets the ist of artifact matchers specifying which artifacts should be included in the scan.- Returns:
- the list of artifact inclusions.
-
addInclude
Adds an artifact matcher to the include list.- Parameters:
artifactMatcher- the artifact matcher to be included, not null.
-
toString
-