Class ClasspathBuilder

  • All Implemented Interfaces:
    org.codehaus.plexus.logging.LogEnabled

    @Component(role=ClasspathBuilder.class)
    public class ClasspathBuilder
    extends org.codehaus.plexus.logging.AbstractLogEnabled
    Util to consolidate classpath manipulation stuff in one place.
    Version:
    $Id$
    Author:
    ccollins
    • Constructor Detail

      • ClasspathBuilder

        public ClasspathBuilder()
    • Method Detail

      • buildClasspathList

        public Collection<File> buildClasspathList​(org.apache.maven.project.MavenProject project,
                                                   String scope,
                                                   Set<org.apache.maven.artifact.Artifact> artifacts,
                                                   boolean isGenerator)
                                            throws ClasspathBuilderException
        Build classpath list using either gwtHome (if present) or using *project* dependencies. Note that this is ONLY used for the script/cmd writers (so the scopes are not for the compiler, or war plugins, etc). This is required so that the script writers can get the dependencies they need regardless of the Maven scopes (still want to use the Maven scopes for everything else Maven, but for GWT-Maven we need to access deps differently - directly at times).
        Parameters:
        project - The maven project the Mojo is running for
        artifacts - the project artifacts (all scopes)
        scope - artifact scope to use
        isGenerator - whether to use processed resources and compiled classes (false), or raw resources (true).
        Returns:
        file collection for classpath
        Throws:
        ClasspathBuilderException
      • addSourcesWithActiveProjects

        public void addSourcesWithActiveProjects​(org.apache.maven.project.MavenProject project,
                                                 Collection<File> items,
                                                 String scope)
        Add all sources and resources also with active (maven reactor active) referenced project sources and resources.
        Parameters:
        project -
        items -
        scope -
      • addResourcesWithActiveProjects

        public void addResourcesWithActiveProjects​(org.apache.maven.project.MavenProject project,
                                                   Collection<File> items,
                                                   String scope)
        Add all sources and resources also with active (maven reactor active) referenced project sources and resources.
        Parameters:
        project -
        items -
        scope -