adding a configuration parameter to the plugin such as additionalClasspathElements from surefire plugin would allow additonal entries to the cp http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html
does this help?? Martin ______________________________________________ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: [email protected] > Subject: Building a -classpath for a plugin, from the inside? > Date: Thu, 28 Apr 2011 19:27:45 -0400 > To: [email protected] > > Hi folks, > > I'm working on upgrading a Maven plugin that runs Apache DS[0] to use the > latest version of their software. Unfortunately, the latest version of their > software does something slightly slack-jawed on startup: it inspects the > java.class.path system property to locate JARs that contain core LDAP > schemata. There is no alternate loader mechanism. > > When this happens inside a plugin, the java.class.path system property > contains one JAR: Maven's own launcher JAR. > > I think the shortest path from where I am to working software is to fake up > java.class.path before running Apache DS and then to reset it back to its > "real" value after the server starts. However, in order to do this, I need to > build a classpath-like string containing the JARs Apache DS needs. > > These JARs are already listed in the plugin's dependencies (and when the > plugin runs, are available in the local repository). I'd like to use that > information if possible, rather than hard-coding specific JAR names into the > plugin. However, after spending half the day looking through various existing > plugins, I'm no closer to doing this than I was this morning. > > 1. Is there a shortcut I missed that produces exactly the string (or list of > JARs) I need? > 2. If not, is there a reasonable way to obtain the dependency artifacts for a > plugin? > 3. If not, what's a better solution that doesn't involve patching Apache DS? > > -o > > [0] https://bitbucket.org/ojacobson/apacheds-maven-plugin/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
