src/main/java/org/codehaus/mojo/exec/ExecMojo.java
private List<String> computePath( AbstractPath specifiedClasspath )
    {
        List<Artifact> artifacts = new ArrayList<>();
        List<Path> theClasspathFiles = new ArrayList<>();
        List<String> resultList = new ArrayList<>();

        collectProjectArtifactsAndClasspath( artifacts, theClasspathFiles );

        if ( ( specifiedClasspath != null ) && ( specifiedClasspath.getDependencies() != null ) )
        {
            artifacts = filterArtifacts( artifacts, specifiedClasspath.getDependencies() );
        }

        for ( Path f : theClasspathFiles )
        {
            resultList.add( f.toAbsolutePath().toString() );
        }

        for ( Artifact artifact : artifacts )
        {
            getLog().debug( "dealing with " + artifact );
            resultList.add( artifact.getFile().getAbsolutePath() );
        }

        return resultList;
    }
private List<String> computePath( AbstractPath specifiedClasspath )
    {
        List<Artifact> artifacts = new ArrayList<>();
        List<Path> theClasspathFiles = new ArrayList<>();
        List<String> resultList = new ArrayList<>();

        collectProjectArtifactsAndClasspath( artifacts, theClasspathFiles );

        if ( ( specifiedClasspath != null ) && ( specifiedClasspath.getDependencies() != null ) )
        {
            artifacts = filterArtifacts( artifacts, specifiedClasspath.getDependencies() );
        }

        for ( Path f : theClasspathFiles )
        {
            resultList.add( f.toAbsolutePath().toString() );
        }

        for ( Artifact artifact : artifacts )
        {
            getLog().debug( "dealing with " + artifact );
            resultList.add( artifact.getFile().getAbsolutePath() );
        }

        return resultList;
    }
private List < String > computePath ( AbstractPath specifiedClasspath ) { List < Artifact > artifacts = new ArrayList <> ( ) ; List < Path > theClasspathFiles = new ArrayList <> ( ) ; List < String > resultList = new ArrayList <> ( ) ; collectProjectArtifactsAndClasspath ( artifacts , theClasspathFiles ) ; if ( ( specifiedClasspath != null ) && ( specifiedClasspath . getDependencies ( ) != null ) ) { artifacts = filterArtifacts ( artifacts , specifiedClasspath . getDependencies ( ) ) ; } for ( Path f : theClasspathFiles ) { resultList . add ( f . toAbsolutePath ( ) . toString ( ) ) ; } for ( Artifact artifact : artifacts ) { getLog ( ) . debug ( "dealing with " + artifact ) ; resultList . add ( artifact . getFile ( ) . getAbsolutePath ( ) ) ; } return resultList ; }
Compute the classpath from the specified Classpath. The computed classpath is based on the classpathScope. The
plugin cannot know from maven the phase it is executed in. So we have to depend on the user to tell us he wants
the scope in which the plugin is expected to be executed.

@param specifiedClasspath Non null when the user restricted the dependencies, <code>null</code> otherwise (the
default classpath will be used)
@return a list of class path elements
Compute the classpath from the specified Classpath . The computed classpath is based on the classpathScope . The plugin cannot know from maven the phase it is executed in . So we have to depend on the user to tell us he wants the scope in which the plugin is expected to be executed .