Attempting to Update Rapture for Play 2.4. Building Empty Jar

19 views
Skip to first unread message

Josh Padnick

unread,
May 11, 2015, 11:59:01 AM5/11/15
to raptur...@googlegroups.com
Hello,

I really like the rapture-json library and would like to use it with Play-2.4.  Currently, that is failing because of Play's documented changes to its JSON API for Play-2.4 (https://playframework.com/documentation/2.4.0-RC2/Migration24).

So, I forked the repo at https://github.com/propensive/rapture-json-play and made what I believe is the simple change required (basically replacing "JsValue" with "JsLookup").  The code compiles fine, but when I do the following, I just get an empty JAR.  I also get an empty JAR doing these commands on the un-altered repo for rapture-json-play.

Any idea why I'm getting the empty JAR?

Joshs-MacBook-Pro:rapture-json-play-master josh$ sbt
[info] Loading project definition from /repos/fork/rapture-json-play-master/project
[info] Set current project to rapture-json-play (in build file:/repos/fork/rapture-json-play-master/)
> compile
[success] Total time: 0 s, completed May 11, 2015 8:57:32 AM
> package
[info] Packaging /repos/fork/rapture-json-play-master/target/scala-2.10/rapture-json-play_2.10-1.1.0.jar ...
[info] Done packaging.
[success] Total time: 0 s, completed May 11, 2015 8:57:34 AM

and then I get the empty jar:

Joshs-MacBook-Pro:rapture-json-play-master josh$ ls -al /repos/fork/rapture-json-play-master/target/scala-2.10/rapture-json-play_2.10-1.1.0.jar
-rw-r--r--  1 josh  wheel  310 May 11 08:57 /repos/fork/rapture-json-play-master/target/scala-2.10/rapture-json-play_2.10-1.1.0.jar

Or rather, it's just 310 bytes.

Thanks for your input!  Otherwise, a pretty great library!

Josh

Jon Pretty

unread,
May 12, 2015, 11:16:13 AM5/12/15
to raptur...@googlegroups.com
Hi Josh,

I think I know what the problem is, because the same thing has happened to me before...

It hasn't actually done any compilation, and that's probably because it hasn't found the source files. I use the convention of having my sources in the root of the `src` directory, rather than `src/main/scala` (which is the default), and SBT only knows about this because of the file `.build.sbt` in the root folder.

Is that the problem?

By the way, how have you got on with building Rapture in general? I'm aware that it's not entirely straightforward to get started building Rapture with SBT, and you probably have to jump through some hoops to get things working. I'd love to do some quick fixes to improve things, but it's actually difficult to solve completely... I'm hoping to find time over the summer, though.

Cheers,
Jon

--
You received this message because you are subscribed to the Google Groups "Rapture users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapture-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jon Pretty | @propensive

Josh Padnick

unread,
May 13, 2015, 3:33:32 PM5/13/15
to raptur...@googlegroups.com
Hi Jon,

Thanks for your response!  So, I did download all files from the repo, including the ".build.sbt", but you were right that sbt did not pick up the property set here.  By typing "scalaSource" in sbt, I confirmed that it was in fact looking for /src/main/scala.

It was easy to fix, though.  Sbt was expecting a file named "build.sbt" (without the leading ".").  Once I fixed that, sbt recognized everything.

Now I'm getting an interesting compile error.  Here's a screenshot that shows it best:


This seems to be an issue with how this code is written vs the code in "rapture-data".  I guess I'm most confused by how you were able to compile this without issue whereas I'm getting compile errors.  Thoughts?

Josh
Reply all
Reply to author
Forward
0 new messages