org.jvnet.hudson.update_center
Class MavenRepository

java.lang.Object
  extended by org.jvnet.hudson.update_center.MavenRepository

public class MavenRepository
extends java.lang.Object

Maven repository and its nexus index. Using Maven embedder 2.0.4 results in problem caused by Plexus incompatibility.

Author:
Kohsuke Kawaguchi

Constructor Summary
MavenRepository()
           
MavenRepository(java.lang.String id, java.io.File indexDirectory, java.net.URL repository)
           
MavenRepository(java.lang.String id, java.net.URL repository)
          Opens a Maven repository by downloading its index file.
 
Method Summary
protected  HPI createHpiArtifact(org.sonatype.nexus.index.ArtifactInfo a, PluginHistory p)
           
protected  HudsonWar createHudsonWarArtifact(org.sonatype.nexus.index.ArtifactInfo a)
           
 java.util.TreeMap<VersionNumber,HudsonWar> getHudsonWar()
          Discover all hudson.war versions.
 java.util.Collection<PluginHistory> listHudsonPlugins()
          Discover all plugins from this Maven repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenRepository

public MavenRepository()
                throws java.lang.Exception
Throws:
java.lang.Exception

MavenRepository

public MavenRepository(java.lang.String id,
                       java.io.File indexDirectory,
                       java.net.URL repository)
                throws java.lang.Exception
Parameters:
id - Repository ID. This ID has to match the ID in the repository index, due to a design bug in Maven.
indexDirectory - Directory that contains exploded index zip file.
repository - URL of the Maven repository. Used to resolve artifacts.
Throws:
java.lang.Exception

MavenRepository

public MavenRepository(java.lang.String id,
                       java.net.URL repository)
                throws java.lang.Exception
Opens a Maven repository by downloading its index file.

Throws:
java.lang.Exception
Method Detail

listHudsonPlugins

public java.util.Collection<PluginHistory> listHudsonPlugins()
                                                      throws org.codehaus.plexus.PlexusContainerException,
                                                             org.codehaus.plexus.component.repository.exception.ComponentLookupException,
                                                             java.io.IOException,
                                                             org.sonatype.nexus.index.context.UnsupportedExistingLuceneIndexException,
                                                             org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
Discover all plugins from this Maven repository.

Throws:
org.codehaus.plexus.PlexusContainerException
org.codehaus.plexus.component.repository.exception.ComponentLookupException
java.io.IOException
org.sonatype.nexus.index.context.UnsupportedExistingLuceneIndexException
org.apache.maven.artifact.resolver.AbstractArtifactResolutionException

getHudsonWar

public java.util.TreeMap<VersionNumber,HudsonWar> getHudsonWar()
                                                        throws java.io.IOException,
                                                               org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
Discover all hudson.war versions.

Throws:
java.io.IOException
org.apache.maven.artifact.resolver.AbstractArtifactResolutionException

createHpiArtifact

protected HPI createHpiArtifact(org.sonatype.nexus.index.ArtifactInfo a,
                                PluginHistory p)
                         throws org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
Throws:
org.apache.maven.artifact.resolver.AbstractArtifactResolutionException

createHudsonWarArtifact

protected HudsonWar createHudsonWarArtifact(org.sonatype.nexus.index.ArtifactInfo a)


Copyright © 2010. All Rights Reserved.