|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.maven.reporters.MavenArtifact
@ExportedBean public final class MavenArtifact
Captures information about an artifact created by Maven and archived by Jenkins, so that we can later deploy it to repositories of our choice.
This object is created within the Maven process and sent back to the master, so it shouldn't contain anything non-serializable as fields.
Once it's constructed, the object should be considered final and immutable.
Field Summary | |
---|---|
String |
artifactId
Basic parameters of a Maven artifact. |
String |
canonicalName
The canonical artifact file name, used by Maven in the repository. |
String |
classifier
Basic parameters of a Maven artifact. |
String |
fileName
File name (without directory portion) of this artifact in the Hudson archive. |
String |
groupId
Basic parameters of a Maven artifact. |
String |
md5sum
The md5sum for this artifact. |
String |
type
Basic parameters of a Maven artifact. |
String |
version
Basic parameters of a Maven artifact. |
Constructor Summary | |
---|---|
MavenArtifact(org.apache.maven.artifact.Artifact a)
|
|
MavenArtifact(String groupId,
String artifactId,
String version,
String classifier,
String type,
String fileName,
String md5sum)
|
Method Summary | |
---|---|
void |
archive(MavenBuildProxy build,
File file,
BuildListener listener)
Called from within Maven to archive an artifact in Hudson. |
static MavenArtifact |
create(org.apache.maven.artifact.Artifact a)
Convenience method to check if the given Artifact object contains
enough information suitable for recording, and if so, create MavenArtifact . |
org.kohsuke.stapler.HttpResponse |
doFile(MavenArtifactRecord parent)
Serve the file. |
Api |
getApi()
|
File |
getFile(MavenBuild build)
Obtains the File representing the archived artifact. |
boolean |
isPOM()
|
void |
recordFingerprint(MavenBuild build)
Called from within the master to record fingerprint. |
org.apache.maven.artifact.Artifact |
toArtifact(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager handlerManager,
org.apache.maven.artifact.factory.ArtifactFactory factory,
MavenBuild build)
Creates a Maven Artifact back from the persisted data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Exported public final String groupId
@Exported public final String artifactId
@Exported public final String version
@Exported public final String classifier
@Exported public final String type
@Exported public final String fileName
This name is taken directly from the name of the file as used during the build
(thus POM would be most likely just pom.xml and artifacts would
use their finalName if one is configured.) This is often
different from canonicalName
.
@Exported public final String canonicalName
The reason we persist this is that the extension is only available
through ArtifactHandler
.
@Exported public final String md5sum
Constructor Detail |
---|
public MavenArtifact(org.apache.maven.artifact.Artifact a) throws IOException
IOException
public MavenArtifact(String groupId, String artifactId, String version, String classifier, String type, String fileName, String md5sum)
Method Detail |
---|
public static MavenArtifact create(org.apache.maven.artifact.Artifact a) throws IOException
Artifact
object contains
enough information suitable for recording, and if so, create MavenArtifact
.
IOException
public boolean isPOM()
public org.apache.maven.artifact.Artifact toArtifact(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager handlerManager, org.apache.maven.artifact.factory.ArtifactFactory factory, MavenBuild build) throws IOException
Artifact
back from the persisted data.
IOException
public File getFile(MavenBuild build) throws IOException
File
representing the archived artifact.
IOException
public org.kohsuke.stapler.HttpResponse doFile(@AncestorInPath MavenArtifactRecord parent) throws IOException
IOException
public void archive(MavenBuildProxy build, File file, BuildListener listener) throws IOException, InterruptedException
IOException
InterruptedException
public void recordFingerprint(MavenBuild build) throws IOException
IOException
public Api getApi()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |