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

Tom Bollwitt commented on MECLIPSE-79:
--------------------------------------

would it be possible to add the ability to exclude all dependencies? We are 
using the Maven Eclipse plugin (http://m2eclipse.sonatype.org/update/) and when 
adding...
<additionalProjectnatures>
        <projectnature>
                org.maven.ide.eclipse.maven2Nature
        </projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
        <buildCommand>
                <name>org.maven.ide.eclipse.maven2Builder</name>
        </buildCommand>
</additionalBuildcommands>

causes there to be duplicate classpath entries for the dependencies since all 
the M2_REPO variables are added to the classpath.
I checked out the code and changed line 601 in  AbstractIdeSupportMojo
FROM:
if ( getExcludes().contains( artifactFullId ))
TO:
if ( getExcludes().contains( artifactFullId ) ||  getExcludes().contains( "*:*" 
))

I then just added to the pom...
<excludes>
        <exclude>*:*</exclude>
</excludes>

This worked for what I needed and just thought that others may benefit from it.

> exclude dependencies from the Classpath Container
> -------------------------------------------------
>
>                 Key: MECLIPSE-79
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-79
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path
>         Environment: Windows, Eclipse 3.1.2
>            Reporter: Martin Goldhahn
>            Assignee: nicolas de loof
>             Fix For: 2.5
>
>         Attachments: MECLIPSE-79.patch
>
>
> There are some dependencies that need to be in the POM in order to compile 
> the project (e.g. javax.servlet). When I use Sysdeo's Tomcat plugin, I get an 
> error because the servlet classes from the POM are included in the classpath 
> via the classpath container.

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

        

Reply via email to