sbt / sbt-onejar

Packages your project using One-JAR™
MIT License
268 stars 45 forks source link

sbt loads sbt-onejar but rejects one-jar command #32

Open brinklec opened 7 years ago

brinklec commented 7 years ago

After adding plugin to build.sbt, sbt loaded sbt-onejar but then complained "one-jar" is not a valid command???

Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support wa
s removed in 8.0
[info] Loading project definition from C:\scala\db\project
[info] Updating {file:/C:/scala/db/project/}db-build...
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-2cf13e211b2cb31f0d3b317289dca70
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.s
cala-sbt.plugins/sbt-onejar/scala_2.10/sbt_0.13/0.8/jars/sbt-onejar.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt.plugins#sbt-onejar;0.8!sbt-onejar.jar (2216m
s)
[info] Done updating.
[info] Set current project to db (in build file:/C:/scala/db/)
> one-jar
[error] Not a valid command: one-jar
[error] Not a valid key: one-jar (similar: on-load, unmanaged-jars, export-jars)

[error] one-jar
[error]        ^
brinklec commented 7 years ago

This should probably be closed, with apologies. It was actually an sbt config issue caused by unwise action on my part. I ended up going in a different direction so did not pursue it further, but subsequently discovered I had done something in the project that prevented sbt from properly finding plugin commands.

KrbAlmryde commented 7 years ago

For those that are having the same problem a simple solution is to do the following

$ sbt

reload plugins clean reload return

This should reload the plugin and put the plugin tasks into scope proper. Worked for me at any rate.