mirror of https://github.com/apache/maven.git
o actually put a valid GAV in the super pom
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@727290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
084d0b3ed4
commit
f869413e44
|
@ -20,8 +20,10 @@ under the License.
|
||||||
<!-- START SNIPPET: superpom -->
|
<!-- START SNIPPET: superpom -->
|
||||||
<project>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>super-pom</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
<name>Maven Default Project</name>
|
<name>Maven Default Project</name>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>central</id>
|
<id>central</id>
|
||||||
|
|
|
@ -22,6 +22,8 @@ package org.apache.maven.project;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
import java.io.StringReader;
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -44,6 +46,7 @@ import org.apache.maven.model.Build;
|
||||||
import org.apache.maven.model.Model;
|
import org.apache.maven.model.Model;
|
||||||
import org.apache.maven.model.Profile;
|
import org.apache.maven.model.Profile;
|
||||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||||
|
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
|
||||||
import org.apache.maven.profiles.MavenProfilesBuilder;
|
import org.apache.maven.profiles.MavenProfilesBuilder;
|
||||||
import org.apache.maven.profiles.ProfileManager;
|
import org.apache.maven.profiles.ProfileManager;
|
||||||
import org.apache.maven.profiles.activation.DefaultProfileActivationContext;
|
import org.apache.maven.profiles.activation.DefaultProfileActivationContext;
|
||||||
|
@ -137,8 +140,12 @@ public class DefaultMavenProjectBuilder
|
||||||
public MavenProject build( File projectDescriptor, ProjectBuilderConfiguration config )
|
public MavenProject build( File projectDescriptor, ProjectBuilderConfiguration config )
|
||||||
throws ProjectBuildingException
|
throws ProjectBuildingException
|
||||||
{
|
{
|
||||||
MavenProject project = readModelFromLocalPath( "unknown", projectDescriptor, new DefaultPomArtifactResolver( config.getLocalRepository(), mavenTools
|
List repositories = mavenTools.buildArtifactRepositories( getSuperModel() );
|
||||||
.buildArtifactRepositories( getSuperModel() ), artifactResolver ), config );
|
|
||||||
|
MavenProject project = readModelFromLocalPath( "unknown",
|
||||||
|
projectDescriptor,
|
||||||
|
new DefaultPomArtifactResolver( config.getLocalRepository(),
|
||||||
|
repositories, artifactResolver ), config );
|
||||||
|
|
||||||
project.setFile( projectDescriptor );
|
project.setFile( projectDescriptor );
|
||||||
|
|
||||||
|
@ -209,19 +216,14 @@ public class DefaultMavenProjectBuilder
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is used for pom-less execution like running archetype:generate.
|
||||||
|
*/
|
||||||
public MavenProject buildStandaloneSuperProject( ProjectBuilderConfiguration config )
|
public MavenProject buildStandaloneSuperProject( ProjectBuilderConfiguration config )
|
||||||
throws ProjectBuildingException
|
throws ProjectBuildingException
|
||||||
{
|
{
|
||||||
Model superModel = getSuperModel();
|
Model superModel = getSuperModel();
|
||||||
|
|
||||||
superModel.setGroupId( STANDALONE_SUPERPOM_GROUPID );
|
|
||||||
|
|
||||||
superModel.setArtifactId( STANDALONE_SUPERPOM_ARTIFACTID );
|
|
||||||
|
|
||||||
superModel.setVersion( STANDALONE_SUPERPOM_VERSION );
|
|
||||||
|
|
||||||
superModel = superModel;
|
|
||||||
|
|
||||||
ProfileManager profileManager = config.getGlobalProfileManager();
|
ProfileManager profileManager = config.getGlobalProfileManager();
|
||||||
|
|
||||||
List activeProfiles = new ArrayList();
|
List activeProfiles = new ArrayList();
|
||||||
|
|
|
@ -47,4 +47,3 @@ public final class PomClassicTransformer
|
||||||
Interpolator.interpolateModelProperties( modelProperties, interpolatorProperties, (PomClassicDomainModel) domainModel);
|
Interpolator.interpolateModelProperties( modelProperties, interpolatorProperties, (PomClassicDomainModel) domainModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,10 @@ under the License.
|
||||||
<!-- START SNIPPET: superpom -->
|
<!-- START SNIPPET: superpom -->
|
||||||
<project>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>super-pom</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
<name>Maven Default Project</name>
|
<name>Maven Default Project</name>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>central</id>
|
<id>central</id>
|
||||||
|
|
Loading…
Reference in New Issue