Widgetset Compilation and Widgetset Inhertance in Maven Project Modules

Hey Vaadin-Guys!

I need some help for my Widgetset-Maven-Module-Problem.


My Intention:

I have a Maven Module Project like this:



Widgetset-Project-Parent

|-
pom.xml

|-
Widgetset-Project-Basic

|-
pom.xml

|-
Widgetset-Project-Extended-Desktop

|-
pom.xml

|-
Widgetset-Project-Extended-Mobile

|-
pom.xml

My plan is that i have the Basic-Widgetset for my Extensions, that i need on Desktop and on Mobiles.
In the Extended-Desktop and Extended-Mobile i can create special Implementations for the Target-Environments. (They inherit the basic widgetset)

The intended Widgetset-Project-Extended-Desktop.gwt.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module>
    <!-- Widgetset-Project-Basic: Inherits com.vaadin.DefaultWidgetSet -->
    <inherits name="de.company.project.widgetset.basic.Widgetset-Project-Basic" />

    <inherits name="some.other.Widgetsets" />
</module
[/code]This File should be generated from vaadin-maven-plugin at "update-widgetset"-Goal.
Here is the pom.xml of the Widgetset-Project-Extended-Desktop[code]
<project>

   <artifactId>widgetset-desktop</artifactId>
........
........
........

<dependencies>
    
        <dependency>
            <groupId>de.company.project</groupId>
            <artifactId>widgetset-basic</artifactId>
            <version>${project.version}</version>
            <type>jar</type>
        </dependency>
    
         <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client</artifactId>
            <scope>provided</scope>
        </dependency>
        
</dependencies>

<build>
  <plugins>
     <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.plugin.version}</version>
                <configuration>
                    <extraJvmArgs>-Xmx1g -Xss4024k</extraJvmArgs>
                    <!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This
                        way compatible with Vaadin eclipse plugin. -->
                    <webappDirectory>${basedir}/src/main/resources/VAADIN/widgetsets</webappDirectory>
                  
                    <hostedWebapp>${basedir}/src/main/resources/VAADIN/widgetsets</hostedWebapp>
                    <!-- Most Vaadin apps don't need this stuff, guide that to target -->
                    <persistentunitcachedir>${project.build.directory}</persistentunitcachedir>
                   
                    <deploy>${project.build.directory}/gwt-deploy</deploy>
                    <!-- Compile report is not typically needed either, saves hunreds of
                        mb disk -->
                    <compileReport>false</compileReport>
                    <noServer>true</noServer>
                    <!-- Remove draftCompile when project is ready -->
                    <draftCompile>false</draftCompile>
                    <theme>mogenaTheme</theme>
                    <style>OBF</style>
                    <strict>true</strict>
                    <runTarget>http://localhost:8080/</runTarget>
                    <!-- here is maybe one of my Problems: If I remove the Comments at this modules-Tag to reach that these both Modules are in my *.gwt.xml
                         i get an Exception in my Maven Build at the goal vaadin.maven-plugin:resources
                        
                         If i trust to the automatic resolution i get only my Widgetset-Desktop but not my Widgetset-Basic!
                     -->
                    <!-- if you don't specify any modules, the plugin will find them -->
                    <!-- <modules>
                      <module>de.company.project.widgetset.desktop.AppDesktopWidgetSet</module>
                      <module>de.company.project.widgetset.basic.AppBasicWidgetSet</module>
                    </modules> -->

                </configuration>
                <executions>
                    <execution>
                        <configuration>
                            <!-- if you don't specify any modules, the plugin will find them -->
                            <!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module>
                                </modules> -->
                        </configuration>
                        <goals>
                            <goal>clean</goal>
                            <goal>resources</goal>
                            <goal>update-theme</goal>
                            <goal>update-widgetset</goal>
                            <goal>compile-theme</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
         <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.vaadin</groupId>
                                        <artifactId>
                                            vaadin-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [7.3.2,)
                                        </versionRange>
                                        <goals>
                                            <goal>resources</goal>
                                            <goal>update-widgetset</goal>
                                            <goal>compile</goal>
                                            <goal>update-theme</goal>
                                            <goal>compile-theme</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <configuration>
                        <wtpversion>2.0</wtpversion>
                        <additionalProjectnatures>
                            <projectnature>com.vaadin.integration.eclipse.widgetsetNature</projectnature>
                        </additionalProjectnatures>
                        <additionalBuildcommands>
                            <buildcommand>com.vaadin.integration.eclipse.widgetsetBuilder</buildcommand>
                            <buildcommand>com.vaadin.integration.eclipse.addonStylesBuilder</buildcommand>
                        </additionalBuildcommands>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>

So my plan…

My Problem is that the Automatic Widgetset-Resulution of the vaadin-maven-plugin downt find my Basic Widgetset.
And i try to force this by the “”-Tag i get the following Exception at the Maven build:

[ERROR]
 Failed to execute goal com.vaadin:vaadin-maven-plugin:7.4.3:resources (default) on project emesus-app-ui-vaadin-widgetset-desktop: Execution default of goal com.vaadin:vaadin-maven-plugin:7.4.3:resources failed. NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:7.4.3:resources (default) on project emesus-app-ui-vaadin-widgetset-desktop: Execution default of goal com.vaadin:vaadin-maven-plugin:7.4.3:resources failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.vaadin:vaadin-maven-plugin:7.4.3:resources failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: java.lang.NullPointerException
    at org.codehaus.mojo.gwt.AbstractGwtMojo.getJarAndDependencies(AbstractGwtMojo.java:295)
    at org.codehaus.mojo.gwt.AbstractGwtMojo.getGwtUserJar(AbstractGwtMojo.java:274)
    at org.codehaus.mojo.gwt.AbstractGwtModuleMojo.readModule(AbstractGwtModuleMojo.java:186)
    at org.codehaus.mojo.gwt.GwtResourcesBaseMojo.getAllResourceFiles(GwtResourcesBaseMojo.java:79)
    at org.codehaus.mojo.gwt.GwtResourcesMojo.execute(GwtResourcesMojo.java:57)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    ... 20 more
[ERROR]

[ERROR]

[ERROR]
 For more information about the errors and possible solutions, please read the following articles:
[ERROR]
 [Help 1]
 http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]

[ERROR]
 After correcting the problems, you can resume the build with the command
[ERROR]
   mvn <goals> -rf :emesus-app-ui-vaadin-widgetset-desktop

I have googled alot… But it looks, that nobody has a Project-Configuration like me…
Thank you for your help!

Greetings,
Shawn