Comments (4)
Actually, I think it's already possible:
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<moduleName>it.test.E2E_dev</moduleName>
</configuration>
</execution>
</executions>
</plugin>
(in a profile)
See http://maven.apache.org/guides/mini/guide-default-execution-ids.html
With a file src/main/resources/it/test/E2E_dev.gwt.xml
(or something similar, e.g. a src/main/modules
configured as a <resource>
with a <targetPath>it/test</targetPath>
) like:
<module rename-to='e2e'>
<inherits name='it.test.E2E' />
<set-property name='user.agent' value='safari' />
</module>
(you could also use filtering instead of hard-coding the rename-to
and name
values)
I'll reopen the issue if that doesn't work.
Of course, you could also just have a module in your tree with a <set-property name='user.agent' value='${gwt.user.agent}' />
, inherited in your src/main/module.gwt.xml
, and use filtering (with your gwt.user.agent
property defaulting to, e.g., ie8,ie9,gecko1_8,safari
)
…or simply not use generate-module
(set <skipModule>true</skipModule>
in the plugin's configuration)
…or even use filtering directly on the moduleTemplate
(it defaults to src/main/module.gwt.xml
but is configurable)
I don't really want to encourage this as it goes against The Maven Way™ of not varying the produced artifact. It should be possible, because alternatives are impractical at best (ideally, you should have a distinct Maven module specific to your user.agent=safari
compilation), but it shouldn't be too easy or built-in.
from gwt-maven-plugin.
You are right, your default-compile configuration works as you expected.
What actually puzzles me is this:
- If I set
moduleName
to the module's real name like "it.test.E2E", the plugin seems to infer that the GWT configuration must be in a file named "module.gwt.xml" (literally). If "module.gwt.xml" doesn't exist, the plugin doesn't complain, but if a module configuration is present in a file named "it.test.E2E.gwt.xml", it is ignored. - In contrast, if
moduleName
is set to something different like "it.test.E2E_draft", that name is used as is, just appended with ".gwt.xml".
Otherwise I agree that having two different profile-dependent artifacts ending up in the same target directory is not the best solution as it requires "mvn clean" when switching configurations.
from gwt-maven-plugin.
The problem is lack of documentation.
moduleName
is used in many goals:
-
generate-module-metadata
forgwt-lib
packaging, -
compile
forgwt-app
packaging, -
and
add-super-sources
(whenrelocateSuperSources
is set totrue
),add-test-super-sources
(whenrelocateTestSuperSources
is set totrue
) andgenerate-module
for
gwt-lib
andgwt-app
packagings.
generate-module
uses moduleName
as its output, overwriting any such file that could be present in the project resources.
All other goals use moduleName
as their input, looking for a file with the appropriate name or assuming one is present.
from gwt-maven-plugin.
Ah, I see, thanks for clarifying.
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.