Skip to content

Gradle plugin should add the repackaged jar to the project's components and possibly expose it as a separate artifact #1666

Closed

Description

@wilkinsona

Without it, using the maven-publish plugin is harder than it needs to be.

Activity

  1. added
    type: enhancement
    on Oct 6, 2014
  2. changed the title [-]Gradle plugin should add the repackaged jar to the project's components[/-] [+]Gradle plugin should add the repackaged jar to the project's components and possibly expose it as a separate artifact[/+] on Oct 6, 2014
  3. jgriff commented on Feb 26, 2015

    @jgriff

    Currently, I'm able to work around this in a rather haphazard manner:

    // make sure bootRepackage is included in task graph
    project.tasks.findAll { it.name.startsWith("publish") } .each { it.dependsOn assemble }
    
    // so we can maintain both "normal" and "boot" jars
    springBoot {
        classifier = 'boot'
    }
    
    publishing {
        publications {
            maven(MavenPublication) {
                // "normal" jar    
                from components.java
    
                // "boot" jar
                artifact ("$buildDir/libs/$project.name-$version-boot.jar") {
                    classifier = 'boot'
                }
            }
        }
    }
    

    I'm sure there must be a more elegant way to get the output file from the bootRepackage task, but it doesn't seem to declare its outputs (ie, bootRepackage.outputs is empty).

  4. gmcoringa commented on Sep 27, 2015

    @gmcoringa

    You also can't sign the jar generated by bootRepackage.

  5. mkobit commented on Nov 23, 2015

    @mkobit

    +1. Would be useful to have access to the produced outputs so they can used in combination with other plugins, such as creating a Docker image.

  6. self-assigned this
    on May 3, 2016
  7. modified the milestones: 1.4.0.M3, 2.0.0.M1 on May 3, 2016
  8. removed their assignment
    on Aug 30, 2016
  9. removed this from the 2.0.0.M1 milestone on Jan 12, 2017
  10. 5 remaining items

  11. modified the milestones: 2.0.0.M3, 2.0.0.M2 on Jan 12, 2017
  12. modified the milestones: 2.0.0.M3, 2.0.0.M2 on Feb 8, 2017
  13. modified the milestones: 2.0.0.M2, 2.0.0.M1 on Feb 15, 2017
  14. self-assigned this
    on Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions