diff --git a/maven-model/maven.mdo b/maven-model/maven.mdo
index fe41a966a0..cf9dabec83 100644
--- a/maven-model/maven.mdo
+++ b/maven-model/maven.mdo
@@ -2602,7 +2602,7 @@
-
+
Activation
4.0.0
ActivationProperty
+
+ file
+ 4.0.0
+
+
+ ActivationFile
+
+
@@ -2654,6 +2664,29 @@
+
+ ActivationFile
+ 4.0.0
+
+
+
+ missing
+ 4.0.0
+ String
+ The name of the file that should be missing to activate a profile
+
+
+ exists
+ 4.0.0
+ String
+ The name of the file that should exist to activate a profile
+
+
+
ReportPlugin
diff --git a/maven-profile/profiles.mdo b/maven-profile/profiles.mdo
index 2c0e117a4e..b32d5b6e9d 100644
--- a/maven-profile/profiles.mdo
+++ b/maven-profile/profiles.mdo
@@ -130,6 +130,16 @@
ActivationProperty
+
+ file
+ 1.0.0
+
+
+ ActivationFile
+
+
@@ -169,8 +179,7 @@
layout
1.0.0
- The type of layout this repository uses for locating and storing artifacts - can be "legacy" or
- "default".
+ The type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default".
String
default
@@ -196,7 +205,6 @@
-
Repository
RepositoryBase
@@ -284,7 +292,6 @@
-
ActivationProperty
1.0.0
@@ -309,5 +316,28 @@
+
+ ActivationFile
+ 1.0.0
+
+
+
+ missing
+ 1.0.0
+ String
+ The name of the file that should be missing to activate a profile
+
+
+ exists
+ 1.0.0
+ String
+ The name of the file that should exist to activate a profile
+
+
+
-
\ No newline at end of file
+
diff --git a/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java b/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
index cd044849fa..f91760c3f5 100644
--- a/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
+++ b/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
@@ -18,6 +18,7 @@ package org.apache.maven.profiles;
import org.apache.maven.model.Activation;
import org.apache.maven.model.ActivationProperty;
+import org.apache.maven.model.ActivationFile;
import org.apache.maven.model.Profile;
import org.apache.maven.model.Repository;
@@ -45,7 +46,7 @@ public class ProfilesConversionUtils
Activation activation = new Activation();
activation.setJdk( profileActivation.getJdk() );
-
+
org.apache.maven.profiles.ActivationProperty profileProp = profileActivation.getProperty();
if ( profileProp != null )
@@ -57,7 +58,19 @@ public class ProfilesConversionUtils
activation.setProperty( prop );
}
+
+ org.apache.maven.profiles.ActivationFile profileFile = profileActivation.getFile();
+ if ( profileFile != null )
+ {
+ ActivationFile file = new ActivationFile();
+
+ file.setExists( profileFile.getExists() );
+ file.setMissing( profileFile.getMissing() );
+
+ activation.setFile( file );
+ }
+
profile.setActivation( activation );
}
else
diff --git a/maven-project/src/main/resources/META-INF/plexus/components.xml b/maven-project/src/main/resources/META-INF/plexus/components.xml
index be96f8077e..eb6c2eeaee 100644
--- a/maven-project/src/main/resources/META-INF/plexus/components.xml
+++ b/maven-project/src/main/resources/META-INF/plexus/components.xml
@@ -115,6 +115,16 @@
system-property
org.apache.maven.profiles.activation.SystemPropertyProfileActivator
+
+
+ org.apache.maven.profiles.activation.ProfileActivator
+ file
+ org.apache.maven.profiles.activation.FileProfileActivator
+