[
https://jira.codehaus.org/browse/MWAR-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308502#comment-308502
]
Alex T commented on MWAR-110:
-----------------------------
We're seeing this as well. Will try to reproduce.
> Dependencies with scope "provided" are incorrectly added to the WEB-INF/lib
> directory
> -------------------------------------------------------------------------------------
>
> Key: MWAR-110
> URL: https://jira.codehaus.org/browse/MWAR-110
> Project: Maven 2.x WAR Plugin
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Manuel Santillán
> Assignee: Stéphane Nicoll
>
> buildWebapp method in class AbstractWarMojo does the following:
> ...
> ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME
> );
> if ( !artifact.isOptional() && filter.include( artifact ) )
> ...
> while it should do something like
> ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_PROVIDED
> );
> if ( !artifact.isOptional() && filter.include( artifact ) )
> in order to be in-sync with the documentation. Probably both runtime and
> provided dependencies should be excluded from the lib directory, so something
> like
> ScopeArtifactFilter runtimeFilter = new ScopeArtifactFilter(
> Artifact.SCOPE_RUNTIME );
> ScopeArtifactFilter providedFilter = new ScopeArtifactFilter(
> Artifact.SCOPE_PROVIDED );
> if ( !artifact.isOptional() && runtimeFilter.include( artifact )
> &&providedFilter.include(artifact) )
> would be more appropriate.
> Sorry for not attaching a proper patch to the issue, but I'm afraid I don't
> have svn access through my corporate firewall. However, it should be quite a
> straightforward fix.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira