mirror of https://github.com/apache/maven.git
Use constants for maven groupId
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@425105 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
92e731eb80
commit
d8ceac328a
|
@ -43,6 +43,8 @@ import java.util.Iterator;
|
|||
*/
|
||||
public class BootstrapInstaller
|
||||
{
|
||||
private static final String MAVEN_GROUPID = "org.apache.maven";
|
||||
|
||||
private final Bootstrap bootstrapper;
|
||||
|
||||
private final String prefix;
|
||||
|
@ -117,7 +119,7 @@ public class BootstrapInstaller
|
|||
|
||||
bootstrapper.buildProject( new File( basedir ), true );
|
||||
|
||||
Model mavenCliModel = bootstrapper.getCachedModel( "org.apache.maven", "maven-cli" );
|
||||
Model mavenCliModel = bootstrapper.getCachedModel( MAVEN_GROUPID, "maven-cli" );
|
||||
|
||||
File installation = new File( basedir, "bootstrap/target/installation" );
|
||||
createInstallation( installation, mavenCliModel );
|
||||
|
|
|
@ -35,6 +35,10 @@ import java.util.Properties;
|
|||
public class DefaultRuntimeInformation
|
||||
implements RuntimeInformation, Initializable
|
||||
{
|
||||
private static final String MAVEN_GROUPID = "org.apache.maven";
|
||||
|
||||
private static final String MAVEN_PROPERTIES = "META-INF/maven/" + MAVEN_GROUPID + "/maven-core/pom.properties";
|
||||
|
||||
private ArtifactVersion applicationVersion;
|
||||
|
||||
public ArtifactVersion getApplicationVersion()
|
||||
|
@ -49,8 +53,12 @@ public class DefaultRuntimeInformation
|
|||
try
|
||||
{
|
||||
Properties properties = new Properties();
|
||||
resourceAsStream = getClass().getClassLoader().getResourceAsStream(
|
||||
"META-INF/maven/org.apache.maven/maven-core/pom.properties" );
|
||||
resourceAsStream = getClass().getClassLoader().getResourceAsStream( MAVEN_PROPERTIES );
|
||||
|
||||
if ( resourceAsStream == null )
|
||||
{
|
||||
throw new IllegalStateException( "Unable to find Maven properties in classpath: " + MAVEN_PROPERTIES );
|
||||
}
|
||||
properties.load( resourceAsStream );
|
||||
|
||||
String property = properties.getProperty( "version" );
|
||||
|
|
Loading…
Reference in New Issue