Package org.apache.maven.project

Examples of org.apache.maven.project.ProjectBuilderConfiguration


    }
  }

  @SuppressWarnings("deprecation")
    private ArtifactRepository getArtifactRepositoryMaven21(MavenProject pom) {
      ProjectBuilderConfiguration projectBuilderConfiguration;
        try {
            // Since maven-plugin is compiled against maven-core-3x, we need to retrieve
            // this maven 2 object via reflection
            Method method = MavenProject.class.getMethod("getProjectBuilderConfiguration");
            projectBuilderConfiguration = (ProjectBuilderConfiguration) method.invoke(pom);
            return projectBuilderConfiguration.getLocalRepository();
        } catch (Exception e) {
            LOGGER.log(Level.WARNING, "Could not retrieve BuilderConfigration", e);
            return null;
        }
    }
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

     * 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

        return userProperties;
    }

    public ProjectBuilderConfiguration getProjectBuilderConfiguration()
    {
        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
        config.setLocalRepository( getLocalRepository() )
              .setGlobalProfileManager( getGlobalProfileManager() )
              .setExecutionProperties( getExecutionProperties() )
              .setUserProperties( getUserProperties() )
              .setBuildStartTime( startTime );
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

        ObjectWithListField obj = new ObjectWithListField( values );

        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();

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

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

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

        ObjectWithListField obj = new ObjectWithListField( values );

        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();

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

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

        assertEquals( "key", obj.values.get( 0 ) );
        assertEquals( "value2", obj.values.get( 1 ) );
View Full Code Here

        ObjectWithListField obj = new ObjectWithListField( values );

        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();

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

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

        assertEquals( "${key}", obj.values.get( 0 ) );
    }
View Full Code Here

        ObjectWithListField obj = new ObjectWithListField( values );

        StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();

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

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

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

TOP

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

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.