Sorry, this one duplicates issue http://jira.codehaus.org/browse/MWAR-111.
--- Adrian Gonzalez <[EMAIL PROTECTED]> a écrit : > Hello, > > 1. MWAR-125 : just attached test case. > 2. for ear building, following link is interesting : > http://www.michaelyuan.com/blog/2007/10/09/jboss-seam-project-setup-with-maven-%e2%80%94-part-2-ear-deployment/ > > After struggling a bit, I think their approach is > the > correct one for now (note that I really don't have > enought maven experience to be really sure). > > They use in the web pom.xml scope=provided for jars > bundled in the ear and scope=compile for jars > bundled > in the WEB-INF/lib. > The only drawback is that scope=provided isn't > transitive. > So, they need to list all transitive dependencies in > the pom.xml. > Whereas using scope=compile and optional=true, it > shouldn't be the case. > > > --- Adrian Gonzalez <[EMAIL PROTECTED]> a écrit > : > > > Thanks Wayne, > > > > created as MWAR-125 > > (http://jira.codehaus.org/browse/MWAR-125). > > > > I'll attach asap a test case and will try to find > a > > fix tomorrow (I hope !). > > > > In the meantime can someone who's generating ear > > application with war and utility jar (used by war > > but > > deployed at the root ear), tell me how it does it. > > > > Are you creating manually MANIFEST.MF file and > > populating WEB-INF/lib dependencies manually ? If > > not > > how do you distinguish jars in ear from those in > > WEB-INF/lib ? (I've also tries putting > > scope=provided > > in wab module for jar going to ear and > scope=compile > > for WEB-INF/lib, but doesn't work since provided > > scope > > is not transitive - see > > > http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html). > > > > Thanks very much for your help ! > > > > --- Wayne Fay <[EMAIL PROTECTED]> a écrit : > > > > > Sounds reasonable. Please file a bug in JIRA, > > > ideally with a test and fix. ;-) > > > > > > Wayne > > > > > > On 10/15/07, Adrian Gonzalez > > <[EMAIL PROTECTED]> > > > wrote: > > > > Hello, > > > > > > > > I'm currently looking at maven source code. > > > > > > > > In org.apache.maven.plugin.war.AbstractWarMojo > > > > (v2.0.2), line 582, the .jar is copied in > > > WEB-INF/lib > > > > if !artifact.isOptional().. [1] > > > > > > > > I think that optionality is not inherited by > > > > transitivity and that's the cause of my > problem > > : > > > > i.e. if artA declares > > > > <dependency> > > > > <artifactId>artB</artifactId> > > > > <optional>true</optional> > > > > </dependency> > > > > and artB declares : > > > > <dependency> > > > > <artifactId>artC</artifactId> > > > > <optional>false</optional> > > > > </dependency> > > > > then artC is transitively included in artA > > > > dependencies but with optional=false. IMHO it > > > should > > > > be included with optional=true since artB is > > > optional. > > > > > > > > Could someone please confirm me ? > > > > > > > > [1] ScopeArtifactFilter filter = new > > > > ScopeArtifactFilter( Artifact.SCOPE_RUNTIME ); > > > > if ( !artifact.isOptional() && filter.include( > > > > artifact ) ) { > > > > ... > > > > //copy action... > > > > > > > > > > > > --- Adrian Gonzalez <[EMAIL PROTECTED]> a > > > écrit : > > > > > > > > > I'm trying to build a ear structure > containing > > > war > > > > > and > > > > > jar files. > > > > > > > > > > I'm using maven-war-plugin instructions from > > > > > > > > > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html > > > > > (last part of this page) to create > > MANIFEST.MF. > > > > > > > > > > Using : > > > > > <dependency> > > > > > <groupId>org.foo</groupId> > > > > > <artifactId>bar-jar1</artifactId> > > > > > <version>${pom.version}</version> > > > > > <optional>true</optional> > > > > > <!-- goes in manifest classpath, but > not > > > > > included in WEB-INF/lib --> > > > > > </dependency> > > > > > > > > > > works fine for bar-jar1, but if bar-jar1 has > > > > > dependencies, those dependencies are copied > to > > > > > WEB-INF/lib. > > > > > I would expect those dependencies to be > > > registered > > > > > in > > > > > the MANIFEST.MF (they are !), but not to be > > > included > > > > > in Web-Inf/lib. > > > > > > > > > > Is it a bug ? Thanks for the help, I'm > really > > > > > struggling with this ear building thing... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________________ > > > > > Découvrez le blog Yahoo! Mail : dernières > > > > > nouveautés, astuces, conseils.. et vos > > réactions > > > ! > > > > > http://blog.mail.yahoo.fr > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > > > > > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________________ > > > > Découvrez le blog Yahoo! Mail : dernières > > > nouveautés, astuces, conseils.. et vos réactions > ! > > > > http://blog.mail.yahoo.fr > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > === message truncated === _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
