Package org.mule.maven.client.api.model
Interface MavenConfiguration
public interface MavenConfiguration
Configuration settings for a
MavenClient.- Since:
- 1.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGets the identifiers of those profiles that should be activated by explicit demand.booleanbooleanbooleanGets the identifiers of those profiles that should be deactivated by explicit demand.booleanGets the user properties to use for interpolation and profile activation.
-
Method Details
-
getLocalMavenRepositoryLocation
File getLocalMavenRepositoryLocation()- Returns:
Filewith the location of the local maven repository. It has precedence over the MavensettingslocalRepository.
-
getMavenRemoteRepositories
List<RemoteRepository> getMavenRemoteRepositories()- Returns:
- a list of remote repository to lookup for artifacts. May be empty. It has precedence over the Maven
settingsremoteRepositories. If a remote repository is defined within authentication the authentication credentials from this remote repository will be considered and ignored the ones (if any) on Mavensettingsfile. On the other hand if the remote repository does not define authentication credentials and Mavensettingshas aserverentry with authentication for the same repository id, the one fromsettingsfile will be considered. If a Mavensettingsfile is defined with proxies and mirrors for repositories those will also be applied to the remote repositories declared here. This will allow to use proxy even with default repositories declared programatically.
-
getUserSettingsLocation
- Returns:
- the user settings.xml file location. Any server settings defined on settings will override the authentication defined
for an explicit remote repository declared as {
getMavenRemoteRepositories()}.
-
getGlobalSettingsLocation
- Returns:
- the global settings.xml file location. Any server settings defined on settings will override the authentication
defined for an explicit remote repository declared as {
getMavenRemoteRepositories()}.
-
getSettingsSecurityLocation
- Returns:
- the global
secure-settings.xmlfile location to decrypt the password for severs defined on settings.xml.
-
getForcePolicyUpdateNever
boolean getForcePolicyUpdateNever()- Returns:
- if set to
trueit will set a global update policy for remote repositories to UPDATE_POLICY_NEVER. By default it is set tofalse. This is the equivalent to-nsuoption for Maven CLI.
-
getForcePolicyUpdateAlways
boolean getForcePolicyUpdateAlways()- Returns:
- if set to
trueit will set a global update policy for remote repositories to UPDATE_POLICY_ALWAYS. By default it is set tofalse. This is the equivalent to-Uoption for Maven CLI.
-
getGlobalChecksumPolicy
String getGlobalChecksumPolicy()- Returns:
- a global checksum policy to be applied to all the remote repositories. If not set, checksum policy declared on each repository will be taken into account.
- See Also:
-
getIgnoreArtifactDescriptorRepositories
boolean getIgnoreArtifactDescriptorRepositories()- Returns:
trueto ignore additional repositories from artifact descriptors,falseto merge those with the originally specified remote repositories. Default value istrue.
-
getOfflineMode
boolean getOfflineMode()- Returns:
- true if resolution should work in off line mode, meaning that no remote repositories would be accessed and only local repository.
-
getActiveProfiles
Gets the identifiers of those profiles that should be activated by explicit demand.- Returns:
- The identifiers of those profiles to activate, never
null.
-
getInactiveProfiles
Gets the identifiers of those profiles that should be deactivated by explicit demand.- Returns:
- The identifiers of those profiles to deactivate, never
null.
-
getUserProperties
Optional<Properties> getUserProperties()Gets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion.- Returns:
- The user properties, never
null.
-
newMavenConfigurationBuilder
- Returns:
- a
MavenConfiguration.MavenConfigurationBuilderto build aMavenConfiguration.
-