Here is the code from the test class that I'm using:

                EJB3StandaloneBootstrap.boot(null);
                EJB3StandaloneBootstrap.scanClasspath();
                Hashtable<String, String> props = new Hashtable<String, 
String>();
                props.put("java.naming.factory.initial",
                                "org.jnp.interfaces.LocalOnlyContextFactory");
                props.put("java.naming.factory.url.pkgs",
                                "org.jboss.naming:org.jnp.interfaces");

                initialContext = new InitialContext(props);

                OwnerDAO dao = (OwnerDAO) 
initialContext.lookup("OwnerDAOBean/local");

Like I said, the lookup fails if I run it via maven and works fine if I
launch it via TestNG

r_sudh wrote:
> 
> I have a maven project in Eclipse with EJB 3.0 style Entity beans and
> Session Beans. I'm using TestNG to run my tests that launch the JBoss
> micro-container and successfully tests all my EJB code.
> 
> I'd now like to have all of this working using maven outside of Eclipse
> (so I can use a Continuous Integration server). I'm not fully clear on
> what all I need to configure. I have the following in my pom.xml
> 
> <build>
>         <plugins>
>             <plugin>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <configuration>
>                     <source>1.6</source>
>                     <target>1.6</target>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <version>2.2</version>
>                 <configuration>
>                     <suiteXmlFiles>
>                         <suiteXmlFile>
>                             src/test/resources/testng.xml
>                         </suiteXmlFile>
>                     </suiteXmlFiles>
>                     <forkMode>pertest</forkMode>
>                     <childDelegation>false</childDelegation>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
> 
> Do I need the maven-ejb plugin? I'd appreciate any pointers.
> 
> Thanks
> -sud
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JBoss-Embedded-Container-%2B-Maven-%2B-howto--tf4255161s177.html#a12115874
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to