You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Owen Jacobson (JIRA)" <ji...@codehaus.org> on 2009/07/10 05:52:22 UTC

[jira] Commented: (MECLIPSE-539) runtime scope dependencies should not be included into .classpath

    [ http://jira.codehaus.org/browse/MECLIPSE-539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183146#action_183146 ] 

Owen Jacobson commented on MECLIPSE-539:
----------------------------------------

This doesn't just affect the runtime scope, though: test scope dependencies are usable anywhere in the resulting Eclipse project, even though using them in the wrong part of the project prevents mvn compile from building your project. I don't think there's a good way around this in the general case: Eclipse, ultimately, only has one classpath scope, which is tied to the whole project.

Get in the habit of checking your commits by doing a clean build in maven before committing, and set up CI (hudson, bamboo, cruisecontrol, whatever) to catch the ones you and your team miss. It's not optimal, but without more support for dependency scoping in eclipse, it's probably as good as it gets.

Before someone suggests it, no, dependency filtering (through Eclipse's include/exclude feature) isn't good enough - it goes the wrong direction, so you can't say that src/main/java excludes org.junit and unit.

> runtime scope dependencies should not be included into .classpath
> -----------------------------------------------------------------
>
>                 Key: MECLIPSE-539
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-539
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path (.classpath)
>    Affects Versions: 2.6
>         Environment: maven 2.0.9
> Java 6
> Eclipse 3.4.2
> WinXP
>            Reporter: Jean-Paul GUIGUI
>
> "runtime" scope dependencies are today included by "mvn eclipse:eclipse" into the .classpath as the other compile dependencies. It should not since it make possible to use these runtime dependencies by mistake into Eclipse and then write code which is broken the "mvn compile" goal.
> Ideally the "runtime" dependencies should not be included into the .classpath, but add only as "User entries" into the "Run configuration -> Classpath" of Eclipse

-- 
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