On Sunday 15 February 2009 18:02:17 Dave Newton wrote:
> phillips1021 wrote:
> > Since we use Maven to manage our dependencies our projects using Struts
> > 2.1.6 automatically receive  xWork-2.1.2.
>
> Does declaring your own dependency for XWork (not xWork) 2.1.3 work, or
> does it just retrieve both?

You can exclude XWork in your pom.xml, then declare a dependency on what you 
want. I do it all the time with Spring... The Struts2-Spring plugin brings in 
2.5.3, but for a while, there was a reason to get 2.5.6 (I'm trying to 
remember the issue, but it was a bug with a persistence-related class in 
2.5.3). Anyhow, here's an example - 

<dependency>
            <groupId>org.apache.openjpa</groupId>
            <artifactId>openjpa-persistence</artifactId>
            <version>1.2.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jms_1.1_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jpa_3.0_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jta_1.1_spec</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

(sorry example doesn't relate to the rant above, but the same idea). Once you 
exclude some libs, you, of course, have to bring something in to take it's 
place.

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to