private void addAntProjectReferences()

in src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java [342:367]


    private void addAntProjectReferences(MavenProject mavenProject, Project antProject)
            throws DependencyResolutionRequiredException {
        Path p = new Path(antProject);
        p.setPath(StringUtils.join(mavenProject.getCompileClasspathElements().iterator(), File.pathSeparator));

        /* maven.dependency.classpath it's deprecated as it's equal to maven.compile.classpath */
        antProject.addReference(MAVEN_REFID_PREFIX + "dependency.classpath", p);
        antProject.addReference(MAVEN_REFID_PREFIX + "compile.classpath", p);

        p = new Path(antProject);
        p.setPath(StringUtils.join(mavenProject.getRuntimeClasspathElements().iterator(), File.pathSeparator));
        antProject.addReference(MAVEN_REFID_PREFIX + "runtime.classpath", p);

        p = new Path(antProject);
        p.setPath(StringUtils.join(mavenProject.getTestClasspathElements().iterator(), File.pathSeparator));
        antProject.addReference(MAVEN_REFID_PREFIX + "test.classpath", p);

        /* set maven.plugin.classpath with plugin dependencies */
        antProject.addReference(
                MAVEN_REFID_PREFIX + "plugin.classpath", getPathFromArtifacts(pluginArtifacts, antProject));

        antProject.addReference(DEFAULT_MAVEN_PROJECT_REFID, mavenProject);
        antProject.addReference(DEFAULT_MAVEN_PROJECT_REF_REFID, new MavenAntRunProject(mavenProject));
        antProject.addReference(DEFAULT_MAVEN_PROJECT_HELPER_REFID, projectHelper);
        antProject.addReference(MAVEN_REFID_PREFIX + "local.repository", localRepository);
    }