You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by cwilkes <cw...@ladro.com> on 2007/07/22 20:21:46 UTC

Can wicket-spring just depend on spring-context and spring-web?

Currently the 1.3.0-beta2 version of wicket-parent and wicket-spring depend
on the large single "spring" jar.  Can this be changed to just depend on the
org.springframework artifacts spring-context and spring-web?


-- 
View this message in context: http://www.nabble.com/Can-wicket-spring-just-depend-on-spring-context-and-spring-web--tf4125986.html#a11733423
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Re: Can wicket-spring just depend on spring-context and spring-web?

Posted by Al Maw <wi...@almaw.com>.
cwilkes wrote:
> Currently the 1.3.0-beta2 version of wicket-parent and wicket-spring depend
> on the large single "spring" jar.  Can this be changed to just depend on the
> org.springframework artifacts spring-context and spring-web?

This is one of those things that seems like a good idea until you 
realise that for it to work properly, you need to update all the POMs in 
the maven 2 repository at the same time. ;-)

If something else depends on the full Spring (e.g. Hibernate) then that 
gets brought in too. You can therefore end up with nasty version 
conflicts which are dependent on the order your Spring JARs happen to be 
defined on the classpath.

Additionally, the individual Spring modules don't have the source 
published on the Maven 2 repo, which is a pain.

So no, I don't think we should change this. Sorry. ;-)

Regards,

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

Re[2]: Can wicket-spring just depend on spring-context and spring-web?

Posted by Oleg Taranenko <ol...@web.de>.
Hello Martijn,

be more specifically :)


cwilkes, add to the you project pom.xml

        <dependencies>
                <dependency>
                        <groupId>org.apache.wicket</groupId>
                        <artifactId>wicket</artifactId>
                        <version>1.3.0-SNAPSHOT</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>org.springframework</groupId>
                                        <artifactId>spring</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>
                ...

This will remove transitive dependency to spring.jar inherited from
wicket, and you can add your own dependency

                ...
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
                        <version>2.0.6</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                        <version>2.0.6</version>
                </dependency>
                ... and so on

        </dependencies>

It's possible another maven's artifact being used in your project
exclicitly depends on spring.jar

To check this use mvn -X package
     
Analys of the output will help you to find the unnnesessary deps and
set exclusions in the pom.xml with above manner.
        
Cheers,

        
Sunday, July 22, 2007, 8:28:55 PM, you wrote:

> I think that depending on the catch all for spring is probably the
> best for Wicket. If you really want to depend on the individual
> modules, it is merely a matter of adding excludes to your
> wicket-spring dependency and including those you do want.

> The reason being: most people (at least those that I know) already
> want to use most of Spring, so there is no reason to exchange 1
> dependency for 2, or 3. Because then the majority needs to exclude
> those 2 (or 3) dependencies from their poms.

> Martijn

> On 7/22/07, cwilkes <cw...@ladro.com> wrote:
>>
>> Currently the 1.3.0-beta2 version of wicket-parent and wicket-spring depend
>> on the large single "spring" jar.  Can this be changed to just depend on the
>> org.springframework artifacts spring-context and spring-web?
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Can-wicket-spring-just-depend-on-spring-context-and-spring-web--tf4125986.html#a11733423
>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>
>>





-- 
Best regards,
 Oleg                            mailto:otaranenko@key-software.com


Re: Can wicket-spring just depend on spring-context and spring-web?

Posted by Martijn Dashorst <ma...@gmail.com>.
I think that depending on the catch all for spring is probably the
best for Wicket. If you really want to depend on the individual
modules, it is merely a matter of adding excludes to your
wicket-spring dependency and including those you do want.

The reason being: most people (at least those that I know) already
want to use most of Spring, so there is no reason to exchange 1
dependency for 2, or 3. Because then the majority needs to exclude
those 2 (or 3) dependencies from their poms.

Martijn

On 7/22/07, cwilkes <cw...@ladro.com> wrote:
>
> Currently the 1.3.0-beta2 version of wicket-parent and wicket-spring depend
> on the large single "spring" jar.  Can this be changed to just depend on the
> org.springframework artifacts spring-context and spring-web?
>
>
> --
> View this message in context: http://www.nabble.com/Can-wicket-spring-just-depend-on-spring-context-and-spring-web--tf4125986.html#a11733423
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/