mirror of https://github.com/apache/maven.git
getRuntimeClasspathElements
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f3ffe9a617
commit
eb1ba08fac
|
@ -198,8 +198,32 @@ public class MavenProject
|
||||||
if ( isAddedToClasspath( a ) )
|
if ( isAddedToClasspath( a ) )
|
||||||
{
|
{
|
||||||
// TODO: let the scope handler deal with this
|
// TODO: let the scope handler deal with this
|
||||||
if ( a.getScope() == null || Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() )
|
if ( a.getScope() == null || Artifact.SCOPE_TEST.equals( a.getScope() ) ||
|
||||||
|| Artifact.SCOPE_RUNTIME.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() );
|
list.add( a.getPath() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue