この例http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java?view=markupを実行しようとしていますが、どういうわけか実行できません。この例をmavenプロジェクトで実行したいのですが、初めてmavenプロジェクトに取り組んでいます。そして、どうすればいいのかわかりません。その例のように、それは明確に述べています-
To compile this example, you'll want:
* commons-pool-1.5.4.jar
* commons-dbcp-1.2.2.jar
* j2ee.jar (for the javax.sql classes)
in your classpath.
To run this example, you'll want:
* commons-pool-1.5.6.jar
* commons-dbcp-1.3.jar (JDK 1.4-1.5) or commons-dbcp-1.4 (JDK 1.6+)
* j2ee.jar (for the javax.sql classes)
* the classes for your (underlying) JDBC driver
in your classpath.
そこで、さまざまな記事を読んだ後、これらすべての依存関係を pom.xml ファイルに追加しようとしました。しかし、まだ次のようなエラーが発生しています--
ConnectionFactory cannot be resolved to a type
GenericObjectPool cannot be resolved to a type
ObjectPool cannot be resolved to a type
PoolableConnectionFactory cannot be resolved to a type
PoolableConnectionFactory cannot be resolved to a type
PoolingDataSource cannot be resolved to a type
PoolingDataSource cannot be resolved to a type
これが私の pom.xml ファイルです。pom.xml ファイルに欠けているものはありますか? これは初めてのMavenプロジェクトであるため、どんな提案もいただければ幸いです。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.datasource.pooling</groupId>
<artifactId>datasource.pooling</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>com.datasource.pooling</name>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<!--
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.3</version>
</dependency>
-->
</dependencies>
</project>
j2ee.jar ファイルを追加するための依存関係は何ですか。