Package hudson.maven.reporters
Class MavenArtifactRecord
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.TaskAction
hudson.maven.reporters.MavenAbstractArtifactRecord<MavenBuild>
hudson.maven.reporters.MavenArtifactRecord
- All Implemented Interfaces:
AggregatableAction
,Action
,BuildBadgeAction
,ModelObject
,SearchableModelObject
,SearchItem
@ExportedBean
public class MavenArtifactRecord
extends MavenAbstractArtifactRecord<MavenBuild>
implements AggregatableAction
Action
that remembers artifact
s that are built.
Defines the methods and UIs to do (delayed) deployment and installation.- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.maven.reporters.MavenAbstractArtifactRecord
MavenAbstractArtifactRecord.Record
-
Field Summary
Modifier and TypeFieldDescriptionfinal List<MavenArtifact>
Attached artifacts.final MavenArtifact
The main artifact (like jar or war, but could be anything.) If this is a POM module, the main artifact contains the same value aspomArtifact
.final MavenBuild
The build to which this record belongs.final MavenArtifact
POM artifact.final String
The repository identifier (matching maven settings) used for credentials to deploy artifactsfinal String
The repository URL used for credentials to deploy artifactsFields inherited from class hudson.maven.reporters.MavenAbstractArtifactRecord
debug, records, REDEPLOY
Fields inherited from class hudson.model.TaskAction
log, workerThread
-
Constructor Summary
ConstructorDescriptionMavenArtifactRecord
(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List<MavenArtifact> attachedArtifacts) Deprecated.MavenArtifactRecord
(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List<MavenArtifact> attachedArtifacts, String repositoryUrl, String repositoryId) -
Method Summary
Modifier and TypeMethodDescriptioncreateAggregatedAction
(MavenModuleSetBuild build, Map<MavenModule, List<MavenBuild>> moduleBuilds) CreatesAction
to be contributed toMavenModuleSetBuild
.void
deploy
(hudson.maven.MavenEmbedder embedder, org.apache.maven.artifact.repository.ArtifactRepository deploymentRepository, TaskListener listener) Deploys the artifacts to the specifiedArtifactRepository
.Deprecated.This method shall NEVER be used during HTML page rendering, as it's too easy for misconfiguration to break this value, with network set up like Apache reverse proxy.getBuild()
Gets the parent build object to which this record is registered.getUrl()
Returns the URL of this record relative to the context root of the application.boolean
isPOM()
Methods inherited from class hudson.maven.reporters.MavenAbstractArtifactRecord
doRedeploy, getACL, getApi, getDisplayName, getDynamic, getHistoryWidget, getIconFileName, getPermission, getUrlName, hasBadge
Methods inherited from class hudson.model.TaskAction
doClearError, doProgressiveHtml, doProgressiveLog, getLog, getSearchUrl, getWorkerThread, obtainLog
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
Field Details
-
parent
The build to which this record belongs. -
pomArtifact
POM artifact. -
mainArtifact
The main artifact (like jar or war, but could be anything.) If this is a POM module, the main artifact contains the same value aspomArtifact
. -
attachedArtifacts
Attached artifacts. Can be empty but never null. -
repositoryId
The repository identifier (matching maven settings) used for credentials to deploy artifacts -
repositoryUrl
The repository URL used for credentials to deploy artifacts
-
-
Constructor Details
-
MavenArtifactRecord
@Deprecated public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List<MavenArtifact> attachedArtifacts) Deprecated. -
MavenArtifactRecord
public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List<MavenArtifact> attachedArtifacts, String repositoryUrl, String repositoryId)
-
-
Method Details
-
getBuild
Description copied from class:MavenAbstractArtifactRecord
Gets the parent build object to which this record is registered.- Specified by:
getBuild
in classMavenAbstractArtifactRecord<MavenBuild>
-
getUrl
Returns the URL of this record relative to the context root of the application.- Returns:
- URL that ends with '/'.
- See Also:
-
getAbsoluteUrl
Deprecated.This method shall NEVER be used during HTML page rendering, as it's too easy for misconfiguration to break this value, with network set up like Apache reverse proxy. This method is only intended for the remote API clients who cannot resolve relative references.Obtains the absolute URL to this build. -
isPOM
public boolean isPOM() -
createAggregatedAction
public MavenAggregatedArtifactRecord createAggregatedAction(MavenModuleSetBuild build, Map<MavenModule, List<MavenBuild>> moduleBuilds) Description copied from interface:AggregatableAction
CreatesAction
to be contributed toMavenModuleSetBuild
.- Specified by:
createAggregatedAction
in interfaceAggregatableAction
- Parameters:
build
-MavenModuleSetBuild
for which the aggregated report is created.moduleBuilds
- The result ofMavenModuleSetBuild.getModuleBuilds()
provided for convenience and efficiency.- Returns:
- null if the reporter provides no such action.
-
deploy
public void deploy(hudson.maven.MavenEmbedder embedder, org.apache.maven.artifact.repository.ArtifactRepository deploymentRepository, TaskListener listener) throws hudson.maven.MavenEmbedderException, IOException, org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.artifact.deployer.ArtifactDeploymentException Description copied from class:MavenAbstractArtifactRecord
Deploys the artifacts to the specifiedArtifactRepository
.- Specified by:
deploy
in classMavenAbstractArtifactRecord<MavenBuild>
- Parameters:
embedder
- This component hosts all the Maven components we need to do the work.deploymentRepository
- The remote repository to deploy to.listener
- The status and error goes to this listener.- Throws:
hudson.maven.MavenEmbedderException
IOException
org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.apache.maven.artifact.deployer.ArtifactDeploymentException
-