The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Maven Repository Server Plugin

step([$class: 'UpdaterPublisher']): Publish Maven Artifacts

    wrap([$class: 'RepositoryDefinitionProperty']): Define Upstream Maven Repository

    If selected, this allows you to define a variable - Jenkins.Repository - that will be present in the Maven environment that points to the specified repository.
    The best way of using this is to create a profile in the Jenkins settings.xml:
    
    
            <profile>
                <id>jenkins</id>
                <repositories>
                    <repository>
                        <id>jenkins</id>
                        <url>${env.Jenkins.Repository}</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>jenkins</id>
                        <url>${env.Jenkins.Repository}</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
    
        

    This profile is then enabled by adding "-Pjenkins" to your maven build options.
    • upstream
        Nested Choice of Objects
      • $class: 'SelectionTypeProject'
        • project
          • Type: String
        • build
          • Type: String
        • promoted
          • Type: String
      • $class: 'SelectionTypeSpecified'
        • path
          • Type: String
      • $class: 'SelectionTypeUpstream'
        • build
          • Type: String

    Was this page helpful?

    Please submit your feedback about this page through this quick form.

    Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

        


    See existing feedback here.