Package org.apache.maven.model.building

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


        boolean localProject = artifact.getRepository() != null && "reactor".equals( artifact.getRepository().getId() );

        File pomFile = artifact.getFile();

        return build( localProject ? pomFile : null, new FileModelSource( pomFile ), configuration );
    }
View Full Code Here


            if ( StringUtils.contains( version, VersionUtil.SNAPSHOT ) )
            {
                File localSnapshotModel = findTimeStampedSnapshotPom( groupId, artifactId, version, model.getParent() );
                if ( localSnapshotModel != null )
                {
                    return new FileModelSource( localSnapshotModel );
                }

            }

            for ( RemoteRepository remoteRepository : remoteRepositories )
            {
                try
                {
                    boolean success = getModelFromProxy( remoteRepository, groupId, artifactId, version, filename );
                    if ( success && model.exists() )
                    {
                        log.info(
                            "Model '{}' successfully retrieved from remote repository '{}'",
                                model.getAbsolutePath(), remoteRepository.getId() );
                        break;
                    }
                }
                catch ( ResourceDoesNotExistException e )
                {
                    log.info( "An exception was caught while attempting to retrieve model '{}' from remote repository '{}'.Reason:{}",
                                 new Object[]{ model.getAbsolutePath(), remoteRepository.getId(), e.getMessage() } );
                }
                catch ( Exception e )
                {
                    log.warn( "An exception was caught while attempting to retrieve model '{}' from remote repository '{}'.Reason:{}",
                                 new Object[]{ model.getAbsolutePath(), remoteRepository.getId(), e.getMessage() } );

                    continue;
                }
            }
        }

        return new FileModelSource( model );
    }
View Full Code Here

    // ----------------------------------------------------------------------

    public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest request )
        throws ProjectBuildingException
    {
        return build( pomFile, new FileModelSource( pomFile ), new InternalConfig( request, null ) );
    }
View Full Code Here

            artifact.selectVersion( pomArtifact.getVersion() );
            artifact.setFile( pomFile );
            artifact.setResolved( true );
        }

        return build( localProject ? pomFile : null, new FileModelSource( pomFile ), config );
    }
View Full Code Here

            throw new UnresolvableModelException( e.getMessage(), groupId, artifactId, version, e );
        }

        File pomFile = pomArtifact.getFile();

        return new FileModelSource( pomFile );
    }
View Full Code Here

                {
                    modelRequest.setPomFile( pomArtifact.getFile() );
                }
                else
                {
                    modelRequest.setModelSource( new FileModelSource( pomArtifact.getFile() ) );
                }

                model = modelBuilder.build( modelRequest ).getEffectiveModel();
            }
            catch ( ModelBuildingException e )
View Full Code Here

                + version + " due to " + e.getMessage(), groupId, artifactId, version, e);
        }

        final File pomFile = pomArtifact.getFile();

        return new FileModelSource(pomFile);

    }
View Full Code Here

                  + version + " due to " + e.getMessage(), groupId, artifactId, version, e);
      }

      final File pomFile = pomArtifact.getFile();

      return new FileModelSource(pomFile);

   }
View Full Code Here

    // ----------------------------------------------------------------------

    public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest configuration )
        throws ProjectBuildingException
    {
        return build( pomFile, new FileModelSource( pomFile ), configuration );
    }
View Full Code Here

        boolean localProject = artifact.getRepository() != null && "reactor".equals( artifact.getRepository().getId() );

        File pomFile = artifact.getFile();

        return build( localProject ? pomFile : null, new FileModelSource( pomFile ), configuration );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.model.building.FileModelSource

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.