JPA Integration tests with Maven

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Aug 09 2006 - 09:43:10 EDT

  • Next message: Craig L Russell: "Re: JPA Integration tests with Maven"

    Can confirm what IIRC Bill has mentioned before - using "-javaagent"
    option during integration testing with Maven breaks miserably. I
    created a separate Maven project with a piece of configuration like
    that:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
            <forkMode>(tried all of them)</forkMode>
            <childDelegation>(tried true and false)</childDelegation>
             <argLine>-javaagent:...</argLine>
        </configuration>
    </plugin>

    The configuration above would load the agent, but since Maven
    Surefire plugin installs its own ClassLoader for the unit tests, the
    agent doesn't work (I saw a number of errors depending on the
    combination of parameters). Will probably have to do it with Ant.

    Also this almost make me want to rewrite the JPA context to support
    true POJO's without an enhancer, as I suspect we'll be plagued by
    enhancer related problems in various environments. We can probably
    keep the enhancer as an optional extension for "Cayenne-like"
    behavior, including such "insignificant" things like lazy
    relationship loading.

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Aug 09 2006 - 09:43:34 EDT