com.atlassian.bamboo.maven.utils
Class MavenHelper

java.lang.Object
  extended by com.atlassian.bamboo.maven.utils.MavenHelper

public class MavenHelper
extends java.lang.Object


Field Summary
static java.lang.String MAVEN_EXT_CLASS_PATH
           
 
Method Summary
static java.util.List<java.lang.String> addPropertyToCommand(java.util.List<java.lang.String> command, java.lang.String key, java.lang.String value)
           
static com.google.common.base.Predicate<org.apache.maven.artifact.Artifact> artifactIsSnapshot()
           
static org.codehaus.plexus.PlexusContainer buildPlexusContainer(MavenConfiguration configuration)
           
static org.apache.maven.execution.MavenExecutionRequest createMavenRequest(org.codehaus.plexus.PlexusContainer plexusContainer, MavenConfiguration configuration)
           
static java.io.File getArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, boolean offlineMode)
           
static java.io.File getArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.lang.String classifier, boolean offlineMode)
           
static org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository(org.codehaus.plexus.PlexusContainer plexusContainer, MavenConfiguration configuration)
           
static org.apache.maven.settings.Settings getSettings(org.codehaus.plexus.PlexusContainer plexusContainer, MavenConfiguration configuration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAVEN_EXT_CLASS_PATH

public static final java.lang.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 java.util.List<java.lang.String> addPropertyToCommand(@NotNull
                                                                            java.util.List<java.lang.String> command,
                                                                            @NotNull
                                                                            java.lang.String key,
                                                                            @NotNull
                                                                            java.lang.String value)

buildPlexusContainer

public static org.codehaus.plexus.PlexusContainer buildPlexusContainer(@NotNull
                                                                       MavenConfiguration configuration)
                                                                throws java.net.MalformedURLException,
                                                                       org.codehaus.plexus.classworlds.realm.DuplicateRealmException,
                                                                       org.codehaus.plexus.PlexusContainerException
Throws:
java.net.MalformedURLException
org.codehaus.plexus.classworlds.realm.DuplicateRealmException
org.codehaus.plexus.PlexusContainerException

getArtifact

@Nullable
public static java.io.File getArtifact(java.lang.String groupId,
                                                java.lang.String artifactId,
                                                java.lang.String version,
                                                java.lang.String type,
                                                boolean offlineMode)
                                throws java.net.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:
java.net.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 java.io.File getArtifact(java.lang.String groupId,
                                                java.lang.String artifactId,
                                                java.lang.String version,
                                                java.lang.String type,
                                                java.lang.String classifier,
                                                boolean offlineMode)
                                throws java.net.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:
java.net.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
                                                                                         org.codehaus.plexus.PlexusContainer plexusContainer,
                                                                                         @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
                                                                                  org.codehaus.plexus.PlexusContainer plexusContainer,
                                                                                  @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
                                                             org.codehaus.plexus.PlexusContainer plexusContainer,
                                                             @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


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.