Configuration a ResourceLink in META-INF/context.xml (with maven filtering)
This commit is contained in:
parent
e9b13e10f9
commit
1bab9464c6
3 changed files with 26 additions and 1 deletions
8
navalplanner-webapp/src/main/webapp/META-INF/context.xml
Normal file
8
navalplanner-webapp/src/main/webapp/META-INF/context.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Context antiJARLocking="true" path="">
|
||||
<ResourceLink name="${dataSource.jndiName}"
|
||||
global="${dataSource.jndiName}"
|
||||
type="javax.sql.DataSource">
|
||||
</ResourceLink>
|
||||
</Context>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
|
||||
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
<display-name>helloworld</display-name>
|
||||
<display-name>navalplanner-webapp</display-name>
|
||||
|
||||
<!--
|
||||
It searches all navalplanner-business-spring-config.xml files, it can
|
||||
|
|
|
|||
17
pom.xml
17
pom.xml
|
|
@ -385,6 +385,23 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>src/main/webapp/META-INF</directory>
|
||||
<targetPath>META-INF</targetPath>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>context.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Jetty configuration -->
|
||||
<plugin>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue