saiddfhi / gwt-maven

Automatically exported from code.google.com/p/gwt-maven
0 stars 0 forks source link

filtered resources are overwritten #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is this Maven 1 or Maven 2?
Maven 2

What steps will reproduce the problem?
1. create a html page in src/main/webapp like about.html and set some
properties which maven will filter (eg ${pom.version}
2. run a war-packaging
3. see classes for about.html where the properties are filtered
4. see war file where you can find the original about.html without filtering

What is the expected output? What do you see instead?
a filtered about.html

What version of the product are you using? On what operating system?
2.0-beta6 on Win XP

Original issue reported on code.google.com by codingfr...@gmail.com on 7 Apr 2008 at 7:27

GoogleCodeExporter commented 9 years ago
This is a function of the war plugin, not the gwt plugin. We don't actually copy
anything relative to the webapp folder. All we do is adjust the web.xml for 
servlet
mounting.

If you want resource filtering on the webapp stuff, you should consult the war
plugins docs or try doing it with an antrun task.

Original comment by keber...@gmail.com on 7 Apr 2008 at 7:30

GoogleCodeExporter commented 9 years ago
That's not correct. The war plugin allows additional resource filtering. I just 
use
standard resource filtering with. And if you read the war plugin documentation 
you
see that filtered resources end up in target/classes/*. There I can find the 
filtered
resource but in the gwt compile the original file and not the filtered one can 
be found.
So why is this a war plugin thing?

Original comment by codingfr...@gmail.com on 7 Apr 2008 at 7:40

GoogleCodeExporter commented 9 years ago
Filtered resources that end up in target/classes are a separate issue.

I think I see what you are saying now..

A) Nothing in src/main/webapp do we touch, ever.
B) If you have something in, say, src/resources/mypackage/public/index.html it 
will
end up in target classes filtered by the java compile goal, however, the 
GWTCompiler
will use the original source file.
C) If you are trying to do src/main/webapp/mypackage.MyModule/index.html then 
yes,
GWTCompiler will overwrite that, but we can't actually control that. 

The problem is, all of the source paths have to be the preferred classpathing 
for the
GWTShell and GWTCompile classes and won't see your finished output.

Couple of options here. First, move your HTML out of a module target and use 
the path
reference to change the module root directory when you include it. Second, make
another pass over it after the gwt:compile task. Since this is a compile phase 
task
and not a package phase, I assume you could do this sometime before war:webapp 
runs.

Original comment by keber...@gmail.com on 7 Apr 2008 at 7:47

GoogleCodeExporter commented 9 years ago
Ok thanks. With a second filtering it works :)

Original comment by codingfr...@gmail.com on 7 Apr 2008 at 8:26