From 766baa32f434a6d4ce6dba5831b42bd7b84467f2 Mon Sep 17 00:00:00 2001 From: Tomas Hofman Date: Thu, 25 Jul 2024 11:16:48 +0200 Subject: [PATCH] Revert default behavior to override version properties if possible --- .../wildfly/channelplugin/it/UpgradeComponentsMojoIT.java | 6 +----- .../org/wildfly/channelplugin/UpgradeComponentsMojo.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/integration-tests/src/test/java/org/wildfly/channelplugin/it/UpgradeComponentsMojoIT.java b/integration-tests/src/test/java/org/wildfly/channelplugin/it/UpgradeComponentsMojoIT.java index e708b0b..df57601 100644 --- a/integration-tests/src/test/java/org/wildfly/channelplugin/it/UpgradeComponentsMojoIT.java +++ b/integration-tests/src/test/java/org/wildfly/channelplugin/it/UpgradeComponentsMojoIT.java @@ -37,7 +37,6 @@ public class UpgradeComponentsMojoIT { @SystemProperty(value = "localRepository", content = "${maven.repo.local}") @SystemProperty(value = "remoteRepositories", content = "file://${maven.repo.local}") @SystemProperty(value = "ignoreStreams", content = "org.jboss:ignored-dep") - @SystemProperty(value = "inlineUpgradedVersions", content = "false") @MavenTest void basic_project_test_case(MavenExecutionResult result) { assertThat(result).isSuccessful(); @@ -94,7 +93,6 @@ void basic_project_test_case(MavenExecutionResult result) { */ @MavenGoal("${project.groupId}:wildfly-channel-maven-plugin:${project.version}:upgrade") @SystemProperty(value = "manifestFile", content = "manifest.yaml") - @SystemProperty(value = "inlineUpgradedVersions", content = "false") @MavenTest void eap_bom_test_case(MavenExecutionResult result) throws MalformedURLException { assertThat(result).isSuccessful(); @@ -134,7 +132,6 @@ void eap_bom_test_case(MavenExecutionResult result) throws MalformedURLException @MavenGoal("${project.groupId}:wildfly-channel-maven-plugin:${project.version}:upgrade") @SystemProperty(value = "manifestFile", content = "manifest.yaml") @SystemProperty(value = "overrideProperties", content = "undertow.version=2.2.5.Final-Overridden") - @SystemProperty(value = "inlineUpgradedVersions", content = "false") @MavenTest void override_property_test_case(MavenExecutionResult result) { assertThat(result).isSuccessful(); @@ -159,7 +156,6 @@ void override_property_test_case(MavenExecutionResult result) { @MavenGoal("${project.groupId}:wildfly-channel-maven-plugin:${project.version}:upgrade") @SystemProperty(value = "manifestFile", content = "manifest.yaml") @SystemProperty(value = "overrideDependencies", content = "io.undertow:undertow-core:2.2.5.Final-Overridden") - @SystemProperty(value = "inlineUpgradedVersions", content = "false") @MavenTest void override_dependency_test_case(MavenExecutionResult result) { assertThat(result).isSuccessful(); @@ -184,7 +180,6 @@ void override_dependency_test_case(MavenExecutionResult result) { */ @MavenGoal("${project.groupId}:wildfly-channel-maven-plugin:${project.version}:upgrade") @SystemProperty(value = "manifestFile", content = "manifest.yaml") - @SystemProperty(value = "inlineUpgradedVersions", content = "false") @MavenTest void external_properties_test_case(MavenExecutionResult result) { assertThat(result).isSuccessful(); @@ -204,6 +199,7 @@ void external_properties_test_case(MavenExecutionResult result) { @MavenGoal("${project.groupId}:wildfly-channel-maven-plugin:${project.version}:upgrade") @SystemProperty(value = "manifestFile", content = "manifest.yaml") + @SystemProperty(value = "inlineUpgradedVersions", content = "true") @MavenTest void inline_override_test_case(MavenExecutionResult result) { assertThat(result).isSuccessful(); diff --git a/plugin/src/main/java/org/wildfly/channelplugin/UpgradeComponentsMojo.java b/plugin/src/main/java/org/wildfly/channelplugin/UpgradeComponentsMojo.java index b5e15b8..88749e2 100644 --- a/plugin/src/main/java/org/wildfly/channelplugin/UpgradeComponentsMojo.java +++ b/plugin/src/main/java/org/wildfly/channelplugin/UpgradeComponentsMojo.java @@ -121,7 +121,7 @@ public class UpgradeComponentsMojo extends AbstractChannelMojo { * If true, upgraded versions would be inlined in the dependency version element, possibly replacing a property * reference if it was originally used. If false, the property would be updated instead (less robust option). */ - @Parameter(property = "inlineUpgradedVersions", defaultValue = "true") + @Parameter(property = "inlineUpgradedVersions", defaultValue = "false") boolean inlineUpgradedVersions; /**