Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Using shipkit in part with maven-publish #768

Closed
jjstreet opened this issue Jan 16, 2019 · 9 comments

Comments

@jjstreet
Copy link

commented Jan 16, 2019

I am successfully using shipkit to manage my versions and for adding releases in github. I am not using the publishing parts because I don't release publicly to bintray or maven central. I instead am trying to use the standard maven-publish plugin gradle provides.

The maven-publish plugin will read from version.properties, and because the version is bumped by shipkit, it publishes the artifacts at the next version as anticipated by shipkit, not the "previous" which is the latest released.

How can I get these plugins to play nicely? Or can I get shipkit to handle publishing by using the maven-publish plugin somehow?

@jjstreet

This comment has been minimized.

Copy link
Author

commented Jan 16, 2019

As a workaround I've set the version of the artifacts to publish to the previous version as specified in the VersionInfo object thats in the root project:

publications {
  somewhere(MavenPublication) {
    version rootProject['org.shipkit.version.VersionInfo'].previousVersion
    from components.java
  }
  ...
}

Its kludgy because my jenkins pipeline says I'm building one version for clean build and the git tasks. Then executing it again, it says its building the next version because of the version bump.

I might be running right into a design limitation because shipkit expects tasks to be chained together in one execution. Breaking them up doesn't work too well, at least as evidenced by me here.

@mstachniuk

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2019

Shipkit always use 'version' property from version.properties to build artifacts. After artifacts are build the task performRelease execute task bumpVersionFile for increase version number. Next those changes are commited to your repo. Please chek you build output and commits in GitHub.

Shipkit release model was intendend to publish to Bintray and Bintray can automatically synchoronize to Maven Central. Shipkit use com.jfrog.bintray plugin as you can find in examples in your PROJECT_DIR/gradle/shipkit.gradle. Nobody tried before to make it work with maven-publish - it can be hard, but i can't stop you.
Please consider publishing to Bintray and synchonize to Maven Central - this will save you a lot of stress with Maven Central Requirements: https://central.sonatype.org/pages/requirements.html

Regarding 2nd comment: you shouldn't use previousVersion. It's intendet to have a possibility to download previous version and compare changes in code. Once published artifact shouldn't be changed.

Please add a link to your repo and build outputs - maybe then I can help something more.

@jjstreet

This comment has been minimized.

Copy link
Author

commented Jan 16, 2019

I'm trying to harness shipkit for an "inner-source" (new term i learned today) project. Meaning, its not intended for release publicly. Therefore, it will never be released into MavenCentral, and will not be published to bintray.

@mstachniuk

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

@jjstreet

This comment has been minimized.

Copy link
Author

commented Jan 17, 2019

Perhaps. I will look into that. It would be nice if shipkit abstracted the way it used bintray to allow a transparent passthrough to the maven-publish plugin for users that cannot publish to bintray first.

@epeee

This comment has been minimized.

Copy link
Member

commented Jan 17, 2019

Hi,
I'm also using shipkit and maven-publish plugin to publish artifacts internally.
I will be able to provide more details tomorrow.

@mstachniuk

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

@epeee Please add it to documentation (and review #750 please)

@eximius313

This comment has been minimized.

Copy link

commented Apr 2, 2019

@epeee any news on this?

@mstachniuk

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

@epeee Any news about documentation on how to use Shipkit with maven-publish?

mstachniuk added a commit that referenced this issue Jul 13, 2019
mstachniuk added a commit that referenced this issue Aug 23, 2019
Add documentation how to ship with maven-publish plugin fixes #768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.