On 4/5/07, David Jackman <[EMAIL PROTECTED]> wrote:
That much is working okay. What isn't working now is the fact that my
java agent has dependencies of its own that aren't in the surefire
classpath. Wayne gave me something to try to get around this problem.
Hi David,
I could run the Cayenne java agent with your help successfully (it's
not the result I'd expected, but it's closer than I'd been before your
advice).
I double-checked the deps of the agent *were* in the classpath. When I
removed the deps and left only the agent the test failed due to
missing classes. Once the deps were in again, it worked better. So, I
can't understand why it doesn't work for you.
Here's the cayenne profile configuration. It runs with M2 2.0.6 much,
much better now. Thanks for the advice.
<profile>
<id>cayenne</id>
<dependencies>
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-agent</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-server</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-client</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-agent</artifactId>
<version>3.0-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<argLine>-javaagent:${project.build.directory}/cayenne-agent-3.0-SNAPSHOT.jar</argLine>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources/cayenne</directory>
</resource>
</resources>
</build>
<repositories>
<repository>
<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>
</repository>
</repositories>
</profile>
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]