From ef62188881bf16ddbc2019871f55e8771c265fa1 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 28 Jul 2011 16:46:23 +0000 Subject: [PATCH] o make it possible to change: - the overarching archive name - id of the product - long name of the product - short name of the product - have "mvn -v" output this information so that it's clear it's not Apache Maven This allows people in the community creating builds of their own builds of Apache Maven to conform to the naming conventions put forth by the Apache Software Foundation. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1151924 13f79535-47bb-0310-9956-ffa450edef68 --- apache-maven/pom.xml | 5 +++++ build.xml | 11 +++++++++-- .../org/apache/maven/messages/build.properties | 3 +++ .../java/org/apache/maven/cli/CLIReportingUtils.java | 6 ++++-- pom.xml | 4 ++++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml index 5c2e06cce7..bf61481e2d 100644 --- a/apache-maven/pom.xml +++ b/apache-maven/pom.xml @@ -30,6 +30,10 @@ Maven Distribution Module to build the Maven distribution, source and binary, in zip and tar.gz formats. + + apache-maven + + org.apache.maven @@ -67,6 +71,7 @@ + ${distributionId}-${project.version} org.apache.maven.plugins diff --git a/build.xml b/build.xml index 2f516b81d0..75e3d35ff8 100644 --- a/build.xml +++ b/build.xml @@ -31,9 +31,12 @@ END SNIPPET: ant-bootstrap --> + + + Building ${distributionName} ... @@ -72,8 +75,8 @@ Do you want to continue? - - + + @@ -83,6 +86,9 @@ Do you want to continue? maven.home = ${maven.home} maven.repo.local = ${maven.repo.local} + distributionId = ${distributionId} + distributionName = ${distributionName} + distributionDirectory = ${distributionDirectory} @@ -252,6 +258,7 @@ Do you want to continue? + diff --git a/maven-core/src/main/resources/org/apache/maven/messages/build.properties b/maven-core/src/main/resources/org/apache/maven/messages/build.properties index a5fd160b61..ab2e60f8d8 100644 --- a/maven-core/src/main/resources/org/apache/maven/messages/build.properties +++ b/maven-core/src/main/resources/org/apache/maven/messages/build.properties @@ -1,3 +1,6 @@ buildNumber=${buildNumber} timestamp=${timestamp} version=${project.version} +distributionId=${distributionId} +distributionShortName=${distributionShortName} +distributionName=${distributionName} \ No newline at end of file diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java index 06227a18ce..bca4883b42 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java @@ -54,8 +54,9 @@ public final class CLIReportingUtils { Properties properties = getBuildProperties(); stdout.println( createMavenVersionString( properties ) ); + String shortName = reduce( properties.getProperty( "distributionShortName" ) ); - stdout.println( "Maven home: " + System.getProperty( "maven.home", "" ) ); + stdout.println( shortName + " home: " + System.getProperty( "maven.home", "" ) ); stdout.println( "Java version: " + System.getProperty( "java.version", "" ) + ", vendor: " + System.getProperty( "java.vendor", "" ) ); @@ -80,8 +81,9 @@ public final class CLIReportingUtils String timestamp = reduce( buildProperties.getProperty( "timestamp" ) ); String version = reduce( buildProperties.getProperty( BUILD_VERSION_PROPERTY ) ); String rev = reduce( buildProperties.getProperty( "buildNumber" ) ); + String distributionName = reduce( buildProperties.getProperty( "distributionName" ) ); - String msg = "Apache Maven "; + String msg = distributionName + " "; msg += ( version != null ? version : "" ); if ( rev != null || timestamp != null ) { diff --git a/pom.xml b/pom.xml index 7e690a41a7..cca79df853 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,10 @@ 1.3 1.11 true + + apache-maven + Maven + Apache Maven