Packaging war with new gwt maven plugin (having mi

2019-07-24 18:12发布

I've stated using Thomas Broyer's gwt maven plugin as it allows me to run gwt 2.8-rc2. I've got it running with the codeserver fine and with minimum effort.

However now I'm trying to figure out how to use it to do a full compile and package.

Simply running maven install (I expected this to work as it does work with the default) does not actually run the gwt compile.

Then it talks about various packaging formats etc and I'm not sure why these are necessary?

I assume someone has got this plugin packaging the war and has also migrated from the original plugin...

This is my plugin config - I am using skipModule as I've already got a module configured the way the other plugin expects.

                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>1.0-rc-6</version>
                    <extensions>true</extensions>
                    <configuration>
                        <moduleName>com.afrozaar.ashes.web.AshesWeb-safari</moduleName>
                        <skipModule>true</skipModule>
                        <style>DETAILED</style>
                        <!-- <logLevel>DEBUG</logLevel> -->
                        <classpathScope>compile+runtime</classpathScope>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-servlet</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                    </dependencies>
                </plugin>

1条回答
倾城 Initia
2楼-- · 2019-07-24 18:36

You're missing "executions" in your plugin configuration to run the compile goal (works the same as with the CodeHaus plugin).

My plugin works better when you separate client and server code into distinct Maven modules, which is why this setup is not clearly documented (because I actively discourage it). You can have a look at the samples in the GWT git repository to find examples similar to your case though.

BTW, I believe you can use rc2 with the CodeHaus plugin rc1; that's probably why you added those dependencies, which are useless with my plugin.

See also https://tbroyer.github.io/gwt-maven-plugin/migrating.html

查看更多
登录 后发表回答