This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch mvnd-1.x in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
commit 7432f6729bb8d3575fd3b46e04339e54f61fcaa7 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Sun Nov 15 11:55:07 2026 +0100 Run all MavenConf tests against the extension-exclusion projects --- .../mvnd/it/MavenConfIgnoreExtDefNativeIT.java | 12 +---------- .../mvnd/it/MavenConfIgnoreExtNativeIT.java | 14 ++---------- .../org/mvndaemon/mvnd/it/MavenConfNativeIT.java | 25 ++++++---------------- .../java/org/mvndaemon/mvnd/junit/TestUtils.java | 2 +- .../projects/maven-conf-ignore-ext-def/pom.xml | 25 ++++++++++++---------- .../test/projects/maven-conf-ignore-ext/pom.xml | 25 ++++++++++++---------- 6 files changed, 39 insertions(+), 64 deletions(-) diff --git a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtDefNativeIT.java b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtDefNativeIT.java index e4d9e357..70994d2c 100644 --- a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtDefNativeIT.java +++ b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtDefNativeIT.java @@ -18,17 +18,7 @@ */ package org.mvndaemon.mvnd.it; -import org.junit.jupiter.api.Disabled; import org.mvndaemon.mvnd.junit.MvndNativeTest; @MvndNativeTest(projectDir = "src/test/projects/maven-conf-ignore-ext-def") -class MavenConfIgnoreExtDefNativeIT extends MavenConfNativeIT { - // these 1.x tests rely on the .mvn/maven.config of the maven-conf project - @Override - @Disabled("needs the maven-conf project configuration") - void interpolation() {} - - @Override - @Disabled("needs the maven-conf project configuration") - void multiModuleProjectDirectory() {} -} +class MavenConfIgnoreExtDefNativeIT extends MavenConfNativeIT {} diff --git a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtNativeIT.java b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtNativeIT.java index cc6e4360..2e808579 100644 --- a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtNativeIT.java +++ b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfIgnoreExtNativeIT.java @@ -21,24 +21,14 @@ package org.mvndaemon.mvnd.it; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; import org.mvndaemon.mvnd.junit.MvndNativeTest; @MvndNativeTest(projectDir = "src/test/projects/maven-conf-ignore-ext") class MavenConfIgnoreExtNativeIT extends MavenConfNativeIT { @Override - protected List<String> mvndParams() { - ArrayList<String> result = new ArrayList<>(super.mvndParams()); + protected List<String> mvndParams(String expression) { + ArrayList<String> result = new ArrayList<>(super.mvndParams(expression)); result.add("-Dmvnd.coreExtensionsExclude=foo:bar"); return result; } - - // these 1.x tests rely on the .mvn/maven.config of the maven-conf project - @Override - @Disabled("needs the maven-conf project configuration") - void interpolation() {} - - @Override - @Disabled("needs the maven-conf project configuration") - void multiModuleProjectDirectory() {} } diff --git a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfNativeIT.java b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfNativeIT.java index ae8876c7..e80dae7a 100644 --- a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfNativeIT.java +++ b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/MavenConfNativeIT.java @@ -54,15 +54,7 @@ class MavenConfNativeIT { @Test void interpolation() throws IOException, InterruptedException { final TestClientOutput o = new TestClientOutput(); - client.execute( - o, - "org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate", - "-D", - "expression=something", - "-q", - "-DforceStdout", - "--raw-streams") - .assertSuccess(); + client.execute(o, mvndParams("something").toArray(new String[0])).assertSuccess(); String conf = parameters.multiModuleProjectDirectory().toString(); assertTrue( o.getMessages().stream().anyMatch(m -> m.toString().contains(conf)), "Output should contain " + conf); @@ -71,14 +63,7 @@ class MavenConfNativeIT { @Test void multiModuleProjectDirectory() throws IOException, InterruptedException { final TestClientOutput o = new TestClientOutput(); - client.execute( - o, - "org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate", - "-D", - "expression=maven.multiModuleProjectDirectory", - "-q", - "-DforceStdout", - "--raw-streams") + client.execute(o, mvndParams("maven.multiModuleProjectDirectory").toArray(new String[0])) .assertSuccess(); String conf = parameters.multiModuleProjectDirectory().toString(); assertTrue( @@ -86,10 +71,14 @@ class MavenConfNativeIT { } protected List<String> mvndParams() { + return mvndParams("maven.conf"); + } + + protected List<String> mvndParams(String expression) { return Arrays.asList( "org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate", "-D", - "expression=maven.conf", + "expression=" + expression, "-q", "-DforceStdout", "--raw-streams", diff --git a/integration-tests/src/test/java/org/mvndaemon/mvnd/junit/TestUtils.java b/integration-tests/src/test/java/org/mvndaemon/mvnd/junit/TestUtils.java index e0f8fa91..a52c8e58 100644 --- a/integration-tests/src/test/java/org/mvndaemon/mvnd/junit/TestUtils.java +++ b/integration-tests/src/test/java/org/mvndaemon/mvnd/junit/TestUtils.java @@ -29,7 +29,7 @@ import java.util.stream.Stream; public class TestUtils { /** - * IT circumvention for JDK transport low timeouts and GH macOS runners networking issues. + * IT circumvention for low connect timeouts and GH macOS runners networking issues. * If arguments does not contain settings for timeouts (ie as part of test), they will be * added to increase timeouts for IT runs. */ diff --git a/integration-tests/src/test/projects/maven-conf-ignore-ext-def/pom.xml b/integration-tests/src/test/projects/maven-conf-ignore-ext-def/pom.xml index 6a1c209f..1a94bb84 100644 --- a/integration-tests/src/test/projects/maven-conf-ignore-ext-def/pom.xml +++ b/integration-tests/src/test/projects/maven-conf-ignore-ext-def/pom.xml @@ -1,18 +1,21 @@ <!-- - Copyright 2019-2022 the original author or authors. + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" diff --git a/integration-tests/src/test/projects/maven-conf-ignore-ext/pom.xml b/integration-tests/src/test/projects/maven-conf-ignore-ext/pom.xml index fb803ed4..76d64664 100644 --- a/integration-tests/src/test/projects/maven-conf-ignore-ext/pom.xml +++ b/integration-tests/src/test/projects/maven-conf-ignore-ext/pom.xml @@ -1,18 +1,21 @@ <!-- - Copyright 2019-2022 the original author or authors. + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
