You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "James Carman (JIRA)" <ji...@apache.org> on 2008/02/15 20:16:08 UTC

[jira] Created: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Please Change Scope of Spring Dependencies in pom.xml File
----------------------------------------------------------

                 Key: WICKET-1348
                 URL: https://issues.apache.org/jira/browse/WICKET-1348
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-spring
            Reporter: James Carman


The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569630#action_12569630 ] 

James Carman commented on WICKET-1348:
--------------------------------------

>From a quickstart, I changed my pom by adding:

<dependency>
  <groupId>org.apache.wicket</groupId>
  <artifactId>wicket-spring</artifactId>
  <version>${wicket.version}</version>
</dependency>

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring</artifactId>
  <version>2.5.1</version>
</dependency>

Then, I ran mvn dependency:list and it spit out:

[INFO] Building quickstart
[INFO]    task-segment: [dependency:list]
[INFO] -------------------------------------------------------------------------
---
[INFO] [dependency:list]
[INFO]
[INFO] The following files have been resolved:
[INFO]    asm:asm:jar:1.5.3:compile
[INFO]    cglib:cglib-nodep:jar:2.1_3:compile
[INFO]    commons-logging:commons-logging:jar:1.1:compile
[INFO]    junit:junit:jar:3.8.2:test
[INFO]    log4j:log4j:jar:1.2.14:compile
[INFO]    mx4j:mx4j:jar:3.0.1:provided
[INFO]    mx4j:mx4j-tools:jar:3.0.1:provided
[INFO]    org.apache.wicket:wicket:jar:1.3.1:compile
[INFO]    org.apache.wicket:wicket-ioc:jar:1.3.1:compile
[INFO]    org.apache.wicket:wicket-spring:jar:1.3.1:compile
[INFO]    org.mortbay.jetty:jetty:jar:6.1.4:provided
[INFO]    org.mortbay.jetty:jetty-management:jar:6.1.4:provided
[INFO]    org.mortbay.jetty:jetty-util:jar:6.1.4:provided
[INFO]    org.mortbay.jetty:servlet-api-2.5:jar:6.1.4:provided
[INFO]    org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO]    org.slf4j:slf4j-log4j12:jar:1.4.2:compile
[INFO]    org.springframework:spring:jar:2.5.1:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------

> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>            Priority: Minor
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman updated WICKET-1348:
---------------------------------

    Priority: Minor  (was: Major)

Changing priority.

> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>            Priority: Minor
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "Timo Rantalaiho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569601#action_12569601 ] 

Timo Rantalaiho commented on WICKET-1348:
-----------------------------------------

I don't think that "provided" would work well in that case,
but maybe it would be a good idea to update the
wicket-spring Spring dependency version to latest stable 2.5
series version?  There's a lot of improvements, good
backwards compatibility and in 80 % of cases that should be
more correct than the current spring 2.0.

For a better solution you should probably improve something
in Maven.



> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569628#action_12569628 ] 

James Carman commented on WICKET-1348:
--------------------------------------

Interestingly enough, Maven2 is smart enough to use the latest version of the dependency.  If my project declares a dependency on artifactId=spring version=2.5.1, then the only thing on my classpath (even with the transitive dependency declared by wicket-spring) would be spring-2.5.1.jar and not spring-2.0.jar.  Is it your experience that most people use the "spring" artifact and not a combination of the spring-* artifacts (like orm, tx, core, context, etc.)?   I usually try to piece together what I need out of the smaller jars, but maybe I'm just doing too much work!  Anyway, I guess this is no big deal and maven appears to be doing all that it can to help by using the latest version of the library.  Should we close this issue and start another one to "upgrade" wicket-spring's spring dependency to 2.5.1?

> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman resolved WICKET-1348.
----------------------------------

    Resolution: Won't Fix

> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>            Priority: Minor
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569586#action_12569586 ] 

Martijn Dashorst commented on WICKET-1348:
------------------------------------------

In my opinion the scope as currently is (compile) is the correct scope. This *is* the way maven should be used. Provided means: is provided by a container, *not* what you are trying to subvert it to.

You should use a dependencyManagement for setting your own spring version.

> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman closed WICKET-1348.
--------------------------------


> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>            Priority: Minor
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569600#action_12569600 ] 

James Carman commented on WICKET-1348:
--------------------------------------

I don't care what it's set to.  I just don't want maven it to automatically include spring-2.0.jar in my application when I want to use wicket-spring (I'm currently wanting to use spring-2.5.1).  That's the goal.  I don't want to have to do an exclusion in my dependency to get it to exclude the transitive dependency.  The only scope that I'm aware of that's not transitive is "provided" which means that the runtime environment will provide this dependency (or a compatible version of it).

> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1348) Please Change Scope of Spring Dependencies in pom.xml File

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569607#action_12569607 ] 

Martijn Dashorst commented on WICKET-1348:
------------------------------------------

So use a dependencyManagement section in your pom, which overrides the spring depencency. That is all you need to do. The solution is *not* for Wicket to make the dependency 'provided'.

Resources:

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/preparing-dependencies.html



> Please Change Scope of Spring Dependencies in pom.xml File
> ----------------------------------------------------------
>
>                 Key: WICKET-1348
>                 URL: https://issues.apache.org/jira/browse/WICKET-1348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: James Carman
>
> The Spring dependencies need to be marked as "provided" or whatever so that they're not picked up transitively.  Projects using the wicket-spring library might want to use a different version of Spring and this can bring about some pretty nasty classpath errors to track down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.