maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1056935 - /maven/site/trunk/src/site/apt/guides/introduction/introduction-to-profiles.apt
Date Sun, 09 Jan 2011 14:17:14 GMT
Author: bentmann
Date: Sun Jan  9 14:17:14 2011
New Revision: 1056935

URL: http://svn.apache.org/viewvc?rev=1056935&view=rev
Log:
o Clarified profile activation

Modified:
    maven/site/trunk/src/site/apt/guides/introduction/introduction-to-profiles.apt

Modified: maven/site/trunk/src/site/apt/guides/introduction/introduction-to-profiles.apt
URL: http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/introduction/introduction-to-profiles.apt?rev=1056935&r1=1056934&r2=1056935&view=diff
==============================================================================
--- maven/site/trunk/src/site/apt/guides/introduction/introduction-to-profiles.apt (original)
+++ maven/site/trunk/src/site/apt/guides/introduction/introduction-to-profiles.apt Sun Jan
 9 14:17:14 2011
@@ -55,7 +55,7 @@ Introduction to Build Profiles
 
     - a descriptor located in
     {{{http://maven.apache.org/ref/2.2.1/maven-profile/profiles.html}project basedir <<<(profiles.xml)>>>}}
-    (deprecated in Maven 3.0: see
+    (unsupported in Maven 3.0: see
     {{{https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-profiles.xml}
Maven 3 compatibility notes}})
 
 * How can a profile be triggered? How does this vary according to the type of profile being
used?
@@ -155,7 +155,7 @@ mvn groupId:artifactId:goal -P profile-1
 </profiles>
 +---+
 
-  This will activate the profile when the system property "debug" is specified
+  The profile below will activate the profile when the system property "debug" is specified
   with any value:
 
 +---+
@@ -171,7 +171,7 @@ mvn groupId:artifactId:goal -P profile-1
 </profiles>
 +---+
 
-  This example will trigger the profile when the system property
+  The next example will trigger the profile when the system property
   "environment" is specified with the value "test":
 
 +---+
@@ -188,14 +188,18 @@ mvn groupId:artifactId:goal -P profile-1
 </profiles>
 +---+
 
-  <<Note>>: Environment variable <<<FOO>>> would be set like
<<<env.FOO>>>.
-
   To activate this you would type this on the command line:
 
 +---+
 mvn groupId:artifactId:goal -Denvironment=test
 +---+
 
+  As of Maven 3.0, profiles in the POM can also be activated based on properties from active
profiles from the
+  <<<setttings.xml>>>.
+
+  <<Note>>: Environment variables like <<<FOO>>> are available
as properties of the form <<<env.FOO>>>. Further note
+  that environment variable names are normalized to all upper-case on Windows.
+
   This example will trigger the profile when the generated file
   <<<target/generated-sources/axistools/wsdl2java/org/apache/maven>>> is
missing.
 
@@ -214,7 +218,8 @@ mvn groupId:artifactId:goal -Denvironmen
 
   As of Maven 2.0.9, the tags <<<\<exists\>>>> and <<<\<missing\>>>>
could be interpolated. Supported variables are
   system properties like <<<$\{user.home\}>>> and environment variables
like <<<$\{env.HOME\}>>>. Please note that
-  properties defined in the POM itself are not available for interpolation here.
+  properties and values defined in the POM itself are not available for interpolation here,
e.g. the above example
+  activator cannot use <<<$\{project.build.directory\}>>> but needs to
hard-code the path <<<target>>>.
 
   Profiles can also be active by default using a configuration like the following:
 
@@ -230,9 +235,9 @@ mvn groupId:artifactId:goal -Denvironmen
 </profiles>
 +---+
 
-  This profile will automatically be active for all builds unless another profile in the
same pom
+  This profile will automatically be active for all builds unless another profile in the
same POM
   is activated using one of the previously described methods.  All profiles that are active
by
-  default are automatically deactivated when a profile in the pom is activated on the command
line
+  default are automatically deactivated when a profile in the POM is activated on the command
line
   or through its activation config.
   
 ** Deactivating a profile
@@ -584,7 +589,7 @@ The following profiles are active:
   in the <<<settings.xml>>> is automatically activated.
 
   Now if we have something like a profile in the <<<settings.xml>>> that
has been set
-  as an active profile and also triggered a profile in the pom. Which profile do
+  as an active profile and also triggered a profile in the POM. Which profile do
   you think will have an effect on the build?
 
 +---+
@@ -609,7 +614,7 @@ The following profiles are active:
 
   This will print the effective POM for this build configuration out to the
   console. Take note that profiles in the <<<settings.xml>>> takes higher
priority
-  than profiles in the pom. So the profile that has been applied here is
+  than profiles in the POM. So the profile that has been applied here is
   <<<appserverConfig>>> not <<<appserverConfig-dev>>>.
 
   If you want to redirect the output from the plugin to a file called <<<effective-pom.xml>>>,



Mime
View raw message