maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/project MavenProject.java
Date Tue, 08 Mar 2005 01:51:20 GMT
brett       2005/03/07 17:51:20

  Modified:    maven-core/src/main/java/org/apache/maven/project
                        MavenProject.java
  Log:
  getRuntimeClasspathElements
  
  Revision  Changes    Path
  1.23      +26 -2     maven-components/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
  
  Index: MavenProject.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/project/MavenProject.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- MavenProject.java	7 Mar 2005 20:54:34 -0000	1.22
  +++ MavenProject.java	8 Mar 2005 01:51:20 -0000	1.23
  @@ -198,8 +198,32 @@
               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() );
                   }
  
  
  

Mime
View raw message