Re: How to filter META-INF/context.xml

2012-02-02 Thread user454322
I gor it with the war-plugin

...

org.apache.maven.plugins
maven-war-plugin


src/main/resources/META-INF/context.xml


src/main/resources/META-INF/MANIFEST.MF


true

true


*


src/main/resources/META-INF

true

META-INF

*



...


--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-filter-META-INF-context-xml-tp120983p5449829.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to filter META-INF/context.xml

2009-09-01 Thread mateamargo

I was trying to acomplish the same thing. But it seems the war plugin ensures
that the context.xml file is overwritten.
I even added an antrun task to copy the filtered context to the META-INF
folder, but the war:war goal writes on it before building the war.

I know this because I've added an ant task to change the context.xml
permission to avoid writting and this is what I got:

[INFO] Could not copy webapp
sources[/home/user/projects/prueba/target/mywebapp]

Embedded error: Unable to open file
/home/user/projects/prueba/target/mywebapp/META-INF/context.xml for writing.

Did you find out a way to do this?
-- 
View this message in context: 
http://www.nabble.com/How-to-filter-META-INF-context.xml-tp21992805p25242310.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



How to filter META-INF/context.xml

2009-02-13 Thread Alessandro Novarini

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


type="${datasource.type}" username="${database.username}"  
password="${database.password}"

driverClassName="${database.driver}" url="${database.url}"
maxActive="8" maxIdle="4"/>


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)


...

   ...
   
org.apache.maven.plugins
maven-war-plugin


META-INF/context.xml


...

...


META-INF
src/main/webapp/META-INF

**/context.xml

true






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:

testApp

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:
../testApp/META-INF

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