Maven用の拡張アダプターの構成
Mavenを正しくコンパイルするには、拡張アダプターが作成されるリリースおよびパッチレベルに一致するようにXMLファイルとMavenコマンド引数を変更する必要があります。
以下に示されているmvnコマンドの例は7.0.2に対応しています。このシナリオでは、csext-0104.jarというファイルが<TDV_install_dir>\apps\extension\libにあります。
Maven用の拡張アダプターを構成するには
1.次のディレクトリーに移動します。
\apps\extension\examples\adapters\postgres-example-adapter-<version>\
2.必要に応じて、以下に太字で強調表示されているように、pom.xmlファイルの3か所で0.0.0-SNAPSHOTをTDVのバージョン番号(7.0.2など)に置き換えます。
<?xml version="1.0" encoding="UTF-8"?>
...
- <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<name>Modules/Server - Postgres Extension Adapter Example</name>
<artifactId>postgres-example-adapter-7.0.2</artifactId>
<groupId>com.cisco.cdvs</groupId>
<version>7.0.2-SNAPSHOT</version>
- <build>
. . .
. . .
</build>
- <dependencies>
- <dependency>
<groupId>com.cisco.cdvs</groupId>
<artifactId>server-extension</artifactId>
<version>7.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
3.次のコマンドを実行してjarファイルをインストールし、アダプターパッケージを作成します。
mvn install:install-file -Dfile=../../../lib/csext-0104.jar -DgroupId=com.cisco.cdvs -DartifactId=server-extension -Dversion=7.0.1-SNAPSHOT -Dpackaging=jar
mvn clean package