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

RuntimeException: was not able to find or create a package for ... #32

Closed
luchesar opened this issue Aug 18, 2014 · 6 comments
Closed

Comments

@luchesar
Copy link

I am trying to publish my project to bintray following the instruction to the letter from: https://github.com/softprops/bintray-sbt/blob/0.1.2/README.md

I keep getting:

java.lang.RuntimeException: was not able to find or create a package for luchesar in repo maven named sbt.SettingKey$$anon$4@6028e736
    at scala.sys.package$.error(package.scala:27)
    at bintray.Plugin$$anonfun$ensurePackageTask$1.apply(Plugin.scala:72)
    at bintray.Plugin$$anonfun$ensurePackageTask$1.apply(Plugin.scala:45)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)

Sounds really confusing to me and looks like nobody else has experience anything like that... Any suggestions?

The project is using build.sbt and the code is still not published to github. The github project in question is https://github.com/luchesar/vehicles-online . The current version there uses Build.scala and has an other problem when trying to publish with bintray-sbt plugin. The problem is:
[error] (*:publish) error uploading to https://api.bintray.com/maven/luchesar/maven/maven/dvla/vehicles-online_2.10/1.0-SNAPSHOT/vehicles-online_2.10-1.0-SNAPSHOT.pom: {"message":"Provided artifact path does not comply with Maven's convention"}

@PilchardFriendly
Copy link

I've just experienced this with bintray 0.1.2, scala 2.10.4, sbt 0.13.5

my publish.sbt looks like:

publishMavenStyle := true

publishArtifact in Test := false

pomIncludeRepository := { x => false }

bintrayPublishSettings

bintray.Keys.repository in bintray.Keys.bintray := "sbt-plugins"

licenses  += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html"))

my plugins.sbt:

resolvers += Resolver.url(
  "bintray-sbt-plugin-releases",
  url(
    "http://dl.bintray.com/content/sbt/sbt-plugins-releases"))(
    Resolver.ivyStylePatterns)

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.1.2")

the error:

java.lang.RuntimeException: was not able to find or create a package for sbt in repo sbt-plugins named sbt.SettingKey$$anon$4@7ddd38a6
    at scala.sys.package$.error(package.scala:27)
    at bintray.Plugin$$anonfun$ensurePackageTask$1.apply(Plugin.scala:72)
    at bintray.Plugin$$anonfun$ensurePackageTask$1.apply(Plugin.scala:45)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

@PilchardFriendly
Copy link

Update - I added:

bintray.Keys.bintrayOrganization in bintray.Keys.bintray := None

and all is well.

@luchesar
Copy link
Author

This turned out to be quite trivial but very confusing.

The plugin works fine with a release version (non SNAPSHOT). After a lot of debugging of the error message I removed the SNAPSHOT from my version and it worked fine.

It would be very nice to have some meaningful error message. Do you accept pull requests?

@softprops
Copy link
Member

Do you accept pull requests?

Absolutely!

@PilchardFriendly
Copy link

On a related note - I was using the sbt release plugin

addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.4")

Which removes the SNAPSHOT suffix, prior to publish, when you issue

sbt release

But better diagnostics are a good idea too.

@2m
Copy link
Member

2m commented Mar 27, 2018

Duplicate of #32

@2m 2m marked this as a duplicate of #32 Mar 27, 2018
@2m 2m closed this as completed Mar 27, 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

4 participants