You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Nathaniel Stoddard (JIRA)" <ji...@codehaus.org> on 2005/06/24 03:27:52 UTC

[jira] Created: (MNG-514) "Provided" dependencies not included in eclipse build path

"Provided" dependencies not included in eclipse build path
----------------------------------------------------------

         Key: MNG-514
         URL: http://jira.codehaus.org/browse/MNG-514
     Project: Maven 2
        Type: Bug
  Components: maven-plugins  
 Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
    Reporter: Nathaniel Stoddard


When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]

Jason van Zyl updated MNG-514:
------------------------------

    Fix Version: 2.0-beta-1

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>      Fix For: 2.0-beta-1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "kristian meier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-514?page=comments#action_43679 ] 

kristian meier commented on MNG-514:
------------------------------------

yesterday I run into this, without finding this bug before fixing it. so I added  a '*'-filter for the ScopeArtifactFilter, which allows to use @requiresDependencyResolution *


> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>      Fix For: 2.0-beta-2

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]

John Casey updated MNG-514:
---------------------------

    Fix Version:     (was: 2.0.1)
                 2.0.2

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-eclipse-plugin
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0.2

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]
     
Kenney Westerhof closed MNG-514:
--------------------------------


> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]

Brett Porter updated MNG-514:
-----------------------------

    Component:     (was: maven-plugins)
               maven-eclipse-plugin

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-eclipse-plugin
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-2

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Reopened: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]
     
Kenney Westerhof reopened MNG-514:
----------------------------------


The problem is back :-(

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-514?page=comments#action_50617 ] 

Kenney Westerhof commented on MNG-514:
--------------------------------------

There was a discussion on the dev list a month ago or more about this. I'm not sure 
what the outcome was, but I believe that scope=provided dependencies should be transitive; they
indicate that the target environment MUST provide those artifacts. Since eclipse is not the
target environment, and it _needs_ those artifacts because you'll get linkage problems
('class ... referenced from .class but not found' errors), I think provided should be 
transitive as well. Let the final project decide.

Btw, I didn't know what the .wtpmodules was for, but if it is for .war's, I agree on the different
handling.



> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-eclipse-plugin
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0.1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-514?page=comments#action_49652 ] 

fabrizio giustina commented on MNG-514:
---------------------------------------

a quick sum up for requisites, the actual situation is really messy:

.classpath
 - direct dependencies:
    - include compile/test/provided dependencies ***
    - include optional dependencies
    - dependencies should be included as project references if available in the current executedProject
 - referenced artifacts
    - include compile dependencies (no test/provided)
    - do not include optional dependencies
 - referenced project
    - do not include any dependency! ***

.wtpmodules (war)
 - direct dependencies:
    - include compile dependencies (no test/provided) ***
    - include optional dependencies
    - dependencies should be included as project references if available in the current executedProject
 - referenced artifacts
    - include compile dependencies (no test/provided)
    - do not include optional dependencies
 - referenced project
    - include compile dependencies (no test/provided) ***
    - do not include optional dependencies ***

the *** shows where classpath/wtpmodules should differ.
At the moment the same set of dependencies is added to both, so there are a bunch of bugs, expecially in a multiproject environment... using executedProject.getCompileSourceRoots() can't work so we have to manually build this list as it was done before.

If everybody agree in these requiremens we could try adding a master test with all this kind of dependencies


> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-eclipse-plugin
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0.1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Resolved: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]
     
Kenney Westerhof resolved MNG-514:
----------------------------------

      Assign To: Kenney Westerhof
     Resolution: Fixed
    Fix Version:     (was: 2.0-beta-2)
                 2.0-beta-1

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]

Brett Porter updated MNG-514:
-----------------------------

    Fix Version:     (was: 2.0-beta-1)
                 2.0-beta-2

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-2

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-514?page=comments#action_50605 ] 

fabrizio giustina commented on MNG-514:
---------------------------------------

This is working as expected for me, direct provided dependencies are added but transitive ones don't.
If nobody will comment on this I will close the issue shortly, else check the EclipsePluginMasterProjectTest results and discuss what you did expect.

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-eclipse-plugin
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0.1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-514?page=comments#action_46367 ] 

Kenney Westerhof commented on MNG-514:
--------------------------------------

I made a testcase for eclipse, but since that doesn't use the full m2 environment that test always fails.
Here's how to reproduce:

- project A is the one you are calling eclipse:eclipse on
- it has a dependency on project B (in the local repo), packaging war (not sure if that matters).
- project B has a dependency on C (for instance) with scope=provided.

B ends up in .classpath, but C doesnt. Direct dependencies for A with scope=provided do end up in .classpath.

So it seems when transitively resolving deps the scope is lost (dependencyResolution = test).

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-1

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-514?page=comments#action_43503 ] 

Kenney Westerhof commented on MNG-514:
--------------------------------------

A possible solution is to add the 'provided' jars to the test scope, because the eclipse plugin
@requiresDependencyResolution test. But it should indeed include all scopes.

Another solution is to add a new scope 'all'.

Here's a possible patch: (no attachment because it's so small :))

Index: maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
===================================================================
--- maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java     (revision 225475)
+++ maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java     (working copy)
@@ -54,7 +54,7 @@
         }
         else if ( DefaultArtifact.SCOPE_TEST.equals( scope ) )
         {
-            providedScope = false;
+            providedScope = true;
             compileScope = true;
             runtimeScope = true;
             testScope = true;


> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>      Fix For: 2.0-beta-2

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]

Brett Porter updated MNG-514:
-----------------------------

    Fix Version:     (was: 2.0-beta-3)
                 2.0-beta-4

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-eclipse-plugin
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>     Assignee: Kenney Westerhof
>      Fix For: 2.0-beta-4

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-514) "Provided" dependencies not included in eclipse build path

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-514?page=all ]

Brett Porter updated MNG-514:
-----------------------------

    Fix Version:     (was: 2.0-beta-1)
                 2.0-beta-2

> "Provided" dependencies not included in eclipse build path
> ----------------------------------------------------------
>
>          Key: MNG-514
>          URL: http://jira.codehaus.org/browse/MNG-514
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>  Environment: Windows XP SP2, J2SE 5.0, running against main trunk in SVN.
>     Reporter: Nathaniel Stoddard
>      Fix For: 2.0-beta-2

>
>
> When an eclipse project is generated for a project with a dependency whose scope is "provided", the dependency is not included in the build path of the project.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org