On Thu, Oct 14, 2010 at 10:53 AM, Simon Laws <[email protected]> wrote: >>> >> >> The problem is that the shade plugin doesn't work with pom type >> dependencies, so when the dependency reduced pom.xml is created it >> still contains the pom type dependency so all the individual Tuscany >> modules are still included as transitive dependencies, so everything >> is duplicated and both the shaded jar and individual module jars get >> included on the classpath and included in things like the webapp lib >> directory. >> >> The only easy way around this i can see is to duplicate what the pom >> type module does and include the actual module dependencies in the >> aggregate jar pom.xml. I guess the shade plugin could be fixed but i >> have had a look but it wasn't immediately obvious where its going >> wrong, and we'd have to wait for the fixed version to be released. >> This is similar to the dependency plugin also not working with pom >> type dependencies (and is probably just another symptom of the fact >> that pom type dependencies are a little uncommon). >> >> ...ant >> > > I apologize for being slow and I expect it's because I don't > understand how the shades plugin work but I still don't understand > what's going on here. > > More specifically I don't understand... > > - what a reduced dependency pom is (it's not something that google knows > about)
See http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html and the options createDependencyReducedPom and promoteTransitiveDependencies. > - why the shades plugin doesn't work with pom type poms. It seems to > be generating working aggregate jars to me Try using one in a webapp build, eg: C:\Tuscany\SVN\trunk\samples\learning-more\implementation-web\helloworld-jsp>svn diff Index: pom.xml =================================================================== --- pom.xml (revision 1022443) +++ pom.xml (working copy) @@ -33,8 +33,8 @@ <dependencies> <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-base-runtime</artifactId> + <groupId>org.apache.tuscany.sca.aggregation</groupId> + <artifactId>tuscany-base-runtime-aggregation</artifactId> <version>2.0-SNAPSHOT</version> </dependency> and then look at the .war lib folder which includes everything duplicating teh aggregate jar (you'll have to build with -DskipTests=true as the tests fail) > - why the appearance of transitive dependencies in projects that > depend on the aggregate jar is the shade plugin's fault. Surely this > is our fault for not marking the dependency on the base pom as > optional in the aggregate jar pom. > I may be missing what you're suggesting but if they're optional or provided then they wont get included in the aggregate jar which isn't what we want. ...ant
