Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Modules with publishArtifact:=false should be ignored. #93

Closed
angelcervera opened this issue Nov 19, 2016 · 6 comments
Closed

Modules with publishArtifact:=false should be ignored. #93

angelcervera opened this issue Nov 19, 2016 · 6 comments
Milestone

Comments

@angelcervera
Copy link

Bintray plugin manages modules with publishArtifact:=false as if they were to be published. In that case, Bintray should ignore those modules.

The best example is when you are working in a multimodule project, so:

  • You don't want publish the default artifact because it does not containt anything.
  • You want about modules that are examples of use.

Currently, in both cases, this plugin tries to execute bintrayEnsureBintrayPackageExists, bintrayEnsureLicenses, etc.. when the artifact is not published, there are no licence info, etc.. So the process finish with error.

I created an example:
Tag with the configuration used to proof the possible bug: https://github.com/angelcervera/sbt-multimodule-template/tree/ISSUE1-proofbug
Workaround used: https://github.com/angelcervera/sbt-multimodule-template/tree/feature/ISSUE-1_bintray

@jorkzijlstra
Copy link

+1

@jrduncans
Copy link

Updated work-around (at least for me), in the root module that shouldn't be published:

    publishArtifact := false,
    // Replace tasks to work around https://github.com/sbt/sbt-bintray/issues/93
    bintrayRelease := (),
    bintrayEnsureBintrayPackageExists := (),
    bintrayEnsureLicenses := (),

@eed3si9n
Copy link
Member

eed3si9n commented Mar 7, 2018

The preferred flag for this is skip in publish.

@AnderEnder
Copy link

Or support both: skip in publish and publishArtifact := false
We used skip in publish.

@2m
Copy link
Member

2m commented Mar 27, 2018

Just checked that skip in publish even if set to true on the root project still checks for the license information on the root project, which should be fixed.

@eed3si9n
Copy link
Member

Or support both

As I wrote in sbt/sbt#3136, publishArtifact := false doesn't mean much since it on its own just provides a default value for the more scoped publishArtifact settings. For the sake of consistency with sbt 1 as well as sbt-pgp, we should just stick to skip in publish as the flag to indicate that you want to skip the subproject publishing. I'd be happy to send a PR for this.

eed3si9n added a commit to eed3si9n/sbt-bintray that referenced this issue Mar 27, 2018
@2m 2m closed this as completed in #150 Mar 28, 2018
@2m 2m added this to the 0.5.4 milestone Mar 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants