diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 18dbf2bd..6c4195ff 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -38,7 +38,7 @@ jobs: run: gu install native-image - name: mvn clean verify - run: ./mvnw clean verify -Pnative -B -ntp -e + run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e - name: Upload daemon test logs if: ${{ success() || failure() }} @@ -96,7 +96,7 @@ jobs: shell: cmd run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - ./mvnw clean verify -Pnative -B -ntp -e + ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e - name: Upload daemon test logs if: ${{ success() || failure() }} @@ -126,7 +126,7 @@ jobs: run: gu install native-image - name: mvn clean verify - run: ./mvnw clean verify -Pnative -B -ntp -e + run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e - name: Upload daemon test logs if: ${{ success() || failure() }} diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index bbe9d1a6..168f29f1 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -91,26 +91,6 @@ - - org.codehaus.mojo - mrm-maven-plugin - - - mrm-start - process-test-classes - - start - - - - mrm-stop - post-integration-test - - stop - - - - org.apache.maven.plugins maven-surefire-plugin @@ -148,6 +128,40 @@ + + + mrm + + + mrm + !false + + + + + + org.codehaus.mojo + mrm-maven-plugin + + + mrm-start + process-test-classes + + start + + + + mrm-stop + post-integration-test + + stop + + + + + + + native diff --git a/integration-tests/src/test/java/org/jboss/fuse/mvnd/junit/MvndTestExtension.java b/integration-tests/src/test/java/org/jboss/fuse/mvnd/junit/MvndTestExtension.java index e71d1419..c2b1ff64 100644 --- a/integration-tests/src/test/java/org/jboss/fuse/mvnd/junit/MvndTestExtension.java +++ b/integration-tests/src/test/java/org/jboss/fuse/mvnd/junit/MvndTestExtension.java @@ -24,6 +24,7 @@ import java.nio.file.Paths; import java.util.Locale; import java.util.Objects; import java.util.stream.Stream; +import org.apache.log4j.Logger; import org.jboss.fuse.mvnd.client.Client; import org.jboss.fuse.mvnd.client.ClientLayout; import org.jboss.fuse.mvnd.client.DefaultClient; @@ -41,6 +42,8 @@ import static org.jboss.fuse.mvnd.junit.TestUtils.deleteDir; public class MvndTestExtension implements BeforeAllCallback, BeforeEachCallback, AfterAllCallback { + private static final Logger LOG = Logger.getLogger(MvndTestExtension.class); + /** A placeholder to replace with a temporary directory outside of the current source tree */ public static final String TEMP_EXTERNAL = "${temp.external}"; private volatile Exception bootException; @@ -207,11 +210,16 @@ public class MvndTestExtension implements BeforeAllCallback, BeforeEachCallback, } static Path createSettings(Path settingsPath) { + final String mrmRepoUrl = System.getProperty("mrm.repository.url"); + if (mrmRepoUrl == null || mrmRepoUrl.isEmpty()) { + LOG.info("Building without mrm-maven-plugin"); + return null; + } + LOG.info("Building with mrm-maven-plugin"); final Path settingsTemplatePath = Paths.get("src/test/resources/settings-template.xml"); try { final String template = Files.readString(settingsTemplatePath); - final String content = template.replaceAll("@mrm.repository.url@", - Objects.requireNonNull(System.getProperty("mrm.repository.url"))); + final String content = template.replaceAll("@mrm.repository.url@", mrmRepoUrl); try { Files.write(settingsPath, content.getBytes(StandardCharsets.UTF_8)); } catch (Exception e) { diff --git a/integration-tests/src/test/projects/module-and-plugin/pom.xml b/integration-tests/src/test/projects/module-and-plugin/pom.xml index a7028535..eb534e7f 100644 --- a/integration-tests/src/test/projects/module-and-plugin/pom.xml +++ b/integration-tests/src/test/projects/module-and-plugin/pom.xml @@ -33,7 +33,7 @@ 3.8.0 2.4 2.6 - 3.0.0-M5 + 2.22.3