Package org.apache.maven.buildcache.xml
Interface CacheConfig
- All Known Implementing Classes:
CacheConfigImpl
public interface CacheConfig
A java interface to the information configured in the maven-build-cache-config.xml file
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleancanIgnore(org.apache.maven.plugin.MojoExecution mojoExecution) getEffectivePomExcludeProperties(org.apache.maven.model.Plugin plugin) getExecutionDirScanConfig(org.apache.maven.model.Plugin plugin, org.apache.maven.model.PluginExecution exec) getId()getLoggedProperties(org.apache.maven.plugin.MojoExecution mojoExecution) intgetNologProperties(org.apache.maven.plugin.MojoExecution mojoExecution) getPluginDirScanConfig(org.apache.maven.model.Plugin plugin) getTrackedProperties(org.apache.maven.plugin.MojoExecution mojoExecution) getUrl()booleanbooleanFlag to cache compile phase outputs (classes, test-classes, generated sources).booleanWhether to cache goals run straight from the command line (e.g.booleanbooleanbooleanisForcedExecution(org.apache.maven.plugin.MojoExecution execution) booleanArtifacts restore policy.booleanisLogAllProperties(org.apache.maven.plugin.MojoExecution mojoExecution) booleanFlag to save in cache only if a build went through the clean lifecyclebooleanisPluginDependenciesExcluded(org.apache.maven.model.Plugin plugin) booleandefault booleanbooleanbooleanWhether a forked lifecycle may reuse cached results.booleanFlag to restore (default) or not generated sources as it might be desired to disable it in continuous integration scenariosbooleanFlag to restore (default) or not generated artifactsbooleanbooleanbooleanbooleanFlag to disable cache saving
-
Method Details
-
initialize
-
getTrackedProperties
@Nonnull List<TrackedProperty> getTrackedProperties(org.apache.maven.plugin.MojoExecution mojoExecution) -
isLogAllProperties
boolean isLogAllProperties(org.apache.maven.plugin.MojoExecution mojoExecution) -
getLoggedProperties
@Nonnull List<PropertyName> getLoggedProperties(org.apache.maven.plugin.MojoExecution mojoExecution) -
getNologProperties
-
getEffectivePomExcludeProperties
-
isPluginDependenciesExcluded
boolean isPluginDependenciesExcluded(org.apache.maven.model.Plugin plugin) -
getMultiModule
-
isProcessPlugins
String isProcessPlugins() -
getDefaultGlob
String getDefaultGlob() -
getGlobalIncludePaths
-
getGlobalExcludePaths
-
getPluginDirScanConfig
-
getExecutionDirScanConfig
@Nonnull PluginScanConfig getExecutionDirScanConfig(org.apache.maven.model.Plugin plugin, org.apache.maven.model.PluginExecution exec) -
getHashFactory
-
isForcedExecution
boolean isForcedExecution(org.apache.maven.plugin.MojoExecution execution) -
getId
String getId() -
getUrl
String getUrl() -
getTransport
String getTransport() -
isEnabled
boolean isEnabled() -
isRemoteCacheEnabled
boolean isRemoteCacheEnabled() -
isSaveToRemote
boolean isSaveToRemote() -
isSaveToRemoteFinal
boolean isSaveToRemoteFinal() -
isSkipCache
boolean isSkipCache() -
isFailFast
boolean isFailFast() -
getMaxLocalBuildsCached
int getMaxLocalBuildsCached() -
getLocalRepositoryLocation
String getLocalRepositoryLocation() -
getAttachedOutputs
-
isPreservePermissions
boolean isPreservePermissions() -
isPreserveTimestamps
default boolean isPreserveTimestamps() -
adjustMetaInfVersion
boolean adjustMetaInfVersion() -
calculateProjectVersionChecksum
boolean calculateProjectVersionChecksum() -
canIgnore
boolean canIgnore(org.apache.maven.plugin.MojoExecution mojoExecution) -
getExcludePatterns
-
isBaselineDiffEnabled
boolean isBaselineDiffEnabled() -
getBaselineCacheUrl
String getBaselineCacheUrl() -
isLazyRestore
boolean isLazyRestore()Artifacts restore policy. Eager policy (default) resolves all cached artifacts before restoring project and allows safe to fallback ro normal execution in case of restore failure. Lazy policy restores artifacts on demand minimizing need for downloading any artifacts from cacheUse: -Dmaven.build.cache.lazyRestore=(true|false)
-
isRestoreGeneratedSources
boolean isRestoreGeneratedSources()Flag to restore (default) or not generated sources as it might be desired to disable it in continuous integration scenarios -
isRestoreOnDiskArtifacts
boolean isRestoreOnDiskArtifacts()Flag to restore (default) or not generated artifacts -
getAlwaysRunPlugins
String getAlwaysRunPlugins() -
isSkipSave
boolean isSkipSave()Flag to disable cache saving -
isMandatoryClean
boolean isMandatoryClean()Flag to save in cache only if a build went through the clean lifecycle -
isCacheCompile
boolean isCacheCompile()Flag to cache compile phase outputs (classes, test-classes, generated sources). When enabled (default), compile-only builds create cache entries that can be restored by subsequent builds. When disabled, caching only occurs during package phase or later.Use: -Dmaven.build.cache.cacheCompile=(true|false)
Default: true
-
isCacheSingleGoal
boolean isCacheSingleGoal()Whether to cache goals run straight from the command line (e.g.mvn compiler:compile). When on (the default), a goal whose default phase is a real phase after clean is cached just like running that phase. Goals with no default phase (jetty:run,exec:java) and mixed phase+goal invocations are left alone and simply run.Use: -Dmaven.build.cache.cacheSingleGoal=(true|false)
Default: true
-
isRestoreForkedExecutions
boolean isRestoreForkedExecutions()Whether a forked lifecycle may reuse cached results. Some goals run a lifecycle before themselves via@Execute(phase=...)— for examplejetty:runforkstest-compile. When on (the default), that fork can restore cached output instead of rebuilding it; the fork never saves anything itself. Works only with the singlethreaded/multithreaded builders (the concurrent builder doesn't fire the forked-project events this relies on).Use: -Dmaven.build.cache.restoreForkedExecutions=(true|false)
Default: true
-