Package com.atlassian.bamboo.maven.utils
Class MavenHelper
- java.lang.Object
-
- com.atlassian.bamboo.maven.utils.MavenHelper
-
public class MavenHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAVEN_EXT_CLASS_PATH
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull List<String>
addPropertyToCommand(@NotNull List<String> command, @NotNull String key, @NotNull String value)
static com.google.common.base.Predicate<org.apache.maven.artifact.Artifact>
artifactIsSnapshot()
static org.codehaus.plexus.PlexusContainer
buildPlexusContainer(@NotNull MavenConfiguration configuration)
static org.apache.maven.execution.MavenExecutionRequest
createMavenRequest(@NotNull org.codehaus.plexus.PlexusContainer plexusContainer, @NotNull MavenConfiguration configuration)
static @Nullable File
getArtifact(String groupId, String artifactId, String version, String type, boolean offlineMode)
static @Nullable File
getArtifact(String groupId, String artifactId, String version, String type, String classifier, boolean offlineMode)
static org.apache.maven.artifact.repository.ArtifactRepository
getLocalRepository(@NotNull org.codehaus.plexus.PlexusContainer plexusContainer, @NotNull MavenConfiguration configuration)
static org.apache.maven.settings.Settings
getSettings(@NotNull org.codehaus.plexus.PlexusContainer plexusContainer, @NotNull MavenConfiguration configuration)
-
-
-
Field Detail
-
MAVEN_EXT_CLASS_PATH
public static final String MAVEN_EXT_CLASS_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
artifactIsSnapshot
public static com.google.common.base.Predicate<org.apache.maven.artifact.Artifact> artifactIsSnapshot()
-
addPropertyToCommand
@NotNull public static @NotNull List<String> addPropertyToCommand(@NotNull @NotNull List<String> command, @NotNull @NotNull String key, @NotNull @NotNull String value)
-
buildPlexusContainer
public static org.codehaus.plexus.PlexusContainer buildPlexusContainer(@NotNull @NotNull MavenConfiguration configuration) throws MalformedURLException, org.codehaus.plexus.classworlds.realm.DuplicateRealmException, org.codehaus.plexus.PlexusContainerException
- Throws:
MalformedURLException
org.codehaus.plexus.classworlds.realm.DuplicateRealmException
org.codehaus.plexus.PlexusContainerException
-
getArtifact
@Nullable public static @Nullable File getArtifact(String groupId, String artifactId, String version, String type, boolean offlineMode) throws MalformedURLException, org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.execution.MavenExecutionRequestPopulationException, org.apache.maven.settings.building.SettingsBuildingException, org.codehaus.plexus.PlexusContainerException, org.codehaus.plexus.classworlds.realm.DuplicateRealmException, org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
MalformedURLException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.execution.MavenExecutionRequestPopulationException
org.apache.maven.settings.building.SettingsBuildingException
org.codehaus.plexus.PlexusContainerException
org.codehaus.plexus.classworlds.realm.DuplicateRealmException
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getArtifact
@Nullable public static @Nullable File getArtifact(String groupId, String artifactId, String version, String type, String classifier, boolean offlineMode) throws MalformedURLException, org.codehaus.plexus.PlexusContainerException, org.codehaus.plexus.classworlds.realm.DuplicateRealmException, org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.execution.MavenExecutionRequestPopulationException, org.apache.maven.settings.building.SettingsBuildingException, org.apache.maven.artifact.resolver.ArtifactResolutionException
- Throws:
MalformedURLException
org.codehaus.plexus.PlexusContainerException
org.codehaus.plexus.classworlds.realm.DuplicateRealmException
org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.apache.maven.execution.MavenExecutionRequestPopulationException
org.apache.maven.settings.building.SettingsBuildingException
org.apache.maven.artifact.resolver.ArtifactResolutionException
-
getLocalRepository
public static org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository(@NotNull @NotNull org.codehaus.plexus.PlexusContainer plexusContainer, @NotNull @NotNull MavenConfiguration configuration) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.settings.building.SettingsBuildingException, org.apache.maven.artifact.InvalidRepositoryException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.apache.maven.settings.building.SettingsBuildingException
org.apache.maven.artifact.InvalidRepositoryException
-
createMavenRequest
public static org.apache.maven.execution.MavenExecutionRequest createMavenRequest(@NotNull @NotNull org.codehaus.plexus.PlexusContainer plexusContainer, @NotNull @NotNull MavenConfiguration configuration) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.artifact.InvalidRepositoryException, org.apache.maven.execution.MavenExecutionRequestPopulationException, org.apache.maven.settings.building.SettingsBuildingException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.apache.maven.artifact.InvalidRepositoryException
org.apache.maven.execution.MavenExecutionRequestPopulationException
org.apache.maven.settings.building.SettingsBuildingException
-
getSettings
public static org.apache.maven.settings.Settings getSettings(@NotNull @NotNull org.codehaus.plexus.PlexusContainer plexusContainer, @NotNull @NotNull MavenConfiguration configuration) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.settings.building.SettingsBuildingException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.apache.maven.settings.building.SettingsBuildingException
-
-