Show Table of Contents
2.7. Packaging the Adapter
When development is complete, the resource adapter files are packaged into a deployable artifact called a Resource Adapter Archive or RAR file.
Note
The file format is defined by the JCA specification and must not be confused with the RAR file compression format.
The method of creating a RAR artifact will depend on your build system:
- JBoss Developer Studio
- If you create a Java Connector project in JBoss Developer Studio, it will include a build target that produces a RAR file.
- Apache Ant
- When using Apache Ant, you can use the standard
rarbuild task. - Apache Maven
- When using Apache Maven, set the value of the
<packaging>element torar. Since Red Hat JBoss Data Virtualization uses Maven, you can refer to any of the Connector projects; for example,pom.xmlshown below.<project> <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>
The RAR file under its associated
META-INF directory must contain the ra.xml file. If you are using Apache Maven, see 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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.