|Re: [m2e-users] Code completion only for direct dependencies|
I know the dependency:analyze goal, which does exactly, what I'd like to be integrated into m2e: Recognize dependencies, which aren't declared explicitly.
Igor, which other metadata do you think is needed? Wouldn't it be sufficient to check, if a dependency is declared directly in the project's pom?
In a non-maven project, .classpath would look like this:
<classpathentry kind="lib" path="libs/somelib.jar" sourcepath="libs/somelib.jar">
<accessrule kind="nonaccessible" pattern="**"/>
Is it possible to define such "nonaccessible" rule for liraries within "org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"?
>>> <m2e-users-request@xxxxxxxxxxx> 09.03.2012 18:00 >>>
Date: Thu, 08 Mar 2012 18:40:10 -0500
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: Maven Integration for Eclipse users mailing list
Subject: Re: [m2e-users] Code completion only for direct dependencies
Content-Type: text/plain; charset=UTF-8
There is no notion of classpath access rules in Maven, so m2e simply does not have the metadata needed. Until this is supported in maven core, there is not much we can do in m2e.
Sent from my SGS
Stefan Rademacher <Rademacher@xxxxxxx> wrote:
>we are currently moving our complete build management from Ant to
>Maven. One advantage now is the strong dependency management,
>especially for transitive dependencies.
>But within eclipse, there is a big downside, that we didn't see before:
>The code completion allows every developer to use classes from any
>transitive dependency, even though it isn't explicitly declared in our
>An example: An open source library uses Google Guava internally, but we
>- for some reason - don't want to use it in our code. The "Maven
>Dependencies" in Eclipse contain Google Guava, because it is needed by
>that 3rd party library, and is consequently also offered in the Eclipse
>Is there a way to tell m2e to restrict the access only to the direct
>dependencies, declared in our pom.xml? Maybe by generating Eclipse
>access rules for the "Maven Dependencies" Classpath Container?
>Thank you very much and best regards
>m2e-users mailing list