private void setupLocalMaven()

in src/main/java/org/apache/maven/artifact/ant/Mvn.java [117:142]


    private void setupLocalMaven()
    {
        // Set the required properties
        Variable classworldsConfProp = new Variable();
        classworldsConfProp.setKey( "classworlds.conf" );
        File classworldsPath = new File( mavenHome, "bin/m2.conf" );
        classworldsConfProp.setValue( classworldsPath.getAbsolutePath() );
        this.addSysproperty( classworldsConfProp );
        
        Variable mavenHomeProp = new Variable();
        mavenHomeProp.setKey( "maven.home" );
        mavenHomeProp.setValue( mavenHome.getAbsolutePath() );
        this.addSysproperty( mavenHomeProp );
        
        // Set the boot classpath
        FileSet bootDir = new FileSet();
        bootDir.setDir( new File ( mavenHome, "boot" ) );
        bootDir.setIncludes( "*.jar" );
        
        Path mavenClasspath = new Path( getProject() );
        mavenClasspath.addFileset( bootDir );
        
        this.setClasspath( mavenClasspath );
        
        this.setClassname( "org.codehaus.classworlds.Launcher" );
    }