Permalink
Browse files

added files to run with tomcat6:run

  • Loading branch information...
1 parent d187fe3 commit f284a2012e3e604d4319eb909693537a7fd94954 alex.collins committed Mar 1, 2014
Showing with 28 additions and 2 deletions.
  1. +20 −2 pom.xml
  2. +8 −0 src/main/conf/context.xml
View
22 pom.xml
@@ -6,6 +6,9 @@
<groupId>com.alexecollins</groupId>
<artifactId>tutorial-hibernate-jpa</artifactId>
<version>0.1.0-SNAPSHOT</version>
+ <properties>
+ <derby.version>10.4.1.3</derby.version>
+ </properties>
<packaging>war</packaging>
<url>http://www.alexecollins.com/?q=content/tutorial-hibernate-jpa-part-2</url>
@@ -56,7 +59,7 @@
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
- <version>10.4.1.3</version>
+ <version>${derby.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -80,6 +83,21 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat6-maven-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <contextFile>src/main/conf/context.xml</contextFile>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>${derby.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<executions>
@@ -94,4 +112,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
View
8 src/main/conf/context.xml
@@ -0,0 +1,8 @@
+<Context>
+ <Resource auth="Container"
+ driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+ maxActive="8" maxIdle="4"
+ name="jdbc/tutorialDS" type="javax.sql.DataSource"
+ url="jdbc:derby:tutorialDB;create=true"
+ username="" password="" />
+</Context>

0 comments on commit f284a20

Please sign in to comment.