make sure paths are processed after plugin configuration is merged

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163616 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-18 23:32:37 +00:00
parent 10b55add40
commit 49552c8688
1 changed files with 43 additions and 47 deletions

View File

@ -459,13 +459,9 @@ public class DefaultPluginManager
public Map createParameters( MojoDescriptor goal, MavenSession session )
throws PluginConfigurationException
{
Map map = null;
List parameters = goal.getParameters();
if ( parameters != null )
{
map = new HashMap();
Map map = new HashMap();
for ( int i = 0; i < parameters.size(); i++ )
{
@ -487,14 +483,6 @@ public class DefaultPluginManager
}
}
String type = parameter.getType();
if ( type != null && ( type.equals( "File" ) || type.equals( "java.io.File" ) ) )
{
value = pathTranslator.alignToBaseDirectory( (String) value,
session.getProject().getFile().getParentFile() );
}
map.put( key, value );
}
@ -502,7 +490,6 @@ public class DefaultPluginManager
{
map = mergeProjectDefinedPluginConfiguration( session.getProject(), goal.getId(), map );
}
}
for ( int i = 0; i < parameters.size(); i++ )
{
@ -525,6 +512,15 @@ public class DefaultPluginManager
{
throw new PluginConfigurationException( createPluginParameterRequiredMessage( goal, parameter ) );
}
String type = parameter.getType();
if ( type != null && ( type.equals( "File" ) || type.equals( "java.io.File" ) ) )
{
value = pathTranslator.alignToBaseDirectory( (String) value,
session.getProject().getFile().getParentFile() );
map.put( key, value );
}
}
return map;
@ -546,7 +542,7 @@ public class DefaultPluginManager
{
org.apache.maven.model.Plugin plugin = (org.apache.maven.model.Plugin) iterator.next();
// TODO: groupID not handled
// TODO: groupID not handled
if ( pluginId.equals( plugin.getArtifactId() ) )
{
return CollectionUtils.mergeMaps( plugin.getConfiguration(), map );
@ -567,9 +563,9 @@ public class DefaultPluginManager
return message.toString();
}
// ----------------------------------------------------------------------
// Lifecycle
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Lifecycle
// ----------------------------------------------------------------------
public void contextualize( Context context )
throws ContextException
@ -586,10 +582,10 @@ public class DefaultPluginManager
"plexus-artifact-container", "wagon-provider-api",
"classworlds"} );
// TODO: move this to be configurable from the Maven component
// TODO: move this to be configurable from the Maven component
remotePluginRepositories = new ArrayList();
// TODO: needs to be configured from the POM element
// TODO: needs to be configured from the POM element
MavenSettings settings = null;
try
@ -611,9 +607,9 @@ public class DefaultPluginManager
remotePluginRepositories.add( pluginRepository );
}
// ----------------------------------------------------------------------
// Artifact resolution
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Artifact resolution
// ----------------------------------------------------------------------
private void resolveTransitiveDependencies( MavenSession context, ArtifactResolver artifactResolver,
MavenProjectBuilder mavenProjectBuilder )
@ -631,9 +627,9 @@ public class DefaultPluginManager
project.addArtifacts( result.getArtifacts().values() );
}
// ----------------------------------------------------------------------
// Artifact downloading
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Artifact downloading
// ----------------------------------------------------------------------
private void downloadDependencies( MavenSession context, ArtifactResolver artifactResolver )
throws GoalExecutionException