You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Dipl.-Ing. Torsten Liermann" <li...@liermann-it.de> on 2011/03/23 18:17:13 UTC

Help: mojo works in maven 2.x but not in maven 3.x

Hi,

(sorry, I can't speak english) I'm using a simple mojo that extends the classpath for unit tests via 
the surefire plugin and his parameter additionalClasspathElement.

The mojo works with maven 2.x but not with maven 3.x In maven 3.x the sure fire plugin runs without the addtionalClasspathElement.

Here is a code snippet of the mojo:

for (Object object : plugins) {
            if ("maven-surefire-plugin".equals(((Plugin) object).getArtifactId())) {
     Xpp3Dom config =
         (Xpp3Dom) plugin.getConfiguration();
     Xpp3Dom additionalClasspathElements = new Xpp3Dom("additionalClasspathElements");
     Xpp3Dom additionalElement = new Xpp3Dom("additionalClasspathElement");
     additionalElement.setValue("d:\\temp\\xyz.jar");
     additionalClasspathElements.addChild(additionalElement);
   
}



What is wrong?

Thanks for a hint
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org