Packaging the Adapter

Page edited by Van Halbert


Changes (3)

Once all the required code is developed, it is time to package them into a RAR artifact, that can be deployed into a Container. A RAR artifact is lot more similar to a WAR. To put together a RAR file it really depends upon the build system you are using.

* Eclipse: You can start out with building Java Connector project, it will produce the RAR file
...
* Ant: If you are using "ant" build tool, there is "rar" build task available

* Maven: If you are using maven, use <packaging> element value as "rar". Teiid uses maven, you can look at any of the "connector" projects for sample "pom.xml" file. Here is sample See {{Build Environment}} for an example of a pom.xml file.

{code:lang=XML}
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-{name}</artifactId>
<groupId>org.company.project</groupId>
<name>Name Connector</name>
<packaging>rar</packaging>
<description>This connector is a sample</description>

<dependencies>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-common-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
{code}

Make sure that the RAR file, under its "META\-INF" directory has the "ra.xml" file. If you are using maven refer to [http://maven.apache.org/plugins/maven-rar-plugin/]. In the root of the RAR file, you can embed the JAR file containing your connector code and any dependent library JAR files.

Full Content

Once all the required code is developed, it is time to package them into a RAR artifact, that can be deployed into a Container. A RAR artifact is similar to a WAR. To put together a RAR file it really depends upon the build system you are using.

  • Eclipse: You can start out with building Java Connector project, it will produce the RAR file
  • Ant: If you are using "ant" build tool, there is "rar" build task available
  • Maven: If you are using maven, use <packaging> element value as "rar". Teiid uses maven, you can look at any of the "connector" projects for sample "pom.xml" file. See Build Environment for an example of a pom.xml file.

Make sure that the RAR file, under its "META-INF" directory has the "ra.xml" file. If you are using maven refer to http://maven.apache.org/plugins/maven-rar-plugin/. In the root of the RAR file, you can embed the JAR file containing your connector code and any dependent library JAR files.

Stop watching space | Change email notification preferences
View Online | View Changes | Add Comment