gwt-rc2: jsinterop artifact question

146 views
Skip to first unread message

Vassilis Virvilis

unread,
Aug 12, 2016, 10:13:38 AM8/12/16
to google-we...@googlegroups.com
Hi

I noticed that jsinterop is a maven artifact now that gwt-user depends on.

However when I got it (with ant+ivy) I am getting a jar that contains the java files. Is that correct. Compilation fails and I need to get jsinterop-annotations-1.0.0.jar with the actual classes to proceed.

Is that normal?


--
Vassilis Virvilis

Thomas Broyer

unread,
Aug 12, 2016, 11:52:19 AM8/12/16
to GWT Users
Not sure what you're talking about: gwt-user depends on both jsinterop-annotations "normal jar" and jsinterop-annotations "sources jar". The jsinterop dependency is only use for dependency management (I.e. versions)

Vassilis Virvilis

unread,
Aug 12, 2016, 12:10:53 PM8/12/16
to google-we...@googlegroups.com
Thanks for replying and confirming

probably a problem on my setup. Ivy does not download sources of dependencies https://issues.apache.org/jira/browse/IVY-1003

So it gets only the source with the binary jar name...

Yes I know I have to switch to maven...

    Vassilis

On Fri, Aug 12, 2016 at 6:52 PM, Thomas Broyer <t.br...@gmail.com> wrote:
Not sure what you're talking about: gwt-user depends on both jsinterop-annotations "normal jar" and jsinterop-annotations "sources jar". The jsinterop dependency is only use for dependency management (I.e. versions)

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

Thomas Broyer

unread,
Aug 12, 2016, 12:46:17 PM8/12/16
to GWT Users
<troll-or-maybe-not-so-much>
Maven?! You'll be much happier with Gradle!
</>

Thomas Broyer

unread,
Aug 12, 2016, 12:46:21 PM8/12/16
to GWT Users

Vassilis Virvilis

unread,
Aug 13, 2016, 4:33:06 AM8/13/16
to google-we...@googlegroups.com
Ok I 'll bite.

I don't have a preference maven over gradle. For me the cost of the transition (several projects) is so big that the exact details of who (maven or gradle) is going to torture me seems minor.

That said and in no particular order:

-web pages and people state that gradle is prohibitively slow. I find that hard to believe but a lot of people seems to reiterate it,

-Will I be able to maintain my own project structure (src/) or I will have to succumb to a ten level directory depth (prj/main/src/java/) like my life is not complicated enough? It's absolutely no fun to rearrange several projects just for somebody else shake. Maven looks like such an XML straitjacket that I am not sure breathing is allowed without issuing $mvn breathe first.

-How about IDE integration? I don't want to maintain the same settings (classpath, included projects) twice. Right now a custom script of mine parses .classpath eclipse files and create ant build files. Not great but it was beating the competition when maven was introducing itself into the world (~2009). How gradle/maven handles that? Should I use eclipse plugins? What about other IDE?

-Surely gradle looks saner. Is it mature enough? Or it will start the "I can't let you do that Dave" on me? Will it try to download the Internet like maven?

And yes I know - I have to do it eventually.


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

Jens

unread,
Aug 13, 2016, 7:04:31 AM8/13/16
to GWT Users

-web pages and people state that gradle is prohibitively slow. I find that hard to believe but a lot of people seems to reiterate it,

Old versions yes, but newer versions allow you to start a Gradle deamon as part of the first build. That deamon then speeds up follow up builds.

 
-Will I be able to maintain my own project structure (src/) or I will have to succumb to a ten level directory depth (prj/main/src/java/) like my life is not complicated enough? It's absolutely no fun to rearrange several projects just for somebody else shake. Maven looks like such an XML straitjacket that I am not sure breathing is allowed without issuing $mvn breathe first.

Of course! Gradle has lots of conventions but you can change them all with a few lines.

 
-How about IDE integration? I don't want to maintain the same settings (classpath, included projects) twice. Right now a custom script of mine parses .classpath eclipse files and create ant build files. Not great but it was beating the competition when maven was introducing itself into the world (~2009). How gradle/maven handles that? Should I use eclipse plugins? What about other IDE?

There are IDE plugins for Eclipse. There was a good one maintained by the spring guys but now gradle has its own official eclipse plugin: https://gradle.org/eclipse . IntelliJ brings its own Gradle integration as part of IntelliJ. If nothing helps Gradle has a plugin to generate project files for Eclipse / IntelliJ and allows you to customize these project files. That way you can manually configure Eclipse / IntelliJ in case automatic import does not work for your project because its too complicated to setup (like GWT for example)

 
-Surely gradle looks saner. Is it mature enough? Or it will start the "I can't let you do that Dave" on me? Will it try to download the Internet like maven?

Gradle build scripts are Groovy Scripts. So while the syntax of Gradle scripts look like a DSL its actually script code. You can even write Java code inside the build files. So you can do everything you want with Gradle. 

Gradle only downloads itself if needed (you have a generated shell script in your project that people can use even if they have not gradle installed), the plugins you have defined in your build file and the dependencies you need for your project.


IMHO Maven was "good" 10 years ago, but today you better stick with Gradle.

-- J.

Ümit Seren

unread,
Aug 13, 2016, 9:22:53 AM8/13/16
to GWT Users
I was considering of switching from maven to gradle 

So I was wondering if there is a best practice gradle project structure/setup for GWT similar to Thomas' maven archetypes (https://github.com/tbroyer/gwt-maven-archetypes) ? 
Is there a good gradle gwt plugin out there (I only found this one: https://steffenschaefer.github.io/gwt-gradle-plugin/doc/0.1/) similar to Thomas' excellent gwt-maven-plugin ?

Thomas Broyer

unread,
Aug 13, 2016, 9:28:48 AM8/13/16
to GWT Users
In terms of project structure I think you'd better do the same (three subproject) but I don't have any experience with GWT+Gradle (yet). Just wanted to note that there's also the Putnami plugin.

Vassilis Virvilis

unread,
Aug 13, 2016, 1:37:19 PM8/13/16
to google-we...@googlegroups.com
Jens thanks for the detailed answer.

Looks like there is no show stopper. After all I suppose all the build systems will behave eventually after driving 1 or 2 people insane...

As I understand the next logical step is to install a gradle plugin and see what happens. The possibility to go in the opposite direction and from the gradle configuration create the eclipse .project and .classpath files is also interesting and may prove a lifesaver in some cases.

 


On Sat, Aug 13, 2016 at 4:28 PM, Thomas Broyer <t.br...@gmail.com> wrote:
In terms of project structure I think you'd better do the same (three subproject) but I don't have any experience with GWT+Gradle (yet). Just wanted to note that there's also the Putnami plugin.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

Gilberto

unread,
Aug 17, 2016, 12:55:45 PM8/17/16
to GWT Users
In my experience, Maven is pretty easy to understand and to deal with when you start a project from day 0 using it. When you try to migrate a project with its own build structure, with "crazy-or-not" build steps, then you will struggle A LOT with Maven to get the things done.

The XML aspect of Maven is not a problem when your build is stable enough. If you need/want to change your build frequently, I'd say you probably have serious problems with your project, or you really have a very special case that Maven wouldn't help anyway.

In summary: if you follow the Maven way™, you have no reasons to migrate away from it. But if you want custom build steps or project structure, and/or if you mix more stuff on your build steps (like deploy steps), similar to what is common to ANT builds, then Maven is not the best tool for you.
Reply all
Reply to author
Forward
0 new messages