org.apache.maven.plugin.eclipse
Class AbstractSourcesDownloader

java.lang.Object
  extended byorg.apache.maven.AbstractMavenComponent
      extended byorg.apache.maven.plugin.eclipse.AbstractSourcesDownloader
Direct Known Subclasses:
JavadocsDownloader, JavaSourcesDownloader

public abstract class AbstractSourcesDownloader
extends org.apache.maven.AbstractMavenComponent

A base class to download sources achives.

Author:
Stephane Nicoll

Field Summary
protected static String PROXY_LOGINDOMAIN
           
protected static String PROXY_LOGINHOST
           
 
Constructor Summary
AbstractSourcesDownloader()
           
 
Method Summary
protected abstract  String buildRelativePath()
           
 void downloadSources()
           
 String getArtifactId()
           
 String getGroupId()
           
 org.apache.maven.project.Project getProject()
           
protected  boolean getRemoteArtifact(File destinationFile, String relativePath, org.apache.maven.project.Dependency relatedDependency)
          Retrieve a remoteFile from the maven remote repositories and store it at destinationFile
protected abstract  String getSourceName()
           
 String getVersion()
           
protected  boolean isSnapshot()
           
 void setArtifactId(String artifactId)
           
 void setGroupId(String groupId)
           
 void setProject(org.apache.maven.project.Project project)
           
 void setVersion(String version)
           
 
Methods inherited from class org.apache.maven.AbstractMavenComponent
getMessage, getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROXY_LOGINHOST

protected static final String PROXY_LOGINHOST
See Also:
Constant Field Values

PROXY_LOGINDOMAIN

protected static final String PROXY_LOGINDOMAIN
See Also:
Constant Field Values
Constructor Detail

AbstractSourcesDownloader

public AbstractSourcesDownloader()
Method Detail

downloadSources

public void downloadSources()
                     throws Exception
Throws:
Exception

buildRelativePath

protected abstract String buildRelativePath()

getSourceName

protected abstract String getSourceName()

getProject

public org.apache.maven.project.Project getProject()

setProject

public void setProject(org.apache.maven.project.Project project)

getGroupId

public String getGroupId()

setGroupId

public void setGroupId(String groupId)

getArtifactId

public String getArtifactId()

setArtifactId

public void setArtifactId(String artifactId)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

isSnapshot

protected boolean isSnapshot()

getRemoteArtifact

protected boolean getRemoteArtifact(File destinationFile,
                                    String relativePath,
                                    org.apache.maven.project.Dependency relatedDependency)
Retrieve a remoteFile from the maven remote repositories and store it at destinationFile

Parameters:
destinationFile - the destination file in the local repository
relativePath - the relative path to the dependency
Returns:
true if the retrieval succeeds, false otherwise.


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.