getRuntimeClasspathElements

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-08 01:51:20 +00:00
parent f3ffe9a617
commit eb1ba08fac
1 changed files with 26 additions and 2 deletions

View File

@ -198,8 +198,32 @@ public List getTestClasspathElements()
if ( isAddedToClasspath( a ) )
{
// TODO: let the scope handler deal with this
if ( a.getScope() == null || Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() )
|| Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
if ( a.getScope() == null || Artifact.SCOPE_TEST.equals( a.getScope() ) ||
Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
{
list.add( a.getPath() );
}
}
}
return list;
}
public List getRuntimeClasspathElements()
{
List list = new ArrayList( getArtifacts().size() + 1 );
list.add( getBuild().getOutput() );
for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
if ( isAddedToClasspath( a ) )
{
// TODO: let the scope handler deal with this
if ( a.getScope() == null || Artifact.SCOPE_COMPILE.equals( a.getScope() ) ||
Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
{
list.add( a.getPath() );
}