mockito / shipkit

Toolkit for shipping it used by Mockito library
http://shipkit.org
MIT License
158 stars 35 forks source link

Cannot publish files for a first release #754

Closed jpkrohling closed 6 years ago

jpkrohling commented 6 years ago

I just bootstrapping a new project and decided to add shipkit to it, but it looks like there's something wrong that I can't quite figure out. A very similar configuration works for another repository with older releases, so, I believe this might be related to the repository not having pull requests yet (or earlier releases?).

This is what I see when running the bintrayUpload directly, but the error happens also as part of the performRelease task:

Execution failed for task ':bintrayUpload'.
> Could not upload to 'https://api.bintray.com/content/opentracing/maven/java-interceptors/0.0.1/property(class java/lang/String, transform(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, java-interceptors))/property(class java.lang.String, transform(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, java-interceptors))-property(class java.lang.String, transform(provider(?))).pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'property(class java/lang/String, transform(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, java-interceptors))/property(class java.lang.String, transform(provider(?)))/property(class java.lang.String, fixed(class java.lang.String, java-interceptors))-property(class java.lang.String, transform(provider(?))).pom']

This is what's generated at bintray:

image

jpkrohling commented 6 years ago

For reference, this is the repo: https://github.com/opentracing-contrib/java-interceptors And this is a build with the problem: https://travis-ci.org/opentracing-contrib/java-interceptors/jobs/428603085

mstachniuk commented 6 years ago
  1. Did you commit your source code? I don't see src dir in your repository
  2. You need to run ./gradlew build before ./gradlew ciPerformRelease in your .travis.yml. The checks if: type != pull_request and if: tag =~ /^release\/v.[\d\.]+(\-.*)?$/ are not needed. We suggest to use default generated .travis.yml by Shipkit, like: https://github.com/mockito/shipkit-example/blob/master/.travis.yml
jpkrohling commented 6 years ago
  1. No source code as of yet. Is that the reason?
  2. Travis runs ./gradlew assemble by default, so it did run a build before the ciPerformRelease. The default Travis configuration is suitable for continuous delivery, but that's not what I want. For this project, I want to do the release only when I push a tag release/v0.0.1. The check for the pull request is at the stage at the higher level and will probably be relevant for other deploy stages :)
mstachniuk commented 6 years ago
  1. Hmmm maybe empty jars will be produced, but:
  2. You have install: true in your script, so it means that Travis doesn't run a default install phase: https://docs.travis-ci.com/user/customizing-the-build/#skipping-the-installation-step In your Travis log you can see:
    457: $ true                                   install 0.00s
    458: 
    459: $ ./gradlew ciPerformRelease     37.51s

    No artifact - nothing to upload

jpkrohling commented 6 years ago

The artifacts are generated from the previous stages, but I'll change it to see if that helps.

jpkrohling commented 6 years ago

Looks like it fails even when assemble is executed during the install phase: https://travis-ci.org/opentracing-contrib/java-interceptors/jobs/428672724

epeee commented 6 years ago

@jpkrohling it looks like you are using v1.0.12 of shipkit. Can you update the plugin to the latest version (2.0.31)? There are some problems related to publication which should be fixed in the latest version.

jpkrohling commented 6 years ago

Can you update the plugin to the latest version (2.0.31)?

During the bootstrap, I read that I should use 1.0.12 if my project required pre-Java 8 support, which is the case (Java 6 support is required).

But indeed, bumping the Shipkit version to 2.0.31 solved my problem. I'll keep using it until I get bitten by whatever bugs exist for pre-Java 8 :)

jpkrohling commented 6 years ago

In time: I have a PR adding Shipkit support to another project, also requiring Java 6 compatibility, and 1.0.12 did work: https://github.com/jaegertracing/jaeger-client-java/pull/549/files

epeee commented 6 years ago

@jpkrohling thank you for the additional info. Once you update the gradle version in jaeger-client-java plugin I would expect also problems. Currently, you are using Gradle 4.7 in this project. We fixed some problems which came up with Gradle 4.8 (see https://github.com/mockito/shipkit/issues/727). @mockito/shipkit-developers what about doing a 1.0.x release which fixes the problem with recently released Gradle versions?