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 <moduleName> / <moduleShortName> into the plugin-level 
>> <configuration>, and only put them into the <executions>.
>>
>
> 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 
<id>default-cli</id>). 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:
>
> <configuration>
>     <localWorkers>6</localWorkers>
>     <skipModule>true</skipModule>
>     <draftCompile>true</draftCompile>
> </configuration>
> <executions>
>     <execution>
>         <id>compile-common</id>
>         <goals><goal>compile</goal></goals>
>         <configuration>
>             <moduleName>com.test.common</moduleName>
>         </configuration>
>     </execution>
>
>
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to