On 2/1/06, Ben Gidley <[EMAIL PROTECTED]> wrote:
> I am having issues with Maven running the unit tests on my project. The main
> error is
>
> java.lang.LinkageError: loader constraints violated when linking
> javax/xml/namespace/QName class
>     at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(
> RuntimeBuiltinLeafInfoImpl.java:779)
>
> Looking at this list I can see a number of people have hit this and the
> solution is to fork the JVM for the unit tests. Looking at the surefire
> plugin documentation I have added the following to my POM
>   <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <forkMode>each</forkMode>
>         </configuration>
>       </plugin>
>
> However this make no difference. I then suspected it may be not in the
> released version of the plugin - so I tried using the snapshot by adding
> <pluginRepository>
>       <id>Snapshots</id>
>       <name>Snapshots</name>
>       <url>http://snapshots.maven.codehaus.org/maven2/</url>
>    </pluginRepository>
>
> and forcing the plugin version. This also appears to make no different.
>
> Looking at the code for the plugin in Subversion for surefire it does appear
> it supports forking and this is the way to turn in on. Am I doing something
> wrong to make it use the plugin?

I am using the forkMode successfully with mvn 2.0.2 and the only diff
I seem to have with your config is that I specify the execution

         <executions>
           <execution>
              <goals>
                 <goal>test</goal>
              </goals>
           </execution>
         </executions>

Not sure if that will solve your issue.

> Has anyone got any ideas of how to get round this issue?

Jerome

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

Reply via email to