Comments (7)
It's intentionally not there, at least for the time being. The tools provided by GWT (CSS or I18N) are supposed to be one-off tools to help you bootstrap a project from existing files. At least that's how I see them; YMMV. So I don't plan to add those goals to the plugin, unless there's a huge demand for them (but you can use the exec-maven-plugin
in the mean time)
from gwt-maven-plugin.
thanks for the fast answer Thomas!
Sadly I'm having difficulties to understand what you're saying. So I'll try to repeat what I understood:
CSS or I18N generations are supplied by GWT and you do not want to provide a wrapper for them in the newer version of you're gwt-maven-plugin
, because you say that they are only helpful for migrating existing projects, not for new ones?
But there exists some other maven plugin called exec-maven-plugin
that allows to use them without you wrapping them? Could you give details how that would work?
from gwt-maven-plugin.
That's it. The CodeHaus Mojo binds them to build phases by default, and I believe this is a mistake.
As for the exec-maven-plugin
, apparently it's not powerful enough (InterfaceGenerator
outputs the class to standard output, and exec-maven-plugin
provides no way to redirect that output to a file); but the antrun-maven-plugin
should work.
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/css</sourceRoot>
<target>
<java fork="true" failonerror="true"
classname="com.google.gwt.resources.css.InterfaceGenerator"
output="${maven.project.build.directory}/generated-sources/css/net/example/client/Whatever.java" logError="true">
<classpath>
<pathentry location="${com.google.gwt:gwt-dev:jar}"/>
<pathentry location="${com.google.gwt:gwt-user:jar}"/>
</classpath>
<arg>-addPackageHeader</arg>
<arg>-typeName</arg>
<arg>net.example.client.Whatever</arg>
<arg>-css</argument>
<arg>src/main/resources/net/example/client/whatever.css</arg>
</java>
</target>
</configuration>
from gwt-maven-plugin.
Thanks for the maven-antrun-plugin pom.xml snippet! - I'll try that soon.
In the meantime I've generated myself a project from tbroyer/gwt-maven-archetypes@3f53aa7 but it sadly requires the use of the SuperDevMode booklets, a project generated from trunk containing your new gwt-maven-plugin does trigger the compiling automatically by simply refreshing the page. thats much nicer.
About the binding the codeGeneration execution to a phase in maven - what alternatives are there? If you don't bind the execution to a phase, it won't get executed during build, or will it?
from gwt-maven-plugin.
In the meantime I've generated myself a project from tbroyer/gwt-maven-archetypes@3f53aa7 but it sadly requires the use of the SuperDevMode booklets, a project generated from trunk containing your new gwt-maven-plugin does trigger the compiling automatically by simply refreshing the page. thats much nicer.
Add a <launcherDir>
(or pass -Dgwt.codeServer.launcherDir=…
on the command-line) to the gwt-maven-plugin
in the *-client
project pointing to ${project.build.directory}/${project.build.finalName}
, or just use gwt:run
instead of gwt:run-codeserver
.
About the binding the codeGeneration execution to a phase in maven - what alternatives are there? If you don't bind the execution to a phase, it won't get executed during build, or will it?
Run it once and commit the generated file. Maybe it's not the case for CSS (and I haven't evaluated GSS yet), but for I18N the generated file can only be a starting point: you'll change return types in Constants
and parameter types in Messages
to things other than String
, you'll possibly change return types in Messages
to SafeHtml
, you'll add @AlternateMessage
and @Select
, etc.
from gwt-maven-plugin.
thanks for that hint with the <launcherDir>
tag, that works nicely!
One other problem I have observed: most of the time when I try to kill the codeserver by pressing the red stop button in eclipse it won't die and I have to kill it in htop (or the like) before a new one will successfully start (address in use error). Do you know what might cause this or how to prevent that?
About the code generation: I've never wanted to manually modify a I18N generated file (I've only used Strings as of yet..), neither CSS or RPC-Async interface - but I do by time edit the messages text files, the css files or add new methods to my RPC interface - And I very much prefer for the generated code to get updated automatically during build time. But that's a matter of developers preference I guess.
from gwt-maven-plugin.
One other problem I have observed: most of the time when I try to kill the codeserver by pressing the red stop button in eclipse it won't die and I have to kill it in htop (or the like) before a new one will successfully start (address in use error). Do you know what might cause this or how to prevent that?
That's an Eclipse issue. Eclipse force-kills processes, it doesn't ask them to gracefully shutdown, so among other things shutdown hooks aren't invoked (GWT leaves a whole lot of temp files in your temp dir) and forked processes aren't killed.
About the code generation: I've never wanted to manually modify a I18N generated file (I've only used Strings as of yet..), neither CSS or RPC-Async interface - but I do by time edit the messages text files, the css files or add new methods to my RPC interface - And I very much prefer for the generated code to get updated automatically during build time. But that's a matter of developers preference I guess.
I suppose. Note that you can continue to use those goals from the org.codehaus.mojo:gwt-maven-plugin
, without using the compile
goal, if they fit your needs (well, yes, no need for the maven-antrun-plugin
after all… I suppose I need some sleep or coffee).
from gwt-maven-plugin.
Related Issues (20)
- Version 1.0.0 do not support GWT 2.1.0 HOT 5
- Lombok not working with codeserver HOT 2
- Custom Linkers? HOT 2
- Source path from Inherited GWT.xml files are not being considered HOT 13
- GWT compilation failing with error, tried upgrading guice to 4.0 from 3.0 HOT 3
- Integration with GWT Eclipse Plugin seems partially broken HOT 6
- GWT 2.9.0 HOT 2
- GWT Multimodule modulename specificaiton HOT 1
- Redirected gwt artifacts cause a NPE when generating modules HOT 4
- Cannot compile GWT project using com.google.gwt:2.10.0-new-groupid-2 HOT 4
- API incompatibility issue with version 1.0.1 HOT 2
- Change default structure? HOT 2
- java process doesn't start. HOT 1
- Critical CVEs detected in transitive jar dependencies. HOT 1
- Validation warning, plugin should declare these Maven artifacts in `provided` scope HOT 1
- Upgrade to GWT 2.10.0 HOT 3
- goal codeserver fails when web app dependencies are managed in a BOM pom HOT 3
- [Question] How can i activate the debug logging ? because i keep getting the error: Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly HOT 5
- Release versión with GWT 2.11.0 support HOT 2
- [Question] Can I hide the devmode gui? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-maven-plugin.