diff --git a/plugin/src/main/java/org/wildfly/plugin/dev/DevMojo.java b/plugin/src/main/java/org/wildfly/plugin/dev/DevMojo.java
index 8bace083..13d1640f 100644
--- a/plugin/src/main/java/org/wildfly/plugin/dev/DevMojo.java
+++ b/plugin/src/main/java/org/wildfly/plugin/dev/DevMojo.java
@@ -314,7 +314,10 @@ public class DevMojo extends AbstractServerStartMojo {
/**
* Set to {@code true} if you want to delete the existing server referenced from the {@code provisioningDir} and provision a
* new one,
- * otherwise {@code false}.
+ * otherwise {@code false}. When { @code discover-provisioning-info } is set to {@code true}, this option is enforced to be
+ * {@code true}.
+ * When discovery of Galleon provisioning information is enabled, a change to the application source code
+ * could imply re-provisioning of the server.
*/
@Parameter(alias = "overwrite-provisioned-server", defaultValue = "false", property = PropertyNames.WILDFLY_PROVISIONING_OVERWRITE_PROVISIONED_SERVER)
private boolean overwriteProvisionedServer;
@@ -386,8 +389,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
} else {
if (isDiscoveryEnabled()) {
if (!overwriteProvisionedServer) {
- throw new MojoExecutionException(
- "When layer discovery is enabled, overwriteProvisionedServer must be set to true");
+ overwriteProvisionedServer = true;
+ getLog().info("Layer discovery has been enabled, overwriteProvisionedServer has been set to true");
}
} else {
context = startServer(ServerType.STANDALONE);
diff --git a/pom.xml b/pom.xml
index 9320cb1d..32db856d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,7 +124,7 @@
5.2.0.Final
- 1.0.0.Alpha1
+ 1.0.0.Alpha4
true
1.2.1.Final