in my wildest dreams, there was a unique plugin version without any 
particular Maven version-specific configuration when using it: all the magic 
would be at compile time, since Maven core artifacts are used

for the moment, the only feature causing problems is deploying: since maven-
deploy-plugin doesn't have such compatibility issues, I suppose there is a way 
to have code compatible with both Maven 2 & 3, no? I need to investigate.

But yes, if the dream cannot happen, we'll have to create a compatibility 
layer, and users will have to continue the ${basedir} profile hack

Regards,

Hervé

Le vendredi 11 mars 2011, Dennis Lundberg a écrit :
> 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é


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to