Package org.apache.maven.buildcache.xml
Class CacheConfigImpl
java.lang.Object
org.apache.maven.buildcache.xml.CacheConfigImpl
- All Implemented Interfaces:
CacheConfig
CacheConfigImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFlag to control if we should skip lookup for cached artifacts globally or for a particular project even if qualifying artifacts exist in build cache.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFlag to disable cache saving -
Constructor Summary
ConstructorsConstructorDescriptionCacheConfigImpl(XmlService xmlService, javax.inject.Provider<org.apache.maven.execution.MavenSession> providerSession, org.apache.maven.rtinfo.RuntimeInformation rtInfo) -
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()booleanbooleanbooleanbooleanisForcedExecution(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) booleanbooleanbooleanFlag 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
-
Field Details
-
CONFIG_PATH_PROPERTY_NAME
- See Also:
-
CACHE_ENABLED_PROPERTY_NAME
- See Also:
-
CACHE_LOCATION_PROPERTY_NAME
- See Also:
-
REMOTE_ENABLED_PROPERTY_NAME
- See Also:
-
REMOTE_URL_PROPERTY_NAME
- See Also:
-
REMOTE_SERVER_ID_PROPERTY_NAME
- See Also:
-
SAVE_TO_REMOTE_PROPERTY_NAME
- See Also:
-
SAVE_NON_OVERRIDEABLE_NAME
- See Also:
-
FAIL_FAST_PROPERTY_NAME
- See Also:
-
BASELINE_BUILD_URL_PROPERTY_NAME
- See Also:
-
LAZY_RESTORE_PROPERTY_NAME
- See Also:
-
RESTORE_ON_DISK_ARTIFACTS_PROPERTY_NAME
- See Also:
-
RESTORE_GENERATED_SOURCES_PROPERTY_NAME
- See Also:
-
ALWAYS_RUN_PLUGINS
- See Also:
-
MANDATORY_CLEAN
- See Also:
-
CACHE_SKIP
Flag to control if we should skip lookup for cached artifacts globally or for a particular project even if qualifying artifacts exist in build cache. E.g. to trigger a forced build (full or for a particular module) May be also activated via properties for projects via a profile e.g. on CI when some files produced by the build are required (e.g. smth. from target folder as additional CI build artifacts):<maven.build.cache.skipCache>true<maven.build.cache.skipCache/>- See Also:
-
SKIP_SAVE
Flag to disable cache saving- See Also:
-
-
Constructor Details
-
CacheConfigImpl
@Inject public CacheConfigImpl(XmlService xmlService, javax.inject.Provider<org.apache.maven.execution.MavenSession> providerSession, org.apache.maven.rtinfo.RuntimeInformation rtInfo)
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceCacheConfig
-
getTrackedProperties
@Nonnull public List<TrackedProperty> getTrackedProperties(org.apache.maven.plugin.MojoExecution mojoExecution) - Specified by:
getTrackedPropertiesin interfaceCacheConfig
-
isLogAllProperties
public boolean isLogAllProperties(org.apache.maven.plugin.MojoExecution mojoExecution) - Specified by:
isLogAllPropertiesin interfaceCacheConfig
-
getLoggedProperties
@Nonnull public List<PropertyName> getLoggedProperties(org.apache.maven.plugin.MojoExecution mojoExecution) - Specified by:
getLoggedPropertiesin interfaceCacheConfig
-
getNologProperties
@Nonnull public List<PropertyName> getNologProperties(org.apache.maven.plugin.MojoExecution mojoExecution) - Specified by:
getNologPropertiesin interfaceCacheConfig
-
getEffectivePomExcludeProperties
- Specified by:
getEffectivePomExcludePropertiesin interfaceCacheConfig
-
isPluginDependenciesExcluded
public boolean isPluginDependenciesExcluded(org.apache.maven.model.Plugin plugin) - Specified by:
isPluginDependenciesExcludedin interfaceCacheConfig
-
getMultiModule
- Specified by:
getMultiModulein interfaceCacheConfig
-
getPluginDirScanConfig
- Specified by:
getPluginDirScanConfigin interfaceCacheConfig
-
getExecutionDirScanConfig
@Nonnull public PluginScanConfig getExecutionDirScanConfig(org.apache.maven.model.Plugin plugin, org.apache.maven.model.PluginExecution exec) - Specified by:
getExecutionDirScanConfigin interfaceCacheConfig
-
isProcessPlugins
- Specified by:
isProcessPluginsin interfaceCacheConfig
-
getDefaultGlob
- Specified by:
getDefaultGlobin interfaceCacheConfig
-
getGlobalIncludePaths
- Specified by:
getGlobalIncludePathsin interfaceCacheConfig
-
getGlobalExcludePaths
- Specified by:
getGlobalExcludePathsin interfaceCacheConfig
-
getHashFactory
- Specified by:
getHashFactoryin interfaceCacheConfig
-
canIgnore
public boolean canIgnore(org.apache.maven.plugin.MojoExecution mojoExecution) - Specified by:
canIgnorein interfaceCacheConfig
-
isForcedExecution
public boolean isForcedExecution(org.apache.maven.plugin.MojoExecution execution) - Specified by:
isForcedExecutionin interfaceCacheConfig
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceCacheConfig
-
isRemoteCacheEnabled
public boolean isRemoteCacheEnabled()- Specified by:
isRemoteCacheEnabledin interfaceCacheConfig
-
isSaveToRemote
public boolean isSaveToRemote()- Specified by:
isSaveToRemotein interfaceCacheConfig
-
isSaveToRemoteFinal
public boolean isSaveToRemoteFinal()- Specified by:
isSaveToRemoteFinalin interfaceCacheConfig
-
isSkipCache
public boolean isSkipCache()- Specified by:
isSkipCachein interfaceCacheConfig
-
isFailFast
public boolean isFailFast()- Specified by:
isFailFastin interfaceCacheConfig
-
isBaselineDiffEnabled
public boolean isBaselineDiffEnabled()- Specified by:
isBaselineDiffEnabledin interfaceCacheConfig
-
getBaselineCacheUrl
- Specified by:
getBaselineCacheUrlin interfaceCacheConfig
-
isLazyRestore
public boolean isLazyRestore()Description copied from interface:CacheConfigArtifacts 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)
- Specified by:
isLazyRestorein interfaceCacheConfig
-
isRestoreGeneratedSources
public boolean isRestoreGeneratedSources()Description copied from interface:CacheConfigFlag to restore (default) or not generated sources as it might be desired to disable it in continuous integration scenarios- Specified by:
isRestoreGeneratedSourcesin interfaceCacheConfig
-
isRestoreOnDiskArtifacts
public boolean isRestoreOnDiskArtifacts()Description copied from interface:CacheConfigFlag to restore (default) or not generated artifacts- Specified by:
isRestoreOnDiskArtifactsin interfaceCacheConfig
-
getAlwaysRunPlugins
- Specified by:
getAlwaysRunPluginsin interfaceCacheConfig
-
isSkipSave
public boolean isSkipSave()Description copied from interface:CacheConfigFlag to disable cache saving- Specified by:
isSkipSavein interfaceCacheConfig
-
isMandatoryClean
public boolean isMandatoryClean()Description copied from interface:CacheConfigFlag to save in cache only if a build went through the clean lifecycle- Specified by:
isMandatoryCleanin interfaceCacheConfig
-
getId
- Specified by:
getIdin interfaceCacheConfig
-
getUrl
- Specified by:
getUrlin interfaceCacheConfig
-
getTransport
- Specified by:
getTransportin interfaceCacheConfig
-
getMaxLocalBuildsCached
public int getMaxLocalBuildsCached()- Specified by:
getMaxLocalBuildsCachedin interfaceCacheConfig
-
getLocalRepositoryLocation
- Specified by:
getLocalRepositoryLocationin interfaceCacheConfig
-
getAttachedOutputs
- Specified by:
getAttachedOutputsin interfaceCacheConfig
-
isPreservePermissions
public boolean isPreservePermissions()- Specified by:
isPreservePermissionsin interfaceCacheConfig
-
adjustMetaInfVersion
public boolean adjustMetaInfVersion()- Specified by:
adjustMetaInfVersionin interfaceCacheConfig
-
calculateProjectVersionChecksum
public boolean calculateProjectVersionChecksum()- Specified by:
calculateProjectVersionChecksumin interfaceCacheConfig
-
getExcludePatterns
- Specified by:
getExcludePatternsin interfaceCacheConfig
-