On 2011-03-02 01:34, Hervé BOUTEMY wrote: > Hi, > > I tried to have a unique maven-site-plugin version compatible with both Maven > 2 and 3. > I think I updated the code to be compatible. > But I have a problem: there are classloading issues when run with Maven 2, > since Maven 3 specific libraries are picked. I tried to add these libraries > into a profile, without success. > > Can somebody have a look and help, please?
This idea has been on my mind for a while as well. Thanks for putting some code in there so that we can test and discuss! After fiddling with the MSITE-560 branch a bit I see two major concerns. The changes I made on the branch was to change mavenVersion to 2.2.1 and adding a few dependencies that are used in the trunk of Site Plugin. 1. maven-artifact[-manager] These are not available in M3, but the real question is: can M3 use the M2 versions of these to resolve artifacts? 2. maven-setting (encryption) I got as far as getting these errors using the M2 version as a dependency: package org.apache.maven.settings.crypto does not exist Another idea that I had was to split out all the Maven-version specific functionality into a compatibility layer, outside the Site plugin. Kind of what you have started with the reporting-exec module. Here's how I envision it: maven-site-compatibility:2.0.0 - includes all M2 specific code and dependencies maven-site-compatibility:3.0.0 - includes all M3 specific code and dependencies maven-site-plugin - includes all the rest - depends on maven-site-compatibility:2.0.0 If you want to run the Site Plugin with M3 you would add a dependency on maven-site-compatibility:3.0.0 to your Site Plugin declaration. > > Thanks > > Hervé -- Dennis Lundberg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
