private Model getSuperModel() throws ProjectBuildingException { URL url = DefaultMavenProjectBuilder.class.getResource( "pom-" + MAVEN_MODEL_VERSION + ".xml" ); String projectId = safeVersionlessKey( STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_ARTIFACTID ); return readModel( projectId, url, true ); }
private List injectActiveProfiles( ProfileManager profileManager, Model model ) throws ProjectBuildingException { List activeProfiles; if ( profileManager != null ) { try { activeProfiles = profileManager.getActiveProfiles(); } catch ( ProfileActivationException e ) { String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() ); throw new ProjectBuildingException( projectId, e.getMessage(), e ); } for ( Iterator it = activeProfiles.iterator(); it.hasNext(); ) { Profile profile = (Profile) it.next(); profileInjector.inject( profile, model ); } } else { activeProfiles = Collections.EMPTY_LIST; } return activeProfiles; }
private MavenProject buildFromSourceFileInternal( File projectDescriptor, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus ) throws ProjectBuildingException { Model model = readModel( "unknown", projectDescriptor, true ); MavenProject project = buildInternal( projectDescriptor.getAbsolutePath(), model, config, buildArtifactRepositories( getSuperModel() ), projectDescriptor, true ); if ( checkDistributionManagementStatus ) { if ( ( project.getDistributionManagement() != null ) && ( project.getDistributionManagement().getStatus() != null ) ) { String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() ); throw new ProjectBuildingException( projectId, "Invalid project file: distribution status must not be specified for a project outside of the repository" ); } } return project; }
private List buildArtifactRepositories( Model model ) throws ProjectBuildingException { try { return ProjectUtils.buildArtifactRepositories( model.getRepositories(), artifactRepositoryFactory, container ); } catch ( InvalidRepositoryException e ) { String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() ); throw new ProjectBuildingException( projectId, e.getMessage(), e ); } }
throws ProjectBuildingException String projectId = safeVersionlessKey( artifact.getGroupId(), artifact.getArtifactId() );
String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() );
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() ); String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
String projectId = safeVersionlessKey( STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_ARTIFACTID );