[MNG-4246] plugin resolution failures during pom-less execution (like archetype:generate)

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@795353 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-07-18 12:31:23 +00:00
parent 70ae109093
commit fd2ee03635
1 changed files with 5 additions and 0 deletions

View File

@ -256,6 +256,9 @@ public class DefaultProjectBuilder
{
ModelBuildingRequest request = getModelBuildingRequest( config );
DefaultModelBuildingListener listener = new DefaultModelBuildingListener( projectBuildingHelper, config );
request.setModelBuildingListeners( Arrays.asList( listener ) );
request.setModelSource( new UrlModelSource( getClass().getResource( "standalone.xml" ) ) );
ModelBuildingResult result;
@ -281,6 +284,8 @@ public class DefaultProjectBuilder
standaloneProject.setActiveProfiles( result.getActiveExternalProfiles() );
standaloneProject.setInjectedProfileIds( "external", getProfileIds( result.getActiveExternalProfiles() ) );
standaloneProject.setRemoteArtifactRepositories( listener.getRemoteRepositories() );
standaloneProject.setPluginArtifactRepositories( listener.getPluginRepositories() );
standaloneProject.setExecutionRoot( true );