Is it conceivable to use Maven to build a scala-gwt project?

90 views
Skip to first unread message

Nate Bauernfeind

unread,
Apr 4, 2012, 12:55:02 PM4/4/12
to scal...@googlegroups.com
I much prefer dependency management over modifying ant build scripts. Do you guys foresee any issues using the gwt-maven-plugin and the scala compiler plugin with the newest versions of these jars? (And, obviously, the appropriate parameterization for the two of them?)

Grzegorz Kossakowski

unread,
Apr 4, 2012, 2:03:07 PM4/4/12
to scal...@googlegroups.com
On 4 April 2012 18:55, Nate Bauernfeind <nate.bau...@gmail.com> wrote:
I much prefer dependency management over modifying ant build scripts. Do you guys foresee any issues using the gwt-maven-plugin and the scala compiler plugin with the newest versions of these jars? (And, obviously, the appropriate parameterization for the two of them?)

Hi Nate,

Good to see you again. :-)

I think Maven should work just fine. I heard from Josh that he fixed Maven plug-in for scala compiler to work with master version of Scala so you definitively should look for version that includes that fix (I believe it's just a latest release).

Let us know how it went. Probably forking samples and trying to compile with Maven would be a great exercise. If something doesn't work with Scala compiler then let me know. I might be able to help.

PS. I'd like to merge your uibinder work into scalagwt branch as outlined before. Did you test your changes with Showcase sample? Would like to work on porting bits that depend on UiBinder from Java to Scala?

--
Grzegorz Kossakowski

Baldur Norddahl

unread,
Apr 4, 2012, 2:06:32 PM4/4/12
to scal...@googlegroups.com
I just want to mention that I got a working sbt build script for my own private project. I am not ready to contribute the current script as it needs more work. But when we get a 1.0 release I will work on polishing it for use by others.

Baldur

Aaron Novstrup

unread,
Apr 4, 2012, 2:59:14 PM4/4/12
to scal...@googlegroups.com
I toyed with sbt for compiling the samples last year as well. I didn't
get it working, but my scripts may be a reasonable starting point for
a motivated contributor. :)

https://github.com/anovstrup/scalagwt-sample/tree/sbt

The branch will need to merge from the latest master, obviously.

Clint Gilbert

unread,
Apr 4, 2012, 4:03:08 PM4/4/12
to scal...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm willing to test building with Maven in a couple of days. (Maven
support is essential for my group at the moment.)

On 04/04/2012 02:03 PM, Grzegorz Kossakowski wrote:
> On 4 April 2012 18:55, Nate Bauernfeind

> <nate.bau...@gmail.com <mailto:nate.bau...@gmail.com>>


> wrote:
>
> I much prefer dependency management over modifying ant build
> scripts. Do you guys foresee any issues using the gwt-maven-plugin
> and the scala compiler plugin with the newest versions of these
> jars? (And, obviously, the appropriate parameterization for the
> two of them?)
>
>
> Hi Nate,
>
> Good to see you again. :-)
>
> I think Maven should work just fine. I heard from Josh that he
> fixed Maven plug-in for scala compiler to work with master version
> of Scala so you definitively should look for version that includes
> that fix (I believe it's just a latest release).
>
> Let us know how it went. Probably forking samples and trying to
> compile with Maven would be a great exercise. If something doesn't
> work with Scala compiler then let me know. I might be able to
> help.
>
> PS. I'd like to merge your uibinder work into scalagwt branch as
> outlined before

> <https://groups.google.com/d/msg/scalagwt/UaJg9riNmDo/lrWVB0RG6iwJ>.


> Did you test your changes with Showcase sample? Would like to work
> on porting bits that depend on UiBinder from Java to Scala?
>
> -- Grzegorz Kossakowski
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk98qPwACgkQ5IyIbnMUeTu4sgCfaKiCoV6O+TwTltgrVHLzKKB+
qbIAn2tn4nqx5p0EgWAvvyzBZ+xzgbJ0
=qu5U
-----END PGP SIGNATURE-----

Nate Bauernfeind

unread,
Apr 7, 2012, 2:41:31 PM4/7/12
to scal...@googlegroups.com
My current finding is that the plugin refuses to like the version "2.10.0-scalagwt-SNAPSHOT" and consistently tries to strip off the SNAPSHOT part before resolving the dependency. "2.10.0-SNAPSHOT" is completely fine though. I'm using version 2.15.2 of the maven-scala-plugin. So that's pretty annoying.

Also, another issue I have is that if I run "ant distpack-maven" on scalagwt-scala all targets that include scaladoc tags usually end in a java out of heap space exception. I can't seem to modify the jvm.args and have it take that into account. I've gotten around this by removing all instances of that tag.

Grzegorz Kossakowski

unread,
Apr 7, 2012, 2:50:24 PM4/7/12
to scal...@googlegroups.com
On 7 April 2012 20:41, Nate Bauernfeind <nate.bau...@gmail.com> wrote:
My current finding is that the plugin refuses to like the version "2.10.0-scalagwt-SNAPSHOT" and consistently tries to strip off the SNAPSHOT part before resolving the dependency. "2.10.0-SNAPSHOT" is completely fine though. I'm using version 2.15.2 of the maven-scala-plugin. So that's pretty annoying.

Hmmm, I think it's a general problem with Maven. I observed similar behaviour when building Scala IDE and it wasn't due to maven-scala-plugin. I haven't investigated it further because this issue poped up only in tests so I disabled them and moved on. It would be good to investigate it further. I'll ping Josh Suereth as I think he was experiencing similar problem in the past too.

Also, another issue I have is that if I run "ant distpack-maven" on scalagwt-scala all targets that include scaladoc tags usually end in a java out of heap space exception. I can't seem to modify the jvm.args and have it take that into account. I've gotten around this by removing all instances of that tag.

That's weird. It work fine for me. Does setting:

ANT_OPTS='-Xms3G -Xmx3G -Xss1M -XX:MaxPermSize=192M -XX:+UseParallelGC'

help? Anyway, disabling scaladoc is probably a good idea. It's fairly slow.

--
Grzegorz Kossakowski

Nate Bauernfeind

unread,
Apr 7, 2012, 11:45:53 PM4/7/12
to scal...@googlegroups.com
tldr, want to use maven for scalagwt? https://github.com/nbauernfeind/scalagwt-maven-hello-world

First, the old version of "org.scala-tools" % "maven-scala-plugin" (2.15.2 or older) does not properly parse the versioning. The author David Bernard has decided to move this tool under a different name "net.alchim31.maven" % "scala-maven-plugin" % "3.0.1" -- in case anyone is still having the improper version parsing problem, the latest build supports more than one '-'.

I had to specify the exact version of gwt-dev as it seems like the gwt-maven-plugin was looking for 2.4.0 exactly (no -scalagwt-SNAPSHOT included). If specified exactly it works fine, but I get this warning "[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts"

It appears that intellij's hosted mode may partially work. As long as the latest jribble has been built I was able to set breakpoints, and modify the state (I modified the dom from the scala expression window... amazingly powerful.). I think what works or not is yet to come, but I think this is a fantastic start (I thought it wouldn't work at all).
Reply all
Reply to author
Forward
0 new messages