o restoring method in model builder, i can't fix them all in old plugins because there are 3.x classes i won't backport

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@770460 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-04-30 21:53:23 +00:00
parent 93cff78fbf
commit 962586d6a6
3 changed files with 23 additions and 3 deletions

View File

@ -121,7 +121,6 @@ public class DefaultLifecycleExecutor
for ( String goal : goals )
{
String target = currentProject.getId() + " ( " + goal + " )";
System.out.println( "target: " + target );
executeGoalAndHandleFailures( goal, session, currentProject, buildStartTime, target );
}
}
@ -179,6 +178,7 @@ public class DefaultLifecycleExecutor
{
try
{
logger.info( executionDescription( mojoExecution ) );
pluginManager.executeMojo( session, mojoExecution );
}
catch ( PluginExecutionException e )
@ -193,6 +193,14 @@ public class DefaultLifecycleExecutor
}
}
}
private String executionDescription( MojoExecution me )
{
PluginDescriptor pd = me.getMojoDescriptor().getPluginDescriptor();
StringBuffer sb = new StringBuffer();
sb.append( pd.getArtifactId() + ":" + pd.getVersion() + ":" + me.getMojoDescriptor().getGoal() );
return sb.toString();
}
// 1. Find the lifecycle given the phase (default lifecycle when given install)
// 2. Find the lifecycle mapping that corresponds to the project packaging (jar lifecycle mapping given the jar packaging)

View File

@ -323,7 +323,14 @@ public class DefaultMavenProjectBuilder
return null;
}
public MavenProject buildFromRepository( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
throws ProjectBuildingException
{
return buildFromRepository( artifact, new DefaultProjectBuilderConfiguration( localRepository, remoteRepositories ) );
}
public MavenProject buildFromRepository(Artifact artifact, ProjectBuilderConfiguration configuration )
throws ProjectBuildingException
{

View File

@ -16,6 +16,7 @@ package org.apache.maven.project;
*/
import java.io.File;
import java.util.List;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
@ -26,7 +27,11 @@ public interface MavenProjectBuilder
// site
MavenProject build( File project, ArtifactRepository localRepository, ProfileManager profileManager )
throws ProjectBuildingException;
// remote-resources-plugin
MavenProject buildFromRepository( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
throws ProjectBuildingException;
MavenProject build( File project, ProjectBuilderConfiguration configuration )
throws ProjectBuildingException;