Maven plugin ,different versions of widgets problem

Hi to everyone,
First of all I want to aploagize if I am about to ask something that has already been asked. I’ve tried to search the forum and to google for solution but with no luck. Could be because I am new to Vaadin…

Since vaadin (or better to say gwt) compilation is expencive and last long, what I need to is to make it somhow faster for the development profile. The way I want to accomplish this is to add a user.agent elemnt in a *.gwt.xml widget. This user-agent element should be only added for the local development profile and it would be up to a user what to specify here (trough local settings.xml) depending on which browser it is using.

I’ve started with the simple solution with having the *.gwt.xml widget in the resource directory and then using the maven to filter this file. This way the local profile could add (for example) ‘’. The production profile will add nothing and that way make so that in the production we have all browsers supported.

Problem with this approach is that altough the file gets filtered and copied to the output source(I get that from maven log with -X flag) it still gets overwriten with the original file before it was beeing filtered(also information from the maven log) and this is done because of vaadin-maven-plugin.

So since this has failed I’ve tried to do the folowing:
to tell the vaadin-maven-plugin which module to use with:

<modules>
<module>com.bla.bla.web.AppWidgetSet.gwt.xml</module>
</modules>

The idea here is to make vaadin-maven-plugin to use a certain widget. Later I can filter which widget it is used with maven properties.

The problem with this is that I am getting strange exception:

Failed to execute goal com.vaadin:vaadin-maven-plugin:7.1.5:clean (default) on project webface: Execution default of goal com.vaadin:vaadin-maven-plugin:7.1.5:clean failed. NullPointerException -> [Help 1]

same exception with more details:

ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:7.1.5:clean (default) on project webface: Execution default of goal com.vaadin:vaadin-maven-plugin:7.1.5:clean failed. NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:7.1.5:clean (default) on project webface: Execution default of goal com.vaadin:vaadin-maven-plugin:7.1.5:clean 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:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    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)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.vaadin:vaadin-maven-plugin:7.1.5:clean failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 25 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.GwtCleanMojo.execute(GwtCleanMojo.java:53)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    ... 26 more

Here is the relevant parts of my configuration:

pom.xml dependecies :

          <!--vaadin-->
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-server</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client-compiled</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client-compiler</artifactId>
                <version>7.1.5</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-push</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-themes</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.vaadin.addons</groupId>
                <artifactId>filteringtable</artifactId>
                <version>0.9.1.v7</version>
            </dependency>

vaadin.version=7.1.5

vaadin-maven-plugin configuration:

                [code]
com.vaadin vaadin-maven-plugin ${vaadin.plugin.version} -Xmx512M -Xss1024k
                        <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
                        <hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets
true ${vaadin.draft.compile} true OBF true http://localhost:8080/ com.bla.bla.web.AppWidgetSet.gwt.xml clean resources update-theme update-widgetset compile [/code]

Note that if I remove the “modules” part of the plugin configuration everything is working ok, but full compilation still gets triggered.

Do you have any idea why I am getting this error and what to do/try next? While brosing this forum I found a topic where it is said that vaadin-maven-plugin is the same as gwt-maven-plugin. That is the reasoin why I tried to make it use the widget that I want on this way. I have not found any documentation for this plugin so I am not sure if there is an other way to do the same.

Any suggestion?
Is there any documentation for this plugin that is avalible. Why is it throwing null pointer exception?

I Have the same problem. Has it been solved?

My simple solution in my case is use a Maven profile. I created a widgetset-compilation profile where I put the vaadin-maven-plugin configuration. If I want to compile my widgetset I just run my project with the profile widgetset-compilation.