You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tom Bollwitt (JIRA)" <ji...@codehaus.org> on 2008/06/12 15:52:13 UTC

[jira] Issue Comment Edited: (MECLIPSE-79) exclude dependencies from the Classpath Container

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

tlbollwitt edited comment on MECLIPSE-79 at 6/12/08 8:51 AM:
---------------------------------------------------------------

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.

      was (Author: tlbollwitt):
    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