Class MavenArtifactRecord

    • Field Detail

      • parent

        @Exported
        public final MavenBuild parent
        The build to which this record belongs.
      • pomArtifact

        @Exported(inline=true)
        public final MavenArtifact pomArtifact
        POM artifact.
      • mainArtifact

        @Exported(inline=true)
        public final MavenArtifact 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 as pomArtifact.
      • attachedArtifacts

        @Exported(inline=true)
        public final List<MavenArtifact> attachedArtifacts
        Attached artifacts. Can be empty but never null.
      • repositoryId

        public final String repositoryId
        The repository identifier (matching maven settings) used for credentials to deploy artifacts
      • repositoryUrl

        public final String repositoryUrl
        The repository URL used for credentials to deploy artifacts
    • Method Detail

      • getUrl

        public String getUrl()
        Returns the URL of this record relative to the context root of the application.
        Returns:
        URL that ends with '/'.
        See Also:
        for how to implement this.
      • getAbsoluteUrl

        @Exported(visibility=2,
                  name="url")
        public String 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()
      • 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 specified ArtifactRepository.
        Specified by:
        deploy in class MavenAbstractArtifactRecord<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