Thanks Jacek. I actually found the Hibernate artifacts on:

 <repositories>
   <repository>
     <id>andromeda</id>
     <name>team-andromeda</name>
     <url>http://team.andromda.org/maven2/</url>
   </repository>
 </repositories>
 <pluginRepositories>
   <pluginRepository>
     <id>howardlewisship</id>
     <url>http://howardlewisship.com/repository</url>
   </pluginRepository>
 </pluginRepositories>

Don't suppose you have a working JPA with Hibernate EM and TestNG
tests etc example I could take a look at (ie complete source code)
just to get this all sorted out? That would be super helpful.

Wayne

On 4/6/07, Jacek Laskowski <[EMAIL PROTECTED]> wrote:
On 4/3/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> Wondering who is using TestNG successfully on the list??

I think I am. The TestNG tests I've been doing are not very
sophisticated, but let me test out the JPA features.

> I've recently been working on a new EJB3/JPA app by using Hibernate's
> CaveatEmptor JPA example as the base. Everything works great in Ant
> but I'm trying to make it work in Maven2...

I'm using JPA's outside the container feature, i.e. Hibernate
EntityManager in TestNG tests that are executed via M2 outside EJB3
container. Here's the hibernate configuration for M2 2.0.6 with
TestNG. It's not that you'll be able to run EJB3 apps, but perhaps
might be of some help.

I had to install Hibernate EntityManager et al manually via
maven-install-plugin.

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>pl.jaceklaskowski.jpa.query</groupId>
  <artifactId>jpa-query</artifactId>
  <name>jpa-query</name>
  <version>1.0</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.2.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbyclient</artifactId>
      <version>10.2.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>5.1</version>
      <scope>test</scope>
      <classifier>jdk15</classifier>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.3</version>
      </plugin>
    </plugins>
  </build>
  <pluginRepositories>
    <pluginRepository>
      <id>apache-snapshots</id>
      <name>Apache Snapshots Repository</name>
      <url>http://people.apache.org/maven-snapshot-repository</url>
      <layout>default</layout>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
    <pluginRepository>
      <id>codehaus-snapshots</id>
      <name>Codehaus Snapshots Repository</name>
      <url>http://snapshots.repository.codehaus.org</url>
      <layout>default</layout>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>
    <profile>
      <id>hibernate</id>
      <dependencies>
        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate</artifactId>
          <version>3.2.2.ga</version>
          <exclusions>
            <exclusion>
              <groupId>javax.transaction</groupId>
              <artifactId>jta</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-entitymanager</artifactId>
          <version>3.3.1</version>
        </dependency>
        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-annotations</artifactId>
          <version>3.3.0.ga</version>
        </dependency>
        <dependency>
          <groupId>javax.persistence</groupId>
          <artifactId>persistence-api</artifactId>
          <version>1.0</version>
        </dependency>
        <dependency>
          <groupId>jboss</groupId>
          <artifactId>jboss-archive-browsing</artifactId>
          <version>5.0.0alpha-200607201-119</version>
        </dependency>
        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-commons-annotations</artifactId>
          <version>3.0.0.ga</version>
        </dependency>
        <dependency>
          <groupId>javassist</groupId>
          <artifactId>javassist</artifactId>
          <version>3.4</version>
        </dependency>
        <dependency>
          <groupId>javax.transaction</groupId>
          <artifactId>jta</artifactId>
          <version>1.0.1B</version>
        </dependency>
        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-validator</artifactId>
          <version>3.0.0.GA</version>
        </dependency>
        <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
          <version>1.2.14</version>
        </dependency>
      </dependencies>
      <build>
        <resources>
          <resource>
            <directory>src/main/resources/hibernate</directory>
          </resource>
        </resources>
      </build>
    </profile>
  </profiles>
</project>

Jacek

--
Jacek Laskowski
http://www.JacekLaskowski.pl

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



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

Reply via email to