o Fixed validation to happen ahead of project construction as this depends on proper repository information

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@778411 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-25 12:43:40 +00:00
parent dbe356a8e6
commit b16942f162
1 changed files with 2 additions and 2 deletions

View File

@ -356,14 +356,14 @@ public class DefaultMavenProjectBuilder
private MavenProject fromDomainModelToMavenProject( Model model, File parentFile, ProjectBuilderConfiguration config, File projectDescriptor )
throws InvalidProjectModelException, IOException
{
validateModel( model, projectDescriptor, config.istLenientValidation() );
MavenProject project;
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
try
{
project = new MavenProject( model, repositorySystem, this, config );
validateModel( model, projectDescriptor, config.istLenientValidation() );
Artifact projectArtifact = repositorySystem.createArtifact( project.getGroupId(), project.getArtifactId(), project.getVersion(), null, project.getPackaging() );
project.setArtifact( projectArtifact );