This is the pom i'm using with openejb 3.1.3: (i test with openejb and deploy in jboss 5.1)
<?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="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>test-server-ejb</artifactId> <version>1.0-SNAPSHOT</version> <name>test-server-ejb</name> <url>http://maven.apache.org</url> <packaging>ejb</packaging> <build> <defaultGoal>install</defaultGoal> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <version>2.2.1</version> <configuration> <ejbVersion>3.0</ejbVersion> </configuration> </plugin> </plugins> </build> <repositories> <repository> <id>apache-m2-snapshot</id> <name>Apache Snapshot Repository</name> <url>http://repository.apache.org/snapshots</url> </repository> </repositories> <!-- The <scope>test</scope> guarantees that non of your runtime code is dependent on any OpenEJB classes. --> <dependencies> <dependency> <groupId>javax.ejb</groupId> <artifactId>ejb-api</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>com.test</groupId> <artifactId>test-login</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.5.2-Final</version> <scope>provided</scope> </dependency> <!-- Disabled for first test <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-envers</artifactId> <version>3.5.2-Final</version> </dependency> --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.4.0.GA</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.openejb</groupId> <artifactId>openejb-core</artifactId> <version>3.1.3-SNAPSHOT</version> <scope>test</scope> </dependency> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>8.4-701.jdbc4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-asm-shaded</artifactId> <version>3.7</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-reflect</artifactId> <version>3.7</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-naming</artifactId> <version>3.7</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-finder-shaded</artifactId> <version>3.7</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> </project> On Tue, Jun 15, 2010 at 11:14 PM, Yvan <[email protected]> wrote: > > Sorry for such a basic question but I how do I add standalone openejb > container's jars as dependencies to my project's pom in order to be able to > embed the container for testing purposes? > > Currently I just eclipse:eclipse my pom and add all dependencies manually > by > setting a directory with external jars to the projects properties (I make > it > point to the /lib of the standalone deployment). This works of course only > as long as I am in my IDE. All maven executed compilations and tests fail > because it doesn't find openejb on its classpath when compiled outside in a > console. > > Here for instance is the 3.2-SNAPSHOT pom file (which is the version I > actually need because of its JPA2 support) > > https://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.2-SNAPSHOT/ > which I can't really use because its not a jar... > > I tried another approach with the following pom (dependencies come from the > standalone openejb source files). Is this the right approach? > > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>com.mycompany.app</groupId> > <artifactId>my-app</artifactId> > <version>3.2-SNAPSHOT</version> > <packaging>jar</packaging> > > <repositories> > <repository> > <id>openejb</id> > <name>openejb container</name> > <layout>default</layout> > <url>https://repository.apache.org/snapshots/</url> > <snapshots> > <enabled>true</enabled> > </snapshots> > </repository> > </repositories> > > <properties> > > </properties> > > <dependencies> > <!--dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-standalone</artifactId> > <version>3.2-SNAPSHOT</version> > </dependency--> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-loader</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-core</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>javaee-api</artifactId> > <version>5.0-3-SNAPSHOT</version> > </dependency> > <dependency> > <groupId>org.apache.geronimo.javamail</groupId> > <artifactId>geronimo-javamail_1.4_mail</artifactId> > <version>1.9-SNAPSHOT</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-client</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-server</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-ejbd</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-multicast</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-hsql</artifactId> > <version>${version}</version> > <optional>true</optional> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-http</artifactId> > <version>${version}</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-telnet</artifactId> > <version>${version}</version> > <optional>true</optional> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>openejb-cxf</artifactId> > <version>${version}</version> > <optional>true</optional> > </dependency> > > </dependencies> > </project> > > > Thanks > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Standalone-OpenEJB-pom-embedded-container-tp2256560p2256560.html > Sent from the OpenEJB User mailing list archive at Nabble.com. > -- Jose Mª Villagrá Gómez Microsoft Certified Professional Developer - Enterprise Applications Tfno CH: +41 789 408686 Tfno ES: +34 625 358724
