de.smartics.properties.resource.maven.repository
Class MavenRepository

Package class diagram package MavenRepository
java.lang.Object
  extended by de.smartics.properties.resource.maven.repository.MavenRepository

public final class MavenRepository
     
     
extends Object

The repository to access artifacts to resolve for property descriptor information.


Constructor Summary
MavenRepository(String remoteRepositoryUrl, org.sonatype.aether.repository.Authentication auth, String localRepositoryPath)
          Convenience constructor without dependency filters.
MavenRepository(String remoteRepositoryUrl, org.sonatype.aether.repository.Authentication auth, String localRepositoryPath, List<org.sonatype.aether.graph.DependencyFilter> dependencyFilters, boolean offline)
          Default constructor.
MavenRepository(String remoteRepositoryUrl, String localRepositoryPath)
          Convenience constructor without dependency filters and no authentication.
 
Method Summary
 org.sonatype.aether.RepositorySystemSession createSession()
          Creates a session to communicate with the repository.
 String getRemoteRepositoryUrl()
          Returns the URL to the remote repository.
 de.smartics.properties.resource.domain.ClassPathEnvironment resolve(org.sonatype.aether.RepositorySystemSession session, org.sonatype.aether.artifact.Artifact artifact)
          Resolves the artifact so that it is locally accessible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenRepository

public MavenRepository(String remoteRepositoryUrl,
                       String localRepositoryPath)
Convenience constructor without dependency filters and no authentication.

Parameters:
remoteRepositoryUrl - the URL to the remote repository of artifacts.
localRepositoryPath - the directory path to the local repository of artifacts.

MavenRepository

public MavenRepository(String remoteRepositoryUrl,
                       org.sonatype.aether.repository.Authentication auth,
                       String localRepositoryPath)
Convenience constructor without dependency filters.

Parameters:
remoteRepositoryUrl - the URL to the remote repository of artifacts.
localRepositoryPath - the directory path to the local repository of artifacts.

MavenRepository

public MavenRepository(String remoteRepositoryUrl,
                       org.sonatype.aether.repository.Authentication auth,
                       String localRepositoryPath,
                       List<org.sonatype.aether.graph.DependencyFilter> dependencyFilters,
                       boolean offline)
Default constructor.

Parameters:
remoteRepositoryUrl - the URL to the remote repository of artifacts.
localRepositoryPath - the directory path to the local repository of artifacts.
dependencyFilters - the list of dependency filters to apply to the dependency request.
Method Detail

createSession

public org.sonatype.aether.RepositorySystemSession createSession()
Creates a session to communicate with the repository.

Returns:
a new session instance.

resolve

public de.smartics.properties.resource.domain.ClassPathEnvironment resolve(org.sonatype.aether.RepositorySystemSession session,
                                                                           org.sonatype.aether.artifact.Artifact artifact)
                                                                    throws org.sonatype.aether.resolution.DependencyResolutionException
Resolves the artifact so that it is locally accessible.

Parameters:
session - the session used for communication.
artifact - the artifact to resolve.
Returns:
the reference to the resolved artifact that is now stored locally ready for access.
Throws:
org.sonatype.aether.resolution.DependencyResolutionException - if the dependency tree could not be built or any dependency artifact could not be resolved.

getRemoteRepositoryUrl

public String getRemoteRepositoryUrl()
Returns the URL to the remote repository.

Returns:
the URL to the remote repository.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.