Yes, this is an issue when using classifiers to create more than one artifact for a project. Create two separate Maven projects to solve it.
/A On Thu, Jun 18, 2009 at 13:00, Aleksey Didik<[email protected]> wrote: > Hello all. > > I have met a situation which confuse me a little. > > Let's imagine we have two assembly for one maven module: full version (for > example server part of application) and brief version (client part for > remote call). Will use maven-assembly-plugin for build them. > > Full (server): > <dependency> > <groupId>org.foo</groupId> > <artifactId>foo</artifactId> > <version>1.0</version> > </dependency> > > > Short (client): > <dependency> > <groupId>org.foo</groupId> > <artifactId>foo</artifactId> > <version>1.0</version> > <classifier>client</classifier> > </dependency> > > Both artifacts have the same pom.xml which is owned by full version. > If I attach dependency on client jar I will have all dependencies of full > version of artifact in spite of client artifact have less count of > dependencies. Result of this is unnecessary libraries in application which > use client jar. > > Real example: > > In my app I use jboss 5.0.0-GA. I have client app which have access to JBoss > JMX and I use the next dependency, which is one of assembly of main jboss > artifact /jboss-as-server/ : > > <dependency> > <groupId>org.jboss.jbossas</groupId> > <artifactId>jboss-as-server</artifactId> > <classifier>jmx-invoker-adaptor-client</classifier> > <version>5.0.0.GA</version> > <scope>compile</scope> > </dependency> > > When I attach this dependency to my project I have so much transactive > dependencies from /jboss-as-server, /but most of them is not needed for > client part. It's around 9 Mbytes of unnecessary dependencies which is used > for jboss server work, not for my client application. > > It's a real problem for me, but may be I don't understand something > important about maven work with classified artifacts and it's > dependencies... > > Do you have any ideas? > > Best regards, Aleksey Didik. > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
