|
||||||||||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||||||||||
|
||||||||||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||||||||||
Let's close this as 'not a bug', because by chaining the invokers it works fine, although I'm still surprised by the original exception.
Chaining invokers
If your plugins uses the Maven Invoker and you want to use the maven-invoker-plugin for ITs, you need to chain them.
In your code, add the following
/** * The local repository where the artifacts are located. */ @Parameter( defaultValue = "${localRepository}", readonly = true, required = true ) private ArtifactRepository localRepository;/** * */ @Parameter ( property="settingsFile" ) private File settingsFile; // protected void invokeMaven() { InvocationRequest request = new DefaultInvocationRequest(); request.setUserSettingsFile( settingsFile ); invoker.setLocalRepositoryDirectory( new File( localRepository.getBasedir() ) ); // etc ... }Next you have to refer the settingsFile to the interpolated settings.xml, containing the configuration of the mock repository.
Although this is quite rare, it is probably worth a page on the site.