|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.fusesource.fabric.maven.impl.MavenProxyServletSupport
public class MavenProxyServletSupport
| Nested Class Summary | |
|---|---|
static class |
MavenProxyServletSupport.LogAdapter
|
| Field Summary | |
|---|---|
static java.util.regex.Pattern |
ARTIFACT_METADATA_URL_REGEX
|
static java.util.regex.Pattern |
ARTIFACT_REQUEST_URL_REGEX
|
protected java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> |
artifactLocks
|
protected java.lang.String |
checksumPolicy
|
protected java.lang.String |
localRepository
|
protected static java.util.logging.Logger |
LOGGER
|
protected java.lang.String |
remoteRepositories
|
protected java.util.Map<java.lang.String,org.sonatype.aether.repository.RemoteRepository> |
repositories
|
static java.util.regex.Pattern |
REPOSITORY_ID_REGEX
|
protected org.sonatype.aether.RepositorySystemSession |
session
|
protected org.sonatype.aether.RepositorySystem |
system
|
protected java.io.File |
tmpFolder
|
protected java.lang.String |
updatePolicy
|
| Fields inherited from interface org.fusesource.fabric.maven.MavenProxy |
|---|
DOWNLOAD_TYPE, UPLOAD_TYPE |
| Constructor Summary | |
|---|---|
MavenProxyServletSupport()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
cleanUpRepositorySpec(java.lang.String spec)
Removes all options from the repository spec. |
protected org.sonatype.aether.artifact.Artifact |
convertPathToArtifact(java.lang.String path)
Converts the path of the request to an Artifact. |
protected org.sonatype.aether.metadata.Metadata |
convertPathToMetadata(java.lang.String path)
Converts the path of the request to Metadata. |
protected java.lang.String |
convertToMavenUrl(java.lang.String path)
Converts the path of the request to maven coords. |
java.io.File |
download(java.lang.String path)
Downloads a File from the MavenProxy. |
java.lang.String |
getChecksumPolicy()
|
java.lang.String |
getRemoteRepositories()
|
java.lang.String |
getUpdatePolicy()
|
protected org.sonatype.aether.RepositorySystem |
newRepositorySystem()
|
protected org.sonatype.aether.RepositorySystemSession |
newSession(org.sonatype.aether.RepositorySystem system,
java.lang.String localRepository)
|
protected java.io.File |
readFile(java.io.InputStream is,
java.io.File tempLocation,
java.lang.String name)
Reads a File from the InputStream then saves it under a temp location and returns the file. |
void |
setChecksumPolicy(java.lang.String checksumPolicy)
|
void |
setLocalRepository(java.lang.String localRepository)
|
void |
setRemoteRepositories(java.lang.String remoteRepositories)
|
void |
setUpdatePolicy(java.lang.String updatePolicy)
|
void |
start()
|
void |
stop()
|
boolean |
upload(java.io.InputStream is,
java.lang.String path)
Upload a File to the MavenProxy. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger LOGGER
public static final java.util.regex.Pattern ARTIFACT_REQUEST_URL_REGEX
public static final java.util.regex.Pattern ARTIFACT_METADATA_URL_REGEX
public static final java.util.regex.Pattern REPOSITORY_ID_REGEX
protected java.lang.String localRepository
protected java.lang.String remoteRepositories
protected java.lang.String updatePolicy
protected java.lang.String checksumPolicy
protected java.util.Map<java.lang.String,org.sonatype.aether.repository.RemoteRepository> repositories
protected org.sonatype.aether.RepositorySystem system
protected org.sonatype.aether.RepositorySystemSession session
protected java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> artifactLocks
protected java.io.File tmpFolder
| Constructor Detail |
|---|
public MavenProxyServletSupport()
| Method Detail |
|---|
public void start()
throws java.io.IOException
start in interface MavenProxyjava.io.IOExceptionpublic void stop()
stop in interface MavenProxy
public java.io.File download(java.lang.String path)
throws InvalidMavenArtifactRequest
MavenProxyFile from the MavenProxy.
download in interface MavenProxypath - The path from which to download the File.
InvalidMavenArtifactRequest
public boolean upload(java.io.InputStream is,
java.lang.String path)
throws InvalidMavenArtifactRequest
MavenProxyFile to the MavenProxy.
upload in interface MavenProxyis - The InputStream to upload.path - The upload path.
InvalidMavenArtifactRequest
protected org.sonatype.aether.RepositorySystemSession newSession(org.sonatype.aether.RepositorySystem system,
java.lang.String localRepository)
protected org.sonatype.aether.RepositorySystem newRepositorySystem()
protected java.lang.String convertToMavenUrl(java.lang.String path)
throws InvalidMavenArtifactRequest
DefaultArtifact.
path - The request path, following the format: <groupId>/<artifactId>/<version>/<artifactId>-<version>-[<classifier>].extension
String in the following format: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
InvalidMavenArtifactRequest
protected org.sonatype.aether.artifact.Artifact convertPathToArtifact(java.lang.String path)
throws InvalidMavenArtifactRequest
Artifact.
path - The request path, following the format: <groupId>/<artifactId>/<version>/<artifactId>-<version>-[<classifier>].extension
DefaultArtifact that matches the request path.
InvalidMavenArtifactRequest
protected org.sonatype.aether.metadata.Metadata convertPathToMetadata(java.lang.String path)
throws InvalidMavenArtifactRequest
Metadata.
path - The request path, following the format: <groupId>/<artifactId>/<version>/<artifactId>-<version>-[<classifier>].extension
InvalidMavenArtifactRequest
protected java.io.File readFile(java.io.InputStream is,
java.io.File tempLocation,
java.lang.String name)
throws java.io.FileNotFoundException
File from the InputStream then saves it under a temp location and returns the file.
is - The source input stream.tempLocation - The temporary location to save the content of the stream.name - The name of the file.
java.io.FileNotFoundExceptionprotected java.lang.String cleanUpRepositorySpec(java.lang.String spec)
spec -
public void setLocalRepository(java.lang.String localRepository)
public java.lang.String getRemoteRepositories()
public void setRemoteRepositories(java.lang.String remoteRepositories)
public java.lang.String getUpdatePolicy()
public void setUpdatePolicy(java.lang.String updatePolicy)
public java.lang.String getChecksumPolicy()
public void setChecksumPolicy(java.lang.String checksumPolicy)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||