Class MavenHelper


  • public class MavenHelper
    extends Object
    • 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