Re: Multiple GWT modules in one Maven module

2017-05-09 Thread Frederik Van Hoyweghen
I tried both the command line (mvn gwt:compile) and via the IntelliJ Maven 
plugin.
Indeed, binding the execution to the prepare-package phase and running *mvn 
gwt:compile@compile-common *works, and I'm glad it does.

If I'm reading what you're saying correctly, this means that there is no 
way to invoke all the plugin executions with a simple command?
I personally expected *mvn gwt:compile* to invoke everything it needs (so 
everything that comes earlier in it's lifecycle, including the executions I 
bound to the prepare-package phase),
or am I missing something obvious?

Thanks again!

On Tuesday, May 9, 2017 at 1:26:28 PM UTC+2, Thomas Broyer wrote:
>
>
>
> On Tuesday, May 9, 2017 at 1:11:04 PM UTC+2, Frederik Van Hoyweghen wrote:
>>
>>
>>
>> On Tuesday, May 9, 2017 at 12:59:17 PM UTC+2, Thomas Broyer wrote:
>>>
>>>
>>> I wouldn't put any  /  into the 
>>> plugin-level , and only put them into the .
>>>
>>
>> That's what I figured, but it seems to be a required property (The 
>> parameters 'moduleName' for goal 
>> net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-7:compile are missing or 
>> invalid, when invoking gwt:compile).
>>
>
> How are you invoking gwt:compile? If on the command-line, then the 
> execution ID matters, and only one such execution will match (the one with 
> default-cli). But starting with Maven 3.3.1 you can specify the 
> execution id on the command-line too: "mvn gwt:compile@compile-common 
> gwt:compile@compile-foo".
>
> See 
> https://maven.apache.org/guides/mini/guide-default-execution-ids.html#Default_executionIds_for_Implied_Executions
>  and 
> https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag
>
> I defined my executions as per your example:
>>
>> 
>> 6
>> true
>> true
>> 
>> 
>> 
>> compile-common
>> compile
>> 
>> com.test.common
>> 
>> 
>>
>>
>> etc.. but it appears the executions aren't triggered (or is this an 
>> effect of the missing moduleName under configuration?). It seems I have 
>> much to learn still.
>>
>
> Rule of thumb: if a goal is (meant to be) bound to a lifecycle phase (such 
> as gwt:compile which is bound by default to the prepare-package phase; see 
> https://tbroyer.github.io/gwt-maven-plugin/compile-mojo.html; but not 
> gwt:devmode or gwt:codeserver for example), then invoke the lifecycle 
> phase, not the goal.
> Another rule of thumb: only ever invoke the lifecycle phases "package" and 
> "verify" (and "install" and "deploy" when dealing with libraries, to share 
> them with other projects / people). If you want to skip tests, pass 
> -DskipTests, if you want to skip the compilation of tests too then pass 
> -Dmaven.test.skip.
> If you know what you're doing, then feel free to break those rules; if you 
> know what you're doing.
>
> Also, have a look at Gradle rather than Maven, if that's a possibility for 
> your project(s).
>

-- 
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+unsubscr...@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.


Re: Multiple GWT modules in one Maven module

2017-05-09 Thread Frederik Van Hoyweghen


On Tuesday, May 9, 2017 at 12:59:17 PM UTC+2, Thomas Broyer wrote:
>
>
> I wouldn't put any  /  into the plugin-level 
> , and only put them into the .
>

That's what I figured, but it seems to be a required property (The 
parameters 'moduleName' for goal 
net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-7:compile are missing or 
invalid, when invoking gwt:compile).

I defined my executions as per your example:


6
true
true



compile-common
compile

com.test.common




etc.. but it appears the executions aren't triggered (or is this an effect 
of the missing moduleName under configuration?). It seems I have much to 
learn still.

-- 
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+unsubscr...@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.


Re: Multiple GWT modules in one Maven module

2017-05-09 Thread Frederik Van Hoyweghen
This indeed seems to be what I was looking for, thank you.
Are there any obvious downsides to doing it like this, with multiple 
executions?

Does it matter which specific moduleName I specify within the 
 tag, or should I just pick 1 arbitrary one there and put 
the others within the  tag?

I very much appreciate the responses and the patience ;)

On Tuesday, May 9, 2017 at 12:22:40 PM UTC+2, Thomas Broyer wrote:
>
>
>
> On Tuesday, May 9, 2017 at 11:27:25 AM UTC+2, Frederik Van Hoyweghen wrote:
>>
>> Thanks for the replies.
>>
>> I already took a look at the issue on the plugin's github: 
>> https://github.com/tbroyer/gwt-maven-plugin/issues/57 
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Ftbroyer%2Fgwt-maven-plugin%2Fissues%2F57&sa=D&sntz=1&usg=AFQjCNF_nWBU0PRbRDsCHtnr5SjxFJNUwQ>
>> Sadly, this was closed and recently labeled with a wontfix, hence me 
>> asking for help here :)
>>
>
> My first comment on this issue tells you how to do it. In case it isn't 
> clear, what I meant there is:
>
> 
>   
> compile-module1
> 
>   compile
> 
> 
>   com.example.module1.Module1
>   module1
> 
>   
>   
> compile-module1
> 
>   compile
> 
> 
>   com.example.module2.Module2
>   module2
> 
>   
> 
>
> Another possibility (if you really do want to fork one and only one GWT 
> compiler process) is to use the exec-maven-plugin's exec goal (though you 
> would have to declare your source roots as resources dirs to get your 
> sources copied to target/classes so they're present in the computed 
> ).
> (I suppose you could get something working by "hacking" into the 
> , and probably then true 
> as you'd have the staleness check only take the module configured in 
> / into account; I would discourage such "hack" 
> though)
>

-- 
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+unsubscr...@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.


Re: Multiple GWT modules in one Maven module

2017-05-09 Thread Frederik Van Hoyweghen
Thanks for the replies.

I already took a look at the issue on the plugin's github: 
https://github.com/tbroyer/gwt-maven-plugin/issues/57 

Sadly, this was closed and recently labeled with a wontfix, hence me asking 
for help here :)


On Tuesday, May 9, 2017 at 9:55:15 AM UTC+2, DavidN wrote:
>
> In my project I have many modules. What I did is simple create a gwt-lib 
> maven module per GWT module. Those modules served different purposes so it 
> made sense to split them in smaller artifacts.
>
> In some cases I moved the code around so that I join multiple modules into 
> one big module instead.
>
> Another solution you could try is to have one module that inherits all the 
> other modules. But I don't like that approach because it means you have 
> manually maintain that gwt.xml file and those other gwt.xml files as well, 
> while with the gwt-lib approach the gwt maven plugin will take care of 
> adding the inherits tags automatically (if you have the gwt-lib in your 
> dependency section).
>

I was hoping to (for the time being) avoid this exact approach. I realize 
this is the way to go, but I'm also expected to maintain full compatibility 
with our old ant build (until the maven build is as good as ready).

Should I take a look at the legacy Mojo maven plugin, or can I expect to 
come across the same hurdles with that one given my project layout?


-- 
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+unsubscr...@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.


Multiple GWT modules in one Maven module

2017-05-08 Thread Frederik Van Hoyweghen
Hey everyone,

We are currently migrating our project away from using Ant, to Maven.

Along with this migration, we also tried to follow some of the project 
structuring that is recommended for a maven project.

Our *Maven* GWT module contains multiple GWT modules, but I'm struggling 
with making this work using Thomas Broyer's GWT 
plugin: https://github.com/tbroyer/gwt-maven-plugin
I feel like this was designed specifically with the idea of having only 1 
GWT module inside a Maven module (please correct me if I'm wrong).


At first I tried this plugin configuration:


true


A
B
C
D






This doesn't work because ModuleName has to be underneath the 
 tag.
Listing the modules underneath the  tag also doesn't work, 
running gwt:compile only compiles the last module in the list:


A
B
C
D
true





Does anyone have any experience with this?

-- 
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+unsubscr...@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.