You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Tolentino (JIRA)" <ji...@codehaus.org> on 2006/03/20 09:58:11 UTC
[jira] Commented: (MWAR-23) war plugin doesn't copy dependencies
with system scope
[ http://jira.codehaus.org/browse/MWAR-23?page=comments#action_61515 ]
John Tolentino commented on MWAR-23:
------------------------------------
While debugging through maven-war-plugin, I noticed that project.getArtifacts() did not include the artifacts with system scope. This means that adding:
public void buildWebapp( MavenProject project, File webappDirectory )
throws MojoExecutionException, IOException
{
...
ScopeArtifactFilter runtimeFilter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
ScopeArtifactFilter systemFilter = new ScopeArtifactFilter( Artifact.SCOPE_SYSTEM );
if ( !artifact.isOptional() && ( runtimeFilter.include( artifact ) || systemFilter.include( artifact ) ) )
...
}
won't work. There are two options to solve this:
1. Modify Maven 2 core to include artifacts in project.getArtifacts()
2. Go through the dependency list and individually fetch the artifacts with system scope.
#2 is a more complicated solution because we have to check through the inclusions/exclusions list and won't reuse existing framework to properly filter artifacts. There is also duplication in the code.
#1 however won't be in time for the Maven 2.0.3 release because the versions to be included in that release is already decided on.
I suggest we move this issue to the next release.
> war plugin doesn't copy dependencies with system scope
> ------------------------------------------------------
>
> Key: MWAR-23
> URL: http://jira.codehaus.org/browse/MWAR-23
> Project: Maven 2.x War Plugin
> Type: Bug
> Versions: 2.0
> Reporter: Dan Diephouse
> Assignee: John Tolentino
> Priority: Minor
> Fix For: 2.0
>
>
> I set about trying to include a jar that is not in the repository (either local or remote) and I ended up using the <systemPath> element with a scope of system for the dependency. Unfortunately the maven war plugin doesn't copy the jar to the war. I see two solutions:
> 1. Change the war plugin so it is included
> 2. Provide some mechanism to include jars on the filesystem in arbitrary places without a scope of system
--
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