Comments (4)
This is really strange: using mvn package
instead of mvn package -Ddraft
prior to the cd client && mvn gwt:run -Ddev
works, as well as using the _dev
module (i.e. changing the gwt-maven-plugin
configuration or using mvn gwt:run -Ddev -Ddraft
).
In other words: either the *.nocache.js
already exists with a user.agent
property (mvn package
vs. mvn package -Ddraft
, or your change to the _dev
module used with -Ddraft
), or the module used in DevMode does not need the user.agent
property (mvn gwt:run -Ddev -Ddraft
).
In other cases (the *.nocache.js
exists but doesn't contain the user.agent
property, or it doesn't exists and the GWT module does not restrict user.agent
to a single value), it'll fail with the mentioned exception.
Or did I just totally screw up my test project?
Anyway, the _dev
module is supposed compile as fast as possible (for use with the draft
profile), so we should not add another permutation.
from gwt-maven-archetypes.
In a clean project, I confirm that mvn gwt:run -Ddev -Ddraft
works after a mvn package -Ddraft
.
I can also confirm that mvn gwt:run -Ddev
works after a mvn package
.
In other words, -Ddraft
must match between the mvn package
and the mvn gwt:run
.
Will investigate further what's going on exactly.
from gwt-maven-archetypes.
Ok, mvn gwt:run -Ddev -Ddraft
works after a mvn package -Ddraft
.
I also try some workflows :
mvn package
andmvn gwt:run -Ddev
: OKmvn package
andmvn gwt:run -Ddev -Ddraft
: OKmvn package -Ddraft
andmvn gwt:run -Ddev
: not OKmvn package -Ddraft
andmvn gwt:run -Ddev -Ddraft
: OK
Moreover adding gecko1_8
in App_dev.gwt.xml
(<set-property name="user.agent" value="safari,gecko1_8" />
) for the above bad case solves the problem.
from gwt-maven-archetypes.
OK.
The issue is that, because the module hasn't changed, DevMode uses the *.nocache.js
previously generated by mvn package
; when generated with -Ddraft
, it won't contain a user.agent
property, as it's fixed to a single value; but if the module used in DevMode has several possible values for the property, it'll try to resolve the actual current value by using the property provider that it expects to find in the *.nocache.js
.
To fix the issue, you then have to either:
- use a module that does not need the
user.agent
property when launching DevMode (this is why it always works when usingmvn gwt:run -Ddev -Ddraft
) - make sure the
*.nocache.js
being used contains auser.agent
property provider (this is why it always works when you add a value to theuser.agent
propertu of the_dev
module used in-Ddraft
)
There are many ways #.2 above can be achieved:
- do not use
-Ddraft
in the initialmvn package
- run
mvn clean compile
beforemvn gwt:run -Ddev
(this will work after c2cec22, otherwise usemvn clean compile -pl client -am
on the root module) - or actually, simply use
mvn package -Dgwt.compiler.skip
instead ofmvn package -Ddraft
.
I'll update the README with that last bit.
I didn't use it initially because I had issues with it in our project, with a similar but not identical layout (we use a jar
packaging and then the maven-assembly-plugin
to build the WAR, and when we don't gwt:compile
, there's absolutely nothing to put in the WAR and it fails; this is not the case here: the maven-war-plugin
doesn't fail when it has nothing to put in the WAR, it just creates an “empty except the META-INF/MANIFEST.MF
file” WAR)
from gwt-maven-archetypes.
Related Issues (20)
- Generate 1.0-SNAPSHOT archetype not working HOT 3
- External modules in super dev mode compilation HOT 6
- Should be updated to use GWT 2.8.0 release instead of 2.8.0-rc1 HOT 1
- modular-webapp artifact does not work with env-dev maven profile HOT 2
- How to add Spring Boot to this GWT project? HOT 2
- generated sources are not available to the gwt compiler HOT 1
- What to enter for package on the command line? HOT 1
- mygwtnew-server cannot be added to tomcat sever ? HOT 1
- dagger-guice-rf-activities archetypes not working HOT 2
- Why is codehaus maven plugin used in archetype for ltgt maven plugin? HOT 11
- [ERROR] Failed to execute goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-9:generate-module (default-generate-module) on project project-client: Execution default-generate-module of goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-9:generate-module failed: A required class was missing while executing net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-9:generate-module: Lorg/sonatype/plexus/build/incremental/BuildContext; HOT 2
- Fails on mvn clean install HOT 4
- no clear/seamless way or mechanism to shutdown the running jetty and codeserver HOT 1
- Newly created archetype has build failure HOT 1
- mvn jetty:run: Address already in use HOT 4
- Is there any sample to using ltgt plugin for GWTP? HOT 1
- Is 2.9.0 ready?
- ${module.toLowerCase()} isn't replaced but lands somewhere in the source as is HOT 2
- Archetype for gwt-lib HOT 4
- update version of GWT to 2.11.0 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-archetypes.