pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 479 forks source link

sbt plugin is published to the incorrect path. #50

Closed ShaneDelmore closed 10 years ago

ShaneDelmore commented 10 years ago

The readme says to add the following line to plugins.sbt to use the plugin: addSbtPlugin("com.dius" %% "pact-jvm-provider-sbt" % "2.0.2") Which will fail to install looking for a path like: http://central.maven.org/maven2/com/dius/pact-jvm-provider-sbt_2.10_0.13/2.0.2/pact-jvm-provider-sbt-2.0.2.pom

When I browsed central.maven.org it appears that the base path is actually au.com.dius and that the plugin has not been published with an sbt version since 2.0-RC5.

This for example will work: addSbtPlugin("au.com.dius" %% "pact-jvm-provider-sbt" % "2.0-RC5") But even changing the root path to au.com.dius will fail after 2.0-RC5 because it will look for a path like: http://central.maven.org/maven2/au/com/dius/pact-jvm-provider-sbt_2.10_0.13/2.0.2/pact-jvm-provider-sbt-2.0.2.pom when the plugin is actually published to: http://central.maven.org/maven2/au/com/dius/pact-jvm-provider-sbt_2.10/2.0.2/pact-jvm-provider-sbt_2.10-2.0.2.pom which is missing the _0.13 that sbt adds since sbt plugins are based on the sbt version.

Or at least that is the way it looks to me, someone who has only been using SBT for a few days. If there is any other input I can add to improve this ticket or help troubleshoot it please let me know.

uglyog commented 10 years ago

Looks like it's the other way round. All versions up to 2.0-RC5 don't have the Scala version in the artifact name.

You can try using addSbtPlugin("au.com.dius" %% "pact-jvm-provider-sbt_2.10" % "2.0.2") and see if that works.

I'll update the build to not include the Scala version to make it consistent with the artifacts that where produced before 2.0.0.

uglyog commented 10 years ago

No, you are correct. They also need to have the sbt version. I'll fix that.

Oh, joy! It looks like the sbt plugins need to have versions in the artifact id but not in the artifact name, which goes against the maven conventions.

I'll publish a new version with the correct paths.

uglyog commented 10 years ago

I've published version 2.0.3 of the sbt plugins to maven central. They should appear soon, but it sometimes seems to take an hour or two.

Let me know if they work for you.

ShaneDelmore commented 10 years ago

Success! Thank you. Worked perfectly with: addSbtPlugin("au.com.dius" %% "pact-jvm-provider-sbt" % "2.0.3")

ShaneDelmore commented 10 years ago

The readme is missing the au. but otherwise looks correct.

uglyog commented 10 years ago

I've fixed the readme. Thanks for that.