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-mechanism.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]

Reply via email to