Examples of ModelSource


Examples of org.apache.maven.model.building.ModelSource

        // We have no POM file.
        //
        if ( request.getPom() == null )
        {
            ModelSource modelSource = new UrlModelSource( getClass().getResource( "project/standalone.xml" ) );
            MavenProject project =
                projectBuilder.build( modelSource, request.getProjectBuildingRequest() ).getProject();
            project.setExecutionRoot( true );
            projects.add( project );
            request.setProjectPresent( false );
View Full Code Here

Examples of org.apache.maven.model.building.ModelSource

     * spec this out properly.
     */
    public MavenProject buildStandaloneSuperProject( ProjectBuilderConfiguration config )
        throws ProjectBuildingException
    {
        ModelSource modelSource = new UrlModelSource( getClass().getResource( "standalone.xml" ) );
        MavenProject project = projectBuilder.build( modelSource, config ).getProject();
        project.setExecutionRoot( true );
        return project;
    }
View Full Code Here

Examples of org.apache.maven.model.building.ModelSource

        // We have no POM file.
        //
        if ( request.getPom() == null )
        {
            ModelSource modelSource = new UrlModelSource( DefaultMaven.class.getResource( "project/standalone.xml" ) );
            MavenProject project =
                projectBuilder.build( modelSource, request.getProjectBuildingRequest() ).getProject();
            project.setExecutionRoot( true );
            projects.add( project );
            request.setProjectPresent( false );
View Full Code Here

Examples of org.apache.maven.model.building.ModelSource

        // We have no POM file.
        //
        if ( request.getPom() == null )
        {
            ModelSource modelSource = new UrlModelSource( DefaultMaven.class.getResource( "project/standalone.xml" ) );
            MavenProject project =
                projectBuilder.build( modelSource, request.getProjectBuildingRequest() ).getProject();
            project.setExecutionRoot( true );
            projects.add( project );
            request.setProjectPresent( false );
View Full Code Here

Examples of org.apache.maven.model.building.ModelSource

            Object src = options.get(ModelProcessor.SOURCE);
            if ( src instanceof URL ) {
                return new File( ( (URL) src ).getFile() );
            }
            else if( src != null ) {
                ModelSource sm = (ModelSource) src;
                return new Filesm.getLocation() );
            }
        }
        return null;
    }
View Full Code Here

Examples of org.apache.maven.model.building.ModelSource

  }

  @SuppressWarnings( { "unchecked", "rawtypes" } )
  public Model read(final Reader input, final Map<String, ?> options) throws IOException, ModelParseException {
    assert manager != null;
    ModelSource source = (ModelSource) options.get( ModelProcessor.SOURCE );
    if ( ( "" + source ).contains".tesla." ) ) {
        System.out.println( source.getLocation() );

        File pom = new File( source.getLocation() );
        source =  new FileModelSource( new File( pom.getPath().replaceFirst( "[.]tesla[.]", "" ) ) );

        ((Map)options).put( ModelProcessor.SOURCE, source );

        ModelReader reader = manager.getReaderFor(options);
        Model model = reader.read(source.getInputStream(), options);

        MavenXpp3Writer xmlWriter = new MavenXpp3Writer();
        StringWriter xml = new StringWriter();
        xmlWriter.write( xml, model );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.