Package org.apache.maven.project

Examples of org.apache.maven.project.DefaultProjectBuilderConfiguration


        Properties props = new Properties();
        props.putAll( context );

        return interpolate( model,
                            null,
                            new DefaultProjectBuilderConfiguration().setExecutionProperties( props ),
                            true );
    }
View Full Code Here


                throw new ProjectBuildingException( "unknown", "The file " + pom.getAbsolutePath() +
                    " you specified has zero length." );
            }
        }

        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
        config.setLocalRepository( request.getLocalRepository() )
              .setGlobalProfileManager( request.getGlobalProfileManager() )
              .setUserProperties( request.getUserProperties() );

        return projectBuilder.build( pom, config );
    }
View Full Code Here

    {
        if ( superProject == null )
        {
            try
            {
                superProject = mavenProjectBuilder.buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration() );
            }
            catch ( ProjectBuildingException e )
            {
                throw new ArtifactMetadataRetrievalException(
                    "Unable to parse the Maven built-in model: " + e.getMessage(), e );
View Full Code Here

     * NOTE: This varies from {@link DefaultMavenExecutionRequest#getProjectBuilderConfiguration()} in that
     * it doesn't supply a global profile manager.
     */
    public ProjectBuilderConfiguration getProjectBuilderConfiguration()
    {
        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
        config.setLocalRepository( getLocalRepository() )
              .setExecutionProperties( getExecutionProperties() )
              .setUserProperties( getUserProperties() )
              .setBuildStartTime( getStartTime() );

        return config;
View Full Code Here

        model.addDependency( dep );

        ModelInterpolator interpolator = createInterpolator();
       
        Model result = interpolator.interpolate( model, basedir, new DefaultProjectBuilderConfiguration(), true );

        List rDeps = result.getDependencies();
        assertNotNull( rDeps );
        assertEquals( 1, rDeps.size() );
        assertEquals( new File( basedir, "artifact.jar" ).getAbsolutePath(), new File( ( (Dependency) rDeps.get( 0 ) )
View Full Code Here

        PathTranslator translator = new DefaultPathTranslator();
        ModelInterpolator interpolator = createInterpolator( translator );
       
        File basedir = new File( System.getProperty( "java.io.tmpdir" ), "base" );
       
        String value = interpolator.interpolate( "${project.build.outputDirectory}/foo", model, basedir, new DefaultProjectBuilderConfiguration(), true );
        value = value.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
       
        String check = new File( basedir, "target/classes/foo" ).getAbsolutePath();
        check = check.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
       
View Full Code Here

        return userProperties;
    }

    public ProjectBuilderConfiguration getProjectBuilderConfiguration()
    {
        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
        config.setLocalRepository( getLocalRepository() )
              .setGlobalProfileManager( getGlobalProfileManager() )
              .setExecutionProperties( getExecutionProperties() )
              .setUserProperties( getUserProperties() )
              .setBuildStartTime( startTime );
View Full Code Here

        Properties props = new Properties();
        props.putAll( context );

        return interpolate( model,
                            null,
                            new DefaultProjectBuilderConfiguration().setExecutionProperties( props ),
                            true );
    }
View Full Code Here

        String[] values = { "${key}", "${key2}" };

        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();

        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setExecutionProperties( p );

        interpolator.interpolateObject( values, model, new File( "." ), config, true );

        assertEquals( "value", values[0] );
        assertEquals( "value2", values[1] );
View Full Code Here

        ObjectWithStringArrayField obj = new ObjectWithStringArrayField( values );

        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();

        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setExecutionProperties( p );

        interpolator.interpolateObject( obj, model, new File( "." ), config, true );

        assertEquals( "value", obj.values[0] );
        assertEquals( "value2", obj.values[1] );
View Full Code Here

TOP

Related Classes of org.apache.maven.project.DefaultProjectBuilderConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.