Comments (3)
Ok. As workaround I use the following configuration for my project. The configuration for maven-jar-plugin
is necessary because the compilation result includes the /gwt
and /get-units
foldes that are relative big
<packaging>gwt-lib</packaging>
...
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0-rc-3</version>
<extensions>true</extensions>
<configuration>
<moduleName>org.jresearch.logbackui.gwt.fragment.module</moduleName>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<webappDirectory>${project.build.directory}/classes/META-INF/resources</webappDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/META-INF/gwt*/*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
from gwt-maven-plugin.
Your workaround would package all your sources and compiled Java classes too in the JAR, so I'd have rather compiled to some directory separate from ${project.build.outputDirectory}
(equivalent to the ${project.build.directory}/classes
you used) and configured that directory as the classesDirectory
for the maven-jar-plugin
.
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0-rc-3</version>
<extensions>true</extensions>
<configuration>
<moduleName>org.jresearch.logbackui.gwt.fragment.module</moduleName>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<webappDirectory>${project.build.directory}/${project.build.finalName}/META-INF/resources</webappDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>${project.build.directory}/${project.build.finalName}</classesDirectory>
</configuration>
</plugin>
You should be able to move the gwt-unitCache
dir using:
<systemProperties>
<gwt.persistentunitcachedir>${project.build.directory}/gwt/unitCache/</gwt.persistentunitcachedir>
</systemProperties>
No idea where the gwt
folder is coming from though…
An alternative is to use a distinct Maven module that would depend on the gwt-app
module and use dependency:unpack
to "repackage" it as web fragment in a JAR.
That actually feels much cleaner.
Anyway, that's an interesting proposal, and maybe the gwt-app
packaging should enable generating a JAR instead of, or in addition to, the WAR, with just a boolean property. I don't think this should be the default though (nor that it warrants a new packaging type). JsInterop will make it easier to create JS libs though, and it might make sense to create a gwt-jslib
packaging type then, but I'd rather wait for GWT 3.0, as building JS libs from GWT still isn't a common use case with GWT 2.x and JsInterop isn't there yet (soon, but not yet).
from gwt-maven-plugin.
I think using an additional module to turn the gwt-app
into a web-fragment jar
is the best solution; otherwise Maven is likely to cause issues with dependencies being transitive (and as a result including client-side dependencies into the webapp's WEB-INF/lib
alongside the web-fragment JAR)
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.