Hello list,
After some weeks of lurking, trying to catch all the hidden secrets of
maven, I need your help.
I looked for some hints on the net also, but probably I'm a bad web
surfer and I couldn't find anything useful.
So, here's the problem:
I have a maven web project imported into eclipse, and this is a piece
of its directory structure:
src/
src/main/
src/main/webapps/
src/main/webapps/META-INF/
src/main/webapps/META-INF/context.xml
filters/
filters/integration.properties
------------
File contents
------------
context.xml
<Context>
<Resource name="${jdbc.name}" auth="Container"
type="${datasource.type}" username="${database.username}"
password="${database.password}"
driverClassName="${database.driver}" url="${database.url}"
maxActive="8" maxIdle="4"/>
</Context>
integration.properties
jdbc.name=jdbc/ds
datasource.type=javax.sql.DataSource
database.username=user
database.password=pass
database.driver=com.mysql.jdbc.Driver
database.url=jdbc:mysql://192.168.250.30:3306/aDatabase?
autoreconnect=true
And this is the pom.xml (just the interesting sections)
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<dependentWarExcludes>META-INF/context.xml</dependentWarExcludes>
</configuration>
</plugin>
...
</plugins>
...
<resources>
<resource>
<targetPath>META-INF</targetPath>
<directory>src/main/webapp/META-INF</directory>
<includes>
<include>**/context.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
....
</build>
With this configuration, the META-INF directory is copied into target/
classes, and the context.xml is filtered, so it seems just a problem
with the targetPath, but...
Let's add this tag in the build section:
<finalName>testApp</finalName>
So that at the end of mvn package I'll have a war file named testApp.war
We changed the configuration above in this way:
<targetPath>../testApp/META-INF</targetPath>
But the context.xml in the testApp/META-INF in unfiltered :(
Where's the mistake? Is there anything I don't get? Of course there
is, but what?
Sorry for the long mail, I hope I've explained my problem properly.
Thank you in advance
Ale
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org