On 29 May 2012 16:38, Rolf Lear <[email protected]> wrote: > > So what this does is > > > On Tue, 29 May 2012 16:22:27 +0100, Stephen Connolly > <[email protected]> wrote: >> On 29 May 2012 15:26, Rolf Lear <[email protected]> wrote: >>> >>> >>> So, being inexperienced, my intention is to find some solution that: >>> >>> 1. makes it possible (even if playing exclusion games is needed) to use >>> both JDOM 1.x and 2.x in a maven project (currently it is not). >> >> Well actually it is possible to work around the issue if you are >> prepared to introduce a wrapper project... >> >> something like this: > > > Hmmm... this has gone over my head.... I think I am going to have to spend > some time getting to grips with some of the more details in maven... > > Perhaps I should take a few days and set up my own repo, and try these > things out... > > For what it's worth, I am not sure the maven-shade-plugin is > appropriate.... is it? I am not sure how that usage of it helps... I simply > don't know enough.
All that shade is doing in this case is repacking the original dependency under a different name.... we could have used it to remap the old classes and their references, for example if you had not renamed the java package name from org.jdom to org.jdom2 we could have used shade to process the dependencies which use the old version to rename their org.jdom to org.jdom.deprecated and allow the two classpaths to co-exist without overlap. But I am not doing anything that fancy here... all I am showing here is how a small pom can allow me to work around the issue. if you are happy to redeploy jdom1 as jdom-deprecated just by changing your original pom, then that would be simpler, but the pom I have is quite short! I could have replaced it in a number of ways, for example I could just use dependency:copy and buildhelper:attach and tell the jar plugin to skip.. but that would be a more verbose pom... might still end up with such to get the javadoc artifacts into central if you were using the above pom... but my example was just a "here is how a user could solve this" not a "here is how the library producer will give a solution to users"... the latter is release either a org.jdom:jdom-deprecated:1.1.4 or org.jdom.deprecated:jdom:1.1.4 (the war plugin should handle renaming when the artifactIds are the same, so no worries about that) > > Bottom line is that I don't know enough yet... must learn more. > > Thanks all, I'll figure some more things out and come back with 'more of a > clue'. > > Rolf > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
