Henry, Matt, I had solved this by doing exactly what you suggested - so thanks for the confirmation. I basically found that it was impossible to use the taglibs packaged with acegi if I kept the acegi jar at the ear level. Hence moving to war became necessary, followed by the exclusions - otherwise spring was being loaded by the war as well as the ear - causing nothing but trouble :).
Thanks again. Naresh -----Original Message----- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 8:53 PM To: Maven Users List Subject: Re: Should Acegi be packaged into ear or war? Here's what I'm using: <dependency> <groupId>org.acegisecurity</groupId> <artifactId>acegi-security</artifactId> <version>1.0.1</version> <exclusions> <!-- Maven thinks 2.0 is newer than 2.1 --> <exclusion> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> </exclusion> <!-- exclude older versions of Spring --> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-remoting</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-support</artifactId> </exclusion> </exclusions> </dependency> I exclude individual spring artifacts because I'm including the following: <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>2.0-rc2</version> </dependency> ... and Maven (or maybe it's the poms) doesn't recognize that this JAR is the same (and newer!) as all the Acegi dependencies. Matt On 8/29/06, Henry S. Isidro <[EMAIL PROTECTED]> wrote: > On Saturday, August 26, 2006 13:52, Naresh Bhatia wrote: > > I am packaging my web application as an ear file because it uses EJBs. I > > am using Acegi for security. However if I add Acegi as a dependency in > > the war subproject then it pulls in bunch of other jars that are also > > needed in my ejb subproject (such as spring) and I run into classloader > > issues at runtime. To avoid this, I have moved the Acegi dependency into > > the ejb package. Now everything works fine - Acegi and Spring are both > > available to the web application. The only problem is that the web > > application cannot access Acegi taglibs because they are no longer under > > WEB-INF/lib. I could put Acegi back in the war project but I would have > > to exclude all the dependent jars - I don't like doing this because the > > list of Acegi dependent jars is really long! What is the most elegant > > way to handle this situation? > > > > > > > > Thanks. > > > > Naresh > > > > You can try excluding those jars from being pulled in, just use the > <exclusions> tag in the pom. For more information, check this out: > http://maven.apache.org/guides/introduction/introduction-to-dependency-m echanism.html > > HTH, > Henry > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
