--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/codehaus-mojo-gwt-maven-plugin-users/-/npnUeQyrLXkJ.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
Placing the super-sources in src/main/resources may also cause filter-related "surprises."
Also feel free to propose a fourth alternative.
I'd propose keeping non-super sources in src/main/java, public resources in src/main/resources, and super-sources in src/main/super. As different as GWT projects may be from other "normal" Java projects, I think there's still value in keeping to convention if it's possible and sensible to do so.
Hi Thomas,I develop GWT API projects myself and I use and would always go for alternative 2(or 3, see below). I did not use alternative 1 as - strictly speaking - it is against the convention. I just like to have Java and resources separated. I do just what you seem to be doing: I add src/main/java as a resource to the POM in order to have the Java sources for GWT compilation and get an easily built and packaged GWT API/libary.I actually cannot give a clear vote regarding alternative 2 or 3 since I do not use super sources myself at the moment. Do you have a particular use case for having them in a separate source directory?
By the way: I use the same separation/layout for src/test/*.
This is option 3 then (you agreed that "It comes without saying (for me at least) that Java sources would go into src/main/java", and I suppose that by "public resources" you mean not only **/public/** but also *.ui.xml and the like)
--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/codehaus-mojo-gwt-maven-plugin-users/-/JQW-Mr_Kap4J.
I would love to have :
src/main/java
src/main/resources
src/main/webapp
src/main/gwt
(src/main/super )
The reason I like to dedicate a whole folder to gwt modules is because I think of them as real entities. They are not mere source files and also not just config files. Also in our mobile projects for hybrid apps we tend to have a lot of them. At least one per target and a slew of others with different debug and testing settings, so it is not too outlandish to have a separate folder for modules.
In the same vain one could argue that super-source files being a gwt concept (correct me if I am wrong) would also belong in the gwt folder . That would be fine for me, put them wherever. Maybe even don't have a standard place for super-sources. They are really such a special case...
If this alternative is too weird for people , I vote for 3 :) .
Option 3:The most maven style !Note that until last version of GEP *.gwt.xml files had to stay in src/main/java to be found when launching the Application.
--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/codehaus-mojo-gwt-maven-plugin-users/-/5ApZ9UDopfUJ.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
Le 16 nov. 2012 17:59, "Daniel Kurka" <kurka....@gmail.com> a écrit :
>
> Hi Thomas,
>
> I have been out on devoxx and haven`t had time to cast a vote yet.
>
> I think its a good idea to go with a separate package like src/main/super for super sourcing.
>
> Why are we thinking of moving resources out of src/main/java,
Depends where you come from ;-)
Maven users where (almost) ALL complaining when GPE didn't see their files in src/main/resources.
If you think of src/main/java as the set of files processed by javac, then gwt.xml, ui.xml and the like should obviously go to resources (or some other, GWT specific, folder).
> what is the main advantage here?
Separation of concerns (even though java sources will end up processed the same as gwt.xml, they're also processed by javac, and generally not filtered), filtering, freedom (e.g. one might want to put the gwt.xml at the root of resources and define <targetPath> to relocate them in the appropriate package in the generated JAR, it'd make navigation easier in Eclipse – IntelliJ has a package presentation which makes this pointless –; I could see me doing that for super-sources in case I have a single module in my lib)
Honestly, it's mostly a matter of taste, and both would work and in 99% of the cases, but src/main/resources feels more "mavenish" (note: I was a proponent of src/main/java some time ago, I now believe it was mostly due to tooling).
Poll results: option 3, aka src/main/resources + src/main/super.Bonus: it apparently works with the latest version of the GPE (wasn't the case before, where it –basically– only looked into src/main/java)
--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/codehaus-mojo-gwt-maven-plugin-users/-/JXHDJbf3zW0J.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.For more options, visit https://groups.google.com/groups/opt_out.
This is typically caused by incorrect project classpath settings (check the includes/excludes for the resources folder). It's not clear whether m2e or GPE is to blame here.-Abraham
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-...@googlegroups.com.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-...@googlegroups.com.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.For more options, visit https://groups.google.com/groups/opt_out.
To post to this group, send email to codehaus-mojo-gwt-maven-plugin...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-plugin-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
--
"Computers are useless. They can only give you answers."
- Pablo Picasso -
--You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To post to this group, send email to codehaus-mojo-gwt-maven-plugin...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-plugin-users+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-plugin-users+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.For more options, visit https://groups.google.com/groups/opt_out.
Thomas,How does the plugin support supersource today. I've tried to piece this together from multiple searches and have something close to your option 3, but it's not clear.1). How is the plugin configured to use main/src/super?
2). If src/main/super is an overlay onto src/main/java then how does the super-souce path (which must be relative) work within the module XML? Or is it intended that you'll still do "path doubling" under super? (e.g., src/main/super/com/foo/super/com/foo/Bar.java for a module def in src/main/resources/com/foo/Foo.gwt.xml)
Also, I'll throw-in an alternative:src/main/java/resources/ (Would we ever put Android "res" here? Why is GWT any different?)gwt/super/resources/
Thanks,RB
On Tuesday, November 13, 2012 7:51:37 AM UTC-5, Thomas Broyer wrote:Hi all,
As some of view may already know, I'm porting GWT to use Maven as the build system (instead of Ant). I'm also about to "reboot" GWT+Maven integration (more to come by the end of the week, stay tuned).As part of this effort, I'm wondering which project structure to use as the default, "standard" layout for GWT projects using Maven? I'm particularly looking for advice/preferences for GWT library projects (such as GWT itself, mgwt, Errai, GXT, etc.), not much for GWT applications (the one you run the GWT Compiler on).NOTE: this poll is cross-posted to the GWT and gwt-maven-plugin groups, please answer only once! (wherever you want)The question is about where to put files such as: GWT module descriptors (*.gwt.xml), GWT "processed resources" (*.ui.xml, etc.), and super-sources.It comes without saying (for me at least) that Java sources would go into src/main/java and "public resources" (i.e. the things within **/public/**, e.g. the CSS and image files from the themes) into src/main/resources, so the "everything" below only refers to those other files listed above.Remember I'm only interested in defining the "standard layout" for GWT libraries, and please think about them as GWT-only libraries, not the kind with server-side and client/server-shared code!Note that in any case, src/main/java is also added as a resource folder (packaged within the JAR)Here are the alternatives I thought about:
- everything in src/main/java
super-sources in src/main/resources- everything in src/main/resources
- everything in src/main/resources
super-sources in src/main/super (or gwt-super, or some other name, let's discuss that later as I suspect it's a bikeshed)When casting your vote, do not hesitate to explain why you prefer that particular layout over the others, or why you don't like one of the proposed layouts. Also feel free to propose a fourth alternative.
--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-...@googlegroups.com.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-plugin-users+unsubscribe@googlegroups.com.
To post to this group, send email to codehaus-mojo-gwt-maven-plugin...@googlegroups.com.
Visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Thomas,Thanks very much for the response.First, is there any way you can share a POM from one of your projects -- or ideally point me at an entire open source project that uses it?
Many things aren't clear (to me) from the docs. Examples:1). You say add a <resource> tag.
The problem is if I add a single <resource> tag then the default src/main/resources seems to be overridden, so my guess is you mean something like the following added to the <build> tag:<resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/super</directory><targetPath>com/foo/super</targetPath></resource></resources>
And, in com.foo.Foo.gwt.xml contains<super-source path="super"/>
Again, it's a guess since I still don't have hello-supsersource working.2). The comments regarding goals are conflicting. E.g., for tests to run it's suggested to add:<execution><goals><goal>test</goal></goals></execution>But to get source-jar to run as part of install you need something like:<execution><phase>install</phase><goals><goal>source-jar</goal></goals></execution>
3). Giving up on source-jar for the moment (i.e., just having the top config), when I run tests, they just hang and timeout. In fact, if I just create a blank project from the archetype, that's what happens:[INFO] Running junit.framework.TestSuite@29edc073Process 1361122241179 is killed.[WARNING] Forked JVM has been killed on time-out after 60 seconds
4). Frequently, if I don't run clean first, the tests fails with exceptions: e.g.,[INFO] Running com.foo.FooTest[INFO] [ERROR] Failure in unit cache map load.[INFO] java.util.concurrent.ExecutionException: java.lang.StackOverflowError
Hmm, there's https://github.com/tbroyer/gwt-sandbox/blob/master/user/gwt-user-core/pom.xml but this is work in progress, and unnecessary complicated in some places. This is ongoing work to moving GWT itself to use Maven as the build system.Many things aren't clear (to me) from the docs. Examples:
1). You say add a <resource> tag.
The problem is if I add a single <resource> tag then the default src/main/resources seems to be overridden, so my guess is you mean something like the following added to the <build> tag:<resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/super</directory><targetPath>com/foo/super</targetPath></resource></resources>Yes, that's how Maven works. src/main/resources is only the default if nothing's specified.
And, in com.foo.Foo.gwt.xml contains<super-source path="super"/>Yes.Again, it's a guess since I still don't have hello-supsersource working.2). The comments regarding goals are conflicting. E.g., for tests to run it's suggested to add:<execution><goals><goal>test</goal></goals></execution>But to get source-jar to run as part of install you need something like:<execution><phase>install</phase>
<goals><goal>source-jar</goal></goals></execution>If src/main/java and src/main/super are declared as resources, then the sources will be added to the JAR, and you don't need a source-jar.
3). Giving up on source-jar for the moment (i.e., just having the top config), when I run tests, they just hang and timeout. In fact, if I just create a blank project from the archetype, that's what happens:[INFO] Running junit.framework.TestSuite@29edc073Process 1361122241179 is killed.[WARNING] Forked JVM has been killed on time-out after 60 secondsIs this from surefire:test, failsafe:integration-test or gwt:test?
4). Frequently, if I don't run clean first, the tests fails with exceptions: e.g.,[INFO] Running com.foo.FooTest[INFO] [ERROR] Failure in unit cache map load.[INFO] java.util.concurrent.ExecutionException: java.lang.StackOverflowErrorHmm, this is a "pure GWT" error, unrelated to Maven (until proven otherwise); have you searched the GWT issue tracker? Errors in Unit cache loading are "expected" when upgrading GWT or changing JVM (GWT classes don't have a serialization ID), but obviously not in other situations.
--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-...@googlegroups.com.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
Hi,I was told to contribute my ideas here ... guess this is the tread that fits best :-)First of all, I come from an Adobe Flex background and have recently had to switch to GWT. I noticed some things, that I found relatively "unclean" in the default GWT approach.What would you think about this:- Introduce a new packaging type of "gwt", which can be used for building GWT artifacts that are re-used in other maven modules.- Such a "gwt" module has gwt code in "src/main/gwt" and resources (such as CSS, JavaScript, Images, ...) in src/main/resources (Note ... no src/main/java)
- When compiling such a "gwt" artifact the java sources are compiled to "target/classes" the normal way and same applies to the copying of resources from src/main/resources (including fintering)- When packaging such a "gwt" artifact the content of src/main/gwt as well as that of target/classes is zipped up into one file containing java-sources, xml, compiled classes and resources is created.- "gwt" modules can have dependencies to jar and gwt modules (but jar artifacts can't use gwt modules).- In the web artifact the gwt compiler will use the dependencies to jar and gwt modules to compile the GWT application but will not deploy the gwt modules to the output.
Some Benefits would be:- This way we can reference server code from GWT code, but not the other way arund.
- This way the compiled application will not contain all the intermediate gwt sources, classes, xmls and other gwt-resources.
- By using the alternate source directory src/main/gwt developers will immediately see that they are working on GWT code.
Why? GWT is all about Java, why would you put your *.java anywhere else than src/main/java? particularly as you want to use the maven-compiler-plugin, which defaults to src/main/java.
My main question is to determine what constitutes a "GWT application" (vs. a GWT library) and thus where to put the gwt:compile.
My first idea was to go "flex-like" with both a "gwt-library" and "gwt-application" packagings, where the latter produces something that can be used more-or-less as a WAR overlay (either a straight WAR overlay, or using a goal similar to flexmojos:copy-flex-resources). It unfortunately has negative side-effects wrt DevMode (can't use the embedded server, can't debug several GWT apps at a time, etc.)
Nothing will prevent the "jar depends on gwt", unless you possibly add the gwt-maven-plugin with a specific goal to the non-client project; but then who will make sure you didn't forget that one too?
- This way the compiled application will not contain all the intermediate gwt sources, classes, xmls and other gwt-resources.This can already be the case if you structure your project with a clear client vs. server separation (see https://github.com/tbroyer/gwt-maven-archetypes for some examples)- By using the alternate source directory src/main/gwt developers will immediately see that they are working on GWT code.
I'm not convinced.How about the shared libraries too? They're "GWT code" (in the sense they should only use GWT-compatible code), but they're also "pure Java" code.