You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephane Nicoll (JIRA)" <ji...@codehaus.org> on 2007/07/20 14:38:13 UTC
[jira] Closed: (MWAR-110) Dependencies with scope "provided" are
incorrectly added to the WEB-INF/lib directory
[ http://jira.codehaus.org/browse/MWAR-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephane Nicoll closed MWAR-110.
--------------------------------
Assignee: Stephane Nicoll
Resolution: Cannot Reproduce
Provided libs are not added to the WEB-INF/lib directory. If it was the case, it would be a blocker issue.
It's most probably a misuse on your side. If you can reproduce, attach a sample project.
> Dependencies with scope "provided" are incorrectly added to the WEB-INF/lib directory
> -------------------------------------------------------------------------------------
>
> Key: MWAR-110
> URL: http://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: Stephane 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira