diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java deleted file mode 100644 index d75fc7970..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.util.Properties; - -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -/** - * [MNG-5600] Dependency management import should support exclusions. - * - * @author Christian Schulte - */ -class MavenITmng5600DependencyManagementImportExclusionsTest extends AbstractMavenIntegrationTestCase { - - MavenITmng5600DependencyManagementImportExclusionsTest() { - super("[4.0.0-alpha-5,)"); - } - - @Test - public void testCanExcludeDependenciesFromImport() throws Exception { - final File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-5600/exclusions"); - - Verifier verifier = newVerifier(testDir.getAbsolutePath()); - verifier.setAutoclean(false); - verifier.filterFile("../settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterMap()); - - verifier.addCliArguments("-s", "settings.xml"); - verifier.addCliArguments("clean", "verify"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - final Properties properties = verifier.loadProperties("target/project.properties"); - assertEquals("1", properties.getProperty("project.dependencyManagement.dependencies")); - assertEquals( - "commons-lang:commons-lang:jar", - properties.getProperty("project.dependencyManagement.dependencies.0.managementKey")); - - assertEquals("2", properties.getProperty("project.dependencyManagement.dependencies.0.exclusions")); - assertEquals( - "commons-io", - properties.getProperty("project.dependencyManagement.dependencies.0.exclusions.0.groupId")); - - assertEquals( - "commons-io", - properties.getProperty("project.dependencyManagement.dependencies.0.exclusions.0.artifactId")); - - assertEquals( - "commons-logging", - properties.getProperty("project.dependencyManagement.dependencies.0.exclusions.1.groupId")); - - assertEquals( - "commons-logging", - properties.getProperty("project.dependencyManagement.dependencies.0.exclusions.1.artifactId")); - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java deleted file mode 100644 index 580582a70..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import org.apache.maven.shared.verifier.VerificationException; -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -/** - * This is a collection of test cases for MNG-5760, - * --resume / -r in case of build failures. - * - * The test uses a multi-module project with three modules: - * - * - * @author Maarten Mulders - * @author Martin Kanters - */ -public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTestCase { - private final File parentDependentTestDir; - private final File parentIndependentTestDir; - private final File noProjectTestDir; - private final File fourModulesTestDir; - - public MavenITmng5760ResumeFeatureTest() throws IOException { - super("[4.0.0-alpha-1,)"); - this.parentDependentTestDir = - ResourceExtractor.simpleExtractResources(getClass(), "/mng-5760-resume-feature/parent-dependent"); - this.parentIndependentTestDir = - ResourceExtractor.simpleExtractResources(getClass(), "/mng-5760-resume-feature/parent-independent"); - this.noProjectTestDir = - ResourceExtractor.simpleExtractResources(getClass(), "/mng-5760-resume-feature/no-project"); - this.fourModulesTestDir = - ResourceExtractor.simpleExtractResources(getClass(), "/mng-5760-resume-feature/four-modules"); - } - - /** - * Tests that the hint at the end of a failed build mentions --resume instead of --resume-from. - * - * @throws Exception in case of failure - */ - @Test - public void testShouldSuggestToResumeWithoutArgs() throws Exception { - Verifier verifier = newVerifier(parentDependentTestDir.getAbsolutePath()); - verifier.addCliArgument("-Dmodule-b.fail=true"); - - try { - verifier.addCliArgument("test"); - verifier.execute(); - fail("Expected this invocation to fail"); - } catch (final VerificationException ve) { - verifier.verifyTextInLog("mvn [args] -r"); - verifyTextNotInLog(verifier, "mvn [args] -rf :module-b"); - } - - // New build with -r should resume the build from module-b, skipping module-a since it has succeeded already. - verifier = newVerifier(parentDependentTestDir.getAbsolutePath()); - verifier.addCliArgument("-r"); - verifier.addCliArgument("test"); - verifier.execute(); - verifyTextNotInLog(verifier, "Building module-a 1.0"); - verifier.verifyTextInLog("Building module-b 1.0"); - verifier.verifyTextInLog("Building module-c 1.0"); - } - - @Test - public void testShouldSkipSuccessfulProjects() throws Exception { - Verifier verifier = newVerifier(parentDependentTestDir.getAbsolutePath()); - verifier.addCliArgument("-Dmodule-a.fail=true"); - verifier.addCliArgument("--fail-at-end"); - - try { - verifier.addCliArgument("test"); - verifier.execute(); - fail("Expected this invocation to fail"); - } catch (final VerificationException ve) { - // Expected to fail. - } - - // Let module-b and module-c fail, if they would have been built... - verifier = newVerifier(parentDependentTestDir.getAbsolutePath()); - verifier.addCliArgument("-Dmodule-b.fail=true"); - verifier.addCliArgument("-Dmodule-c.fail=true"); - // ... but adding -r should exclude those two from the build because the previous Maven invocation - // marked them as successfully built. - verifier.addCliArgument("-r"); - verifier.addCliArgument("test"); - verifier.execute(); - } - - @Test - public void testShouldSkipSuccessfulModulesWhenTheFirstModuleFailed() throws Exception { - // In this multi-module project, the submodules are not dependent on the parent. - // This results in the parent to be built last, and module-a to be built first. - // This enables us to let the first module in the reactor (module-a) fail. - Verifier verifier = newVerifier(parentIndependentTestDir.getAbsolutePath()); - verifier.addCliArgument("-Dmodule-a.fail=true"); - verifier.addCliArgument("--fail-at-end"); - - try { - verifier.addCliArgument("test"); - verifier.execute(); - fail("Expected this invocation to fail"); - } catch (final VerificationException ve) { - verifier.verifyTextInLog("mvn [args] -r"); - } - - verifier = newVerifier(parentIndependentTestDir.getAbsolutePath()); - verifier.addCliArgument("-r"); - verifier.addCliArgument("test"); - verifier.execute(); - verifier.verifyTextInLog("Building module-a 1.0"); - verifyTextNotInLog(verifier, "Building module-b 1.0"); - } - - @Test - public void testShouldNotCrashWithoutProject() throws Exception { - // There is no Maven project available in the test directory. - // As reported in JIRA this would previously break with a NullPointerException. - // (see - // https://issues.apache.org/jira/browse/MNG-5760?focusedCommentId=17143795&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17143795) - final Verifier verifier = newVerifier(noProjectTestDir.getAbsolutePath()); - try { - verifier.addCliArgument("org.apache.maven.plugins:maven-resources-plugin:resources"); - verifier.execute(); - } catch (final VerificationException ve) { - verifier.verifyTextInLog("Goal requires a project to execute but there is no POM in this directory"); - } - } - - @Test - public void testFailureWithParallelBuild() throws Exception { - // four modules: a, b, c, d - // c depends on b, d depends on a - - // Let's do a first pass with a and c failing. The build is parallel, - // so we have a first thread with a and d, and the second one with b and c - // The result should be: - // a : failure (slow, so b and c will be built in the meantime) - // b : success - // c : failure - // d : skipped - Verifier verifier = newVerifier(fourModulesTestDir.getAbsolutePath()); - verifier.addCliArgument("-T2"); - verifier.addCliArgument("-Dmodule-a.delay=1000"); - verifier.addCliArgument("-Dmodule-a.fail=true"); - verifier.addCliArgument("-Dmodule-c.fail=true"); - try { - verifier.addCliArgument("verify"); - verifier.execute(); - fail("Expected this invocation to fail"); - } catch (final VerificationException ve) { - // Expected to fail. - } - - // Let module-b fail, if it would have been built... - verifier = newVerifier(fourModulesTestDir.getAbsolutePath()); - verifier.addCliArgument("-T2"); - verifier.addCliArgument("-Dmodule-b.fail=true"); - // ... but adding -r should exclude it from the build because the previous Maven invocation - // marked it as successfully built. - verifier.addCliArgument("-r"); - // The result should be: - // a : success - // c : success - // d : success - - verifier.addCliArgument("verify"); - verifier.execute(); - } - - @Test - public void testFailureAfterSkipWithParallelBuild() throws Exception { - // four modules: a, b, c, d - // c depends on b, d depends on a - - // Let's do a first pass with a and c failing. The build is parallel, - // so we have a first thread with a and d, and the second one with b and c - // The result should be: - // a : success - // b : success, slow - // c : skipped - // d : failure - Verifier verifier = newVerifier(fourModulesTestDir.getAbsolutePath()); - verifier.addCliArgument("-T2"); - verifier.addCliArgument("-Dmodule-b.delay=2000"); - verifier.addCliArgument("-Dmodule-d.fail=true"); - try { - verifier.addCliArgument("verify"); - verifier.execute(); - fail("Expected this invocation to fail"); - } catch (final VerificationException ve) { - // Expected to fail. - } - - // Let module-a and module-b fail, if they would have been built... - verifier = newVerifier(fourModulesTestDir.getAbsolutePath()); - verifier.addCliArgument("-T2"); - verifier.addCliArgument("-Dmodule-a.fail=true"); - verifier.addCliArgument("-Dmodule-b.fail=true"); - // ... but adding -r should exclude those two from the build because the previous Maven invocation - // marked them as successfully built. - verifier.addCliArgument("-r"); - - // The result should be: - // c : success - // d : success - verifier.addCliArgument("verify"); - verifier.execute(); - } - - /** - * Throws an exception if the text is present in the log. - * - * @param verifier the verifier to use - * @param text the text to assert present - * @throws VerificationException if text is not found in log - */ - private void verifyTextNotInLog(Verifier verifier, String text) throws VerificationException { - List lines = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false); - - for (String line : lines) { - if (Verifier.stripAnsi(line).contains(text)) { - throw new VerificationException("Text found in log: " + text); - } - } - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6401ProxyPortInterpolationTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6401ProxyPortInterpolationTest.java deleted file mode 100644 index 42c2cc639..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6401ProxyPortInterpolationTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.util.Properties; - -import org.apache.maven.settings.Proxy; -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -class MavenITmng6401ProxyPortInterpolationTest extends AbstractMavenIntegrationTestCase { - - private Proxy proxy; - - private int port; - - protected MavenITmng6401ProxyPortInterpolationTest() { - super("(4.0.0-alpha-7,)"); - } - - @Test - public void testitEnvVars() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-6401-proxy-port-interpolation"); - - Verifier verifier = newVerifier(testDir.getAbsolutePath()); - verifier.setAutoclean(false); - verifier.deleteDirectory("target"); - verifier.addCliArgument("--settings"); - verifier.addCliArgument("settings.xml"); - verifier.setEnvironmentVariable("MAVEN_PROXY_ACTIVE_BOOLEAN", "true"); - verifier.setEnvironmentVariable("MAVEN_PROXY_HOST_STRING", "myproxy.host.net"); - verifier.setEnvironmentVariable("MAVEN_PROXY_PORT_INT", "18080"); - verifier.addCliArgument("validate"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - Properties props = verifier.loadProperties("target/settings.properties"); - assertEquals("true", props.getProperty("settings.proxies.0.active")); - assertEquals("myproxy.host.net", props.getProperty("settings.proxies.0.host")); - assertEquals("18080", props.getProperty("settings.proxies.0.port")); - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6656BuildConsumer.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6656BuildConsumer.java deleted file mode 100644 index 2258fa737..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6656BuildConsumer.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import org.apache.maven.shared.utils.io.FileUtils; -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; -import org.opentest4j.AssertionFailedError; - -/** - * With the build-consumer the pom.xml will be adjusted during the process. - * - * - * During install the pom will be cleaned up - * - * - * MNG-6656. - * - */ -public class MavenITmng6656BuildConsumer extends AbstractMavenIntegrationTestCase { - - public MavenITmng6656BuildConsumer() { - super("[4.0.0-alpha-1,)"); - } - - /** - * Verifies: - * - * - * @throws Exception in case of failure - */ - @Test - public void testPublishedPoms() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-6656-buildconsumer"); - - Verifier verifier = newVerifier(testDir.getAbsolutePath(), false); - verifier.setAutoclean(false); - verifier.addCliArgument("-Dchangelist=MNG6656"); - - verifier.addCliArgument("install"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - assertTextEquals( - new File(testDir, "expected/parent.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6656-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/parent-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6656-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/simple-parent.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6656-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-weather.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6656-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-weather-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6656-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/simple-webapp.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6656-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-webapp-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6656-SNAPSHOT", "pom", "build"))); - } - - static void assertTextEquals(File file1, File file2) throws IOException { - List s1 = FileUtils.loadFile(file1); - List s2 = FileUtils.loadFile(file2); - try { - assertEquals("Not same size", s1.size(), s2.size()); - for (int i = 0; i < s1.size(); i++) { - assertEquals("Mismatch line " + i, s1.get(i), s2.get(i)); - } - } catch (AssertionFailedError error) { - assertEquals(error.getMessage(), s1, s2); - } - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6772NestedImportScopeRepositoryOverride.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6772NestedImportScopeRepositoryOverride.java deleted file mode 100644 index eb61c048b..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6772NestedImportScopeRepositoryOverride.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; - -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * This is a test set for MNG-6772: - * - * The test POM references an import scope POM, which also has a dependency on an import scope POM. - * - * Both import POMs can only be found in the repository defined in the test POM. - * It has a parent POM that defines the same repository with a different location. - * The test confirms that the dominant repository definition (child) wins while resolving the import POMs. - * - */ -@Disabled // This IT has been disabled until it is decided how the solution shall look like -public class MavenITmng6772NestedImportScopeRepositoryOverride extends AbstractMavenIntegrationTestCase { - - public MavenITmng6772NestedImportScopeRepositoryOverride() { - super("(,4.0.0-alpha-1),[4.0.0-alpha-1,)"); - } - - // This will test the behavior using ProjectModelResolver - @Test - public void testitInProject() throws Exception { - final File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-6772-override-in-project"); - - final Verifier verifier = newVerifier(testDir.getAbsolutePath(), null); - overrideGlobalSettings(testDir, verifier); - verifier.deleteArtifacts("org.apache.maven.its.mng6772"); - - verifier.filterFile("pom-template.xml", "pom.xml", "UTF-8"); - - verifier.addCliArgument("validate"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - } - - // This will test the behavior using DefaultModelResolver - @Test - public void testitInDependency() throws Exception { - final File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-6772-override-in-dependency"); - - final Verifier verifier = newVerifier(testDir.getAbsolutePath(), null); - overrideGlobalSettings(testDir, verifier); - verifier.deleteArtifacts("org.apache.maven.its.mng6772"); - - verifier.filterFile("pom-template.xml", "pom.xml", "UTF-8"); - - verifier.addCliArgument("compile"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - } - - // central must not be defined in any settings.xml or super POM will never be in play. - private void overrideGlobalSettings(final File testDir, final Verifier verifier) { - final File settingsFile = new File(testDir, "settings-override.xml"); - final String path = settingsFile.getAbsolutePath(); - verifier.addCliArgument("--global-settings"); - if (path.indexOf(' ') < 0) { - verifier.addCliArgument(path); - } else { - verifier.addCliArgument('"' + path + '"'); - } - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6957BuildConsumer.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6957BuildConsumer.java deleted file mode 100644 index 503b2fa36..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6957BuildConsumer.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.io.IOException; - -import org.apache.maven.shared.utils.io.FileUtils; -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -/** - * With the build-consumer the POM will be adjusted during the process. - *
    - *
  • CI-friendly versions will be resolved
  • - *
  • parents can omit the version if the relative path points to the correct parent
  • - *
  • dependencies can omit the version if it is part of the reactor
  • - *
- * - * During install the POM will be cleaned up - *
    - *
  • the modules will be removed
  • - *
  • the relativePath will be removed
  • - *
- * - * MNG-6656. - * - */ -public class MavenITmng6957BuildConsumer extends AbstractMavenIntegrationTestCase { - - public MavenITmng6957BuildConsumer() { - super("[4.0.0-alpha-1,)"); - } - - /** - * Verifies: - *
    - *
  • preserve license
  • - *
  • consistent line separators
  • - *
  • resolved project versions (at least 2 levels deep) in parent and dependencies
  • - *
  • removal of modules in aggregators
  • - *
- * - * @throws Exception in case of failure - */ - @Test - public void testPublishedPoms() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-6957-buildconsumer"); - - Verifier verifier = newVerifier(testDir.getAbsolutePath(), false); - verifier.setAutoclean(false); - verifier.addCliArgument("-Dchangelist=MNG6957"); - - verifier.addCliArgument("install"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - assertTextEquals( - new File(testDir, "expected/parent.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6957-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/parent-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6957-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/simple-parent.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6957-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-parent-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6957-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/simple-weather.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6957-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-weather-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6957-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/simple-webapp.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6957-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-webapp-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6957-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/simple-testutils.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-testutils", "0.9-MNG6957-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/simple-testutils-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "simple-testutils", "0.9-MNG6957-SNAPSHOT", "pom", "build"))); - - assertTextEquals( - new File(testDir, "expected/utils-parent.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "utils-parent", "0.9-MNG6957-SNAPSHOT", "pom"))); - - assertTextEquals( - new File(testDir, "expected/utils-parent-build.pom"), - new File(verifier.getArtifactPath( - "org.sonatype.mavenbook.multi", "utils-parent", "0.9-MNG6957-SNAPSHOT", "pom", "build"))); - } - - static void assertTextEquals(File file1, File file2) throws IOException { - assertEquals(FileUtils.loadFile(file1), FileUtils.loadFile(file2)); - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java deleted file mode 100644 index 66d5169ba..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; - -import org.apache.maven.shared.verifier.VerificationException; -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** - * This test suite tests whether other modules in the same multi-module project can be selected when invoking Maven from a submodule. - * Related JIRA issue: MNG-7390. - * - * @author Martin Kanters - */ -public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase { - - private File moduleADir; - - public MavenITmng7390SelectModuleOutsideCwdTest() { - super("[4.0.0-alpha-1,)"); - } - - @BeforeEach - protected void setUp() throws Exception { - moduleADir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-7390-pl-outside-cwd/module-a"); - - // Clean up target files from earlier runs (verifier.setAutoClean does not work, as we are reducing the reactor) - final Verifier verifier = newVerifier(moduleADir.getAbsolutePath()); - verifier.addCliArgument("-f"); - verifier.addCliArgument(".."); - verifier.addCliArgument("clean"); - verifier.execute(); - } - - @Test - public void testSelectModuleByCoordinate() throws Exception { - final Verifier verifier = newVerifier(moduleADir.getAbsolutePath()); - - verifier.addCliArgument("-pl"); - verifier.addCliArgument(":module-b"); - verifier.setLogFileName("log-module-by-coordinate.txt"); - verifier.addCliArgument("validate"); - verifier.execute(); - verifier.verifyFileNotPresent("target/touch.txt"); - verifier.verifyFileNotPresent("../target/touch.txt"); - verifier.verifyFilePresent("../module-b/target/touch.txt"); - } - - @Test - public void testSelectMultipleModulesByCoordinate() throws Exception { - final Verifier verifier = newVerifier(moduleADir.getAbsolutePath()); - - verifier.addCliArgument("-pl"); - verifier.addCliArgument(":module-b,:module-a"); - verifier.setLogFileName("log-modules-by-coordinate.txt"); - verifier.addCliArgument("validate"); - verifier.execute(); - verifier.verifyFilePresent("target/touch.txt"); - verifier.verifyFileNotPresent("../target/touch.txt"); - verifier.verifyFilePresent("../module-b/target/touch.txt"); - } - - @Test - public void testSelectModuleByRelativePath() throws Exception { - final Verifier verifier = newVerifier(moduleADir.getAbsolutePath()); - - verifier.addCliArgument("-pl"); - verifier.addCliArgument("../module-b"); - verifier.setLogFileName("log-module-by-relative-path.txt"); - verifier.addCliArgument("validate"); - verifier.execute(); - verifier.verifyFileNotPresent("target/touch.txt"); - verifier.verifyFileNotPresent("../target/touch.txt"); - verifier.verifyFilePresent("../module-b/target/touch.txt"); - } - - @Test - public void testSelectModulesByRelativePath() throws Exception { - final Verifier verifier = newVerifier(moduleADir.getAbsolutePath()); - - verifier.addCliArgument("-pl"); - verifier.addCliArgument("../module-b,."); - verifier.setLogFileName("log-modules-by-relative-path.txt"); - verifier.addCliArgument("validate"); - verifier.execute(); - verifier.verifyFilePresent("target/touch.txt"); - verifier.verifyFileNotPresent("../target/touch.txt"); - verifier.verifyFilePresent("../module-b/target/touch.txt"); - } - - /** - * Maven determines whether the target module is in a multi-module project based on the presence of a .mvn directory in root. - * This test verifies that when that directory is missing, the module cannot be found. - */ - @Test - public void testSelectModulesOutsideCwdDoesNotWorkWhenDotMvnIsNotPresent() throws Exception { - final String noDotMvnPath = "/mng-7390-pl-outside-cwd-no-dotmvn/module-a"; - final File noDotMvnDir = ResourceExtractor.simpleExtractResources(getClass(), noDotMvnPath); - final Verifier verifier = newVerifier(noDotMvnDir.getAbsolutePath()); - - verifier.addCliArgument("-pl"); - verifier.addCliArgument("../module-b"); - verifier.setLogFileName("log-modules-by-relative-path-no-dotmvn.txt"); - try { - verifier.addCliArgument("validate"); - verifier.execute(); - fail("Expected goal to fail"); - } catch (VerificationException e) { - verifier.verifyFileNotPresent("target/touch.txt"); - verifier.verifyFileNotPresent("../target/touch.txt"); - verifier.verifyFileNotPresent("../module-b/target/touch.txt"); - } - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7629SubtreeBuildTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7629SubtreeBuildTest.java deleted file mode 100644 index e9375b581..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7629SubtreeBuildTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; - -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -/** - * This is a test set for MNG-7629. - * It checks that building a subtree that consumes an attached artifact works - * - */ -class MavenITmng7629SubtreeBuildTest extends AbstractMavenIntegrationTestCase { - - public MavenITmng7629SubtreeBuildTest() { - super("[4.0.0-alpha-4,)"); - } - - /** - * Verify that dependencies which are managed through imported dependency management work - * - * @throws Exception in case of failure - */ - @Test - void testBuildSubtree() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-7629"); - - Verifier verifier = newVerifier(testDir.getAbsolutePath()); - verifier.setAutoclean(true); - verifier.addCliArgument("verify"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - verifier = newVerifier(testDir.getAbsolutePath()); - verifier.setAutoclean(true); - verifier.addCliArguments("-f", "child-2", "verify"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7836AlternativePomSyntaxTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7836AlternativePomSyntaxTest.java deleted file mode 100644 index 67d9f4902..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7836AlternativePomSyntaxTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.List; - -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -class MavenITmng7836AlternativePomSyntaxTest extends AbstractMavenIntegrationTestCase { - - protected MavenITmng7836AlternativePomSyntaxTest() { - // New feature in alpha-8-SNAPSHOT - super("(4.0.0-alpha-7,)"); - } - - @Test - void testAlternativeSyntax() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-7836-alternative-pom-syntax"); - - final Verifier pluginVerifier = newVerifier(new File(testDir, "maven-hocon-extension").getPath()); - pluginVerifier.addCliArgument("clean"); - pluginVerifier.addCliArgument("install"); - pluginVerifier.addCliArgument("-V"); - pluginVerifier.execute(); - pluginVerifier.verifyErrorFreeLog(); - - final Verifier consumerVerifier = newVerifier(new File(testDir, "simple").getPath()); - consumerVerifier.addCliArgument("clean"); - consumerVerifier.addCliArgument("install"); - consumerVerifier.addCliArgument("-Drat.skip=true"); - consumerVerifier.addCliArgument("-V"); - - Path consumerPom = Paths.get(consumerVerifier.getArtifactPath( - "org.apache.maven.its.mng-7836", "hocon-simple", "1.0.0-SNAPSHOT", "pom", "")); - Path buildPom = Paths.get(consumerVerifier.getArtifactPath( - "org.apache.maven.its.mng-7836", "hocon-simple", "1.0.0-SNAPSHOT", "pom", "build")); - consumerVerifier.deleteArtifacts("org.apache.maven.its.mng-7836", "hocon-simple", "1.0.0-SNAPSHOT"); - - consumerVerifier.execute(); - consumerVerifier.verifyErrorFreeLog(); - - assertTrue(Files.isRegularFile(consumerPom)); - List consumerPomLines = Files.readAllLines(consumerPom, StandardCharsets.UTF_8); - assertTrue(consumerPomLines.stream().anyMatch(l -> l.contains("Apache-2.0"))); - assertFalse(consumerPomLines.stream().anyMatch(l -> l.contains(""))); - - // The build pom is the original POM, so the hocon file - assertTrue(Files.isRegularFile(buildPom)); - List buildPomLines = Files.readAllLines(buildPom, StandardCharsets.UTF_8); - assertTrue(buildPomLines.stream().anyMatch(l -> l.contains("groupId = org.apache.maven.extensions"))); - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7891ConfigurationForExtensionsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7891ConfigurationForExtensionsTest.java deleted file mode 100644 index a390cec45..000000000 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7891ConfigurationForExtensionsTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -import java.io.File; -import java.util.List; - -import org.apache.maven.shared.verifier.Verifier; -import org.apache.maven.shared.verifier.util.ResourceExtractor; -import org.junit.jupiter.api.Test; - -class MavenITmng7891ConfigurationForExtensionsTest extends AbstractMavenIntegrationTestCase { - - protected MavenITmng7891ConfigurationForExtensionsTest() { - super("(4.0.0-alpha-7,)"); - } - - @Test - void testConfigurationForCoreExtension() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-7891-extension-configuration"); - - Verifier verifier = newVerifier(new File(testDir, "extension").getAbsolutePath()); - verifier.addCliArgument("install"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - verifier = newVerifier(new File(testDir, "core-extension").getAbsolutePath()); - verifier.addCliArgument("install"); - verifier.addCliArgument("-DuserValue=the-value"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - List logFile = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false); - String projects = logFile.stream() - .filter(s -> s.contains("All projects are read now")) - .findFirst() - .orElse(null); - assertNotNull(projects); - assertFalse(projects.contains("$")); - } - - @Test - void testConfigurationForBuildExtension() throws Exception { - File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-7891-extension-configuration"); - - Verifier verifier = newVerifier(new File(testDir, "extension").getAbsolutePath()); - verifier.addCliArgument("install"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - verifier = newVerifier(new File(testDir, "build-extension").getAbsolutePath()); - verifier.addCliArgument("install"); - verifier.addCliArgument("-DuserValue=the-value"); - verifier.execute(); - verifier.verifyErrorFreeLog(); - - List logFile = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false); - String projects = logFile.stream() - .filter(s -> s.contains("All projects are read now")) - .findFirst() - .orElse(null); - assertNotNull(projects); - assertFalse(projects.contains("$")); - } -} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java index 33c175e80..3331ca45c 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java @@ -125,19 +125,14 @@ public TestSuiteOrdering() { suite.addTestSuite(MavenITgh10937QuotedPipesInMavenOptsTest.class); suite.addTestSuite(MavenITmng8106OverlappingDirectoryRolesTest.class); suite.addTestSuite(MavenITmng7939PluginsValidationExcludesTest.class); - suite.addTestSuite(MavenITmng7836AlternativePomSyntaxTest.class); - suite.addTestSuite(MavenITmng7891ConfigurationForExtensionsTest.class); - suite.addTestSuite(MavenITmng6401ProxyPortInterpolationTest.class); suite.addTestSuite(MavenITmng7228LeakyModelTest.class); suite.addTestSuite(MavenITmng7819FileLockingWithSnapshotsTest.class); - suite.addTestSuite(MavenITmng5600DependencyManagementImportExclusionsTest.class); suite.addTestSuite(MavenITmng7587Jsr330.class); suite.addTestSuite(MavenITmng7038RootdirTest.class); suite.addTestSuite(MavenITmng7697PomWithEmojiTest.class); suite.addTestSuite(MavenITmng7737ProfileActivationTest.class); suite.addTestSuite(MavenITmng7716BuildDeadlock.class); suite.addTestSuite(MavenITmng7679SingleMojoNoPomTest.class); - suite.addTestSuite(MavenITmng7629SubtreeBuildTest.class); suite.addTestSuite(MavenITmng7606DependencyImportScopeTest.class); suite.addTestSuite(MavenITmng6609ProfileActivationForPackagingTest.class); suite.addTestSuite(MavenITmng7566JavaPrerequisiteTest.class); @@ -161,7 +156,6 @@ public TestSuiteOrdering() { suite.addTestSuite(MavenITmng7464ReadOnlyMojoParametersWarningTest.class); suite.addTestSuite(MavenITmng7404IgnorePrefixlessExpressionsTest.class); suite.addTestSuite(MavenITmng5222MojoDeprecatedTest.class); - suite.addTestSuite(MavenITmng7390SelectModuleOutsideCwdTest.class); suite.addTestSuite(MavenITmng7244IgnorePomPrefixInExpressions.class); suite.addTestSuite(MavenITmng7349RelocationWarningTest.class); suite.addTestSuite(MavenITmng6326CoreExtensionsNotFoundTest.class); @@ -172,16 +166,13 @@ public TestSuiteOrdering() { suite.addTestSuite(MavenITmng7128BlockExternalHttpReactorTest.class); suite.addTestSuite(MavenITmng6511OptionalProjectSelectionTest.class); suite.addTestSuite(MavenITmng7110ExtensionClassloader.class); - suite.addTestSuite(MavenITmng6957BuildConsumer.class); suite.addTestSuite(MavenITmng7045DropUselessAndOutdatedCdiApiTest.class); suite.addTestSuite(MavenITmng6566ExecuteAnnotationShouldNotReExecuteGoalsTest.class); suite.addTestSuite(MavenITmng6754TimestampInMultimoduleProject.class); suite.addTestSuite(MavenITmng6981ProjectListShouldIncludeChildrenTest.class); suite.addTestSuite(MavenITmng6972AllowAccessToGraphPackageTest.class); - suite.addTestSuite(MavenITmng6772NestedImportScopeRepositoryOverride.class); suite.addTestSuite(MavenITmng6759TransitiveDependencyRepositoriesTest.class); suite.addTestSuite(MavenITmng6720FailFastTest.class); - suite.addTestSuite(MavenITmng6656BuildConsumer.class); suite.addTestSuite(MavenITmng6558ToolchainsBuildingEventTest.class); suite.addTestSuite(MavenITmng6506PackageAnnotationTest.class); suite.addTestSuite(MavenITmng6391PrintVersionTest.class); @@ -214,7 +205,6 @@ public TestSuiteOrdering() { suite.addTestSuite(MavenITmng5774ConfigurationProcessorsTest.class); suite.addTestSuite(MavenITmng5771CoreExtensionsTest.class); suite.addTestSuite(MavenITmng5768CliExecutionIdTest.class); - suite.addTestSuite(MavenITmng5760ResumeFeatureTest.class); suite.addTestSuite(MavenITmng5753CustomMojoExecutionConfiguratorTest.class); suite.addTestSuite(MavenITmng5742BuildExtensionClassloaderTest.class); suite.addTestSuite(MavenITmng5716ToolchainsTypeTest.class); diff --git a/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml b/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml deleted file mode 100644 index 4c8c9eec5..000000000 --- a/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng5600 - 0 - 20160619 - pom - - Maven Integration Test :: MNG-5600 - - Tests that dependency management import exclusions are supported. - - - - - org.apache.maven.its.mng5600 - bom - 0 - pom - import - - - - commons-io - commons-io - - - - commons-logging - commons-logging - - - - - - - - - - org.apache.maven.its.plugins - maven-it-plugin-expression - 2.1-SNAPSHOT - - - - eval - - verify - - - project/dependencyManagement - - ${project.build.directory}/project.properties - - - - - - - - diff --git a/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom b/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom deleted file mode 100644 index 6598212c4..000000000 --- a/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.mng5600 - bom - 0 - pom - - - - - commons-io - commons-io - 2.5 - - - commons-lang - commons-lang - 2.6 - - - - diff --git a/core-it-suite/src/test/resources/mng-5600/settings-template.xml b/core-it-suite/src/test/resources/mng-5600/settings-template.xml deleted file mode 100644 index f22a7f357..000000000 --- a/core-it-suite/src/test/resources/mng-5600/settings-template.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - maven-core-it-repo - - - maven-core-it - @baseurl@/../repo - - ignore - - - false - - - - - - - maven-core-it-repo - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml deleted file mode 100644 index e50b16495..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-a - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index 60903cfda..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-a/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() throws Exception { - Thread.sleep(Integer.getInteger("module-a.delay", 0)); - if (Boolean.getBoolean("module-a.fail")) { - fail("Deliberately fail test case in module A"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml deleted file mode 100644 index 37934e446..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-b - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index 36ab8f46c..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-b/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() throws Exception { - Thread.sleep(Integer.getInteger("module-b.delay", 0)); - if (Boolean.getBoolean("module-b.fail")) { - fail("Deliberately fail test case in module B"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml deleted file mode 100644 index 64ad1908d..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-c - - - - org.apache.maven.its.mng5760 - module-b - ${project.version} - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index 0197c4271..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-c/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() throws Exception { - Thread.sleep(Integer.getInteger("module-c.delay", 0)); - if (Boolean.getBoolean("module-c.fail")) { - fail("Deliberately fail test case in module C"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml deleted file mode 100644 index 6aa01f84b..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-d - - - - org.apache.maven.its.mng5760 - module-a - ${project.version} - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index 5fe922583..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/module-d/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() throws Exception { - Thread.sleep(Integer.getInteger("module-d.delay", 0)); - if (Boolean.getBoolean("module-d.fail")) { - fail("Deliberately fail test case in module D"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml deleted file mode 100644 index 4103e7373..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/four-modules/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng5760 - parent - 1.0 - - pom - - Maven Integration Test :: MNG-5760 - Tests for the --resume flag. - - - module-a - module-b - module-c - module-d - - - - UTF-8 - 1.8 - 1.8 - - - - - junit - junit - 4.12 - test - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/no-project/.gitkeep b/core-it-suite/src/test/resources/mng-5760-resume-feature/no-project/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml deleted file mode 100644 index e50b16495..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-a - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index c18b1e92b..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-a/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() { - if (Boolean.getBoolean("module-a.fail")) { - fail("Deliberately fail test case in module A"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml deleted file mode 100644 index 37934e446..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-b - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index 3991f60ec..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-b/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() { - if (Boolean.getBoolean("module-b.fail")) { - fail("Deliberately fail test case in module B"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml deleted file mode 100644 index 64ad1908d..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng5760 - parent - 1.0 - - - module-c - - - - org.apache.maven.its.mng5760 - module-b - ${project.version} - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index f0e4fe85f..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/module-c/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() { - if (Boolean.getBoolean("module-c.fail")) { - fail("Deliberately fail test case in module C"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml deleted file mode 100644 index 549940f71..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-dependent/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng5760 - parent - 1.0 - - pom - - Maven Integration Test :: MNG-5760 - Tests for the --resume flag. - - - module-a - module-b - module-c - - - - UTF-8 - 1.8 - 1.8 - - - - - junit - junit - 4.12 - test - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml deleted file mode 100644 index 952078d10..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - 4.0.0 - - org.apache.maven.its.mng5760.parentindependent - module-a - 1.0 - - - - junit - junit - 4.12 - test - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index c18b1e92b..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-a/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() { - if (Boolean.getBoolean("module-a.fail")) { - fail("Deliberately fail test case in module A"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml deleted file mode 100644 index 868d9e82f..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - 4.0.0 - - org.apache.maven.its.mng5760.parentindependent - module-b - 1.0 - - - - junit - junit - 4.12 - test - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/src/test/java/org/apache/maven/it/TestCase.java deleted file mode 100644 index 3991f60ec..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/module-b/src/test/java/org/apache/maven/it/TestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.it; - -/* - * 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 - * - * 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. - */ - -import org.junit.Test; - -import static org.junit.Assert.fail; - -public class TestCase { - @Test - public void testCase() { - if (Boolean.getBoolean("module-b.fail")) { - fail("Deliberately fail test case in module B"); - } - } -} diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml deleted file mode 100644 index 42abcd499..000000000 --- a/core-it-suite/src/test/resources/mng-5760-resume-feature/parent-independent/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng5760.parentindependent - parent - 1.0 - - pom - - Maven Integration Test :: MNG-5760 - Tests for the --resume flag. - - - module-a - module-b - - - - UTF-8 - 1.8 - 1.8 - - - diff --git a/core-it-suite/src/test/resources/mng-6401-proxy-port-interpolation/pom.xml b/core-it-suite/src/test/resources/mng-6401-proxy-port-interpolation/pom.xml deleted file mode 100644 index 1e899332c..000000000 --- a/core-it-suite/src/test/resources/mng-6401-proxy-port-interpolation/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng6401 - test - 0.1 - pom - - Maven Integration Test :: MNG-6401 - Verify that the proxy/port in settings.xml can be interpolated using environment variables and system properties. - - - - - org.apache.maven.its.plugins - maven-it-plugin-expression - 2.1-SNAPSHOT - - - test - - eval - - validate - - - settings/proxies/0/active - settings/proxies/0/host - settings/proxies/0/port - - target/settings.properties - - - - - - - diff --git a/core-it-suite/src/test/resources/mng-6401-proxy-port-interpolation/settings.xml b/core-it-suite/src/test/resources/mng-6401-proxy-port-interpolation/settings.xml deleted file mode 100644 index 2b2d66640..000000000 --- a/core-it-suite/src/test/resources/mng-6401-proxy-port-interpolation/settings.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - my_proxy - ${env.MAVEN_PROXY_ACTIVE_BOOLEAN} - http - ${env.MAVEN_PROXY_HOST_STRING} - ${env.MAVEN_PROXY_PORT_INT} - local.net|some.host.com - - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/parent-build.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/parent-build.pom deleted file mode 100644 index 98906356e..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/parent-build.pom +++ /dev/null @@ -1,31 +0,0 @@ - - - - org.sonatype.mavenbook.multi - parent - 0.9-${changelist}-SNAPSHOT - pom - Multi Chapter Parent Project - - - - simple-parent - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/parent.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/parent.pom deleted file mode 100644 index d5ec0fc21..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/parent.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - parent - 0.9-MNG6656-SNAPSHOT - pom - Multi Chapter Parent Project - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-parent-build.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-parent-build.pom deleted file mode 100644 index 526699b41..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-parent-build.pom +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - parent - - simple-parent - pom - Multi Chapter Simple Parent Project - - - simple-weather - simple-webapp - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-parent.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-parent.pom deleted file mode 100644 index f6e68a3dd..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-parent.pom +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - org.sonatype.mavenbook.multi - parent - 0.9-MNG6656-SNAPSHOT - - simple-parent - pom - Multi Chapter Simple Parent Project - - - - - maven-compiler-plugin - - - - - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-weather-build.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-weather-build.pom deleted file mode 100644 index b7ea1daa3..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-weather-build.pom +++ /dev/null @@ -1,30 +0,0 @@ - - - - - org.sonatype.mavenbook.multi - simple-parent - - simple-weather - jar - - Multi Chapter Simple Weather API - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-weather.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-weather.pom deleted file mode 100644 index 7a2682a09..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-weather.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - simple-weather - 0.9-MNG6656-SNAPSHOT - Multi Chapter Simple Weather API - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp-build.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp-build.pom deleted file mode 100644 index c07fcd10d..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp-build.pom +++ /dev/null @@ -1,46 +0,0 @@ - - - - - org.sonatype.mavenbook.multi - simple-parent - - - simple-webapp - Multi Chapter Simple Web Application Project - - - org.sonatype.mavenbook.multi - simple-weather - - - - simple-webapp - - - - org.apache.maven.plugins - maven-war-plugin - 3.3.2 - - - - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom b/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom deleted file mode 100644 index d7c6a6d32..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/expected/simple-webapp.pom +++ /dev/null @@ -1,16 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - simple-webapp - 0.9-MNG6656-SNAPSHOT - Multi Chapter Simple Web Application Project - - - org.sonatype.mavenbook.multi - simple-weather - 0.9-MNG6656-SNAPSHOT - compile - - - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/pom.xml b/core-it-suite/src/test/resources/mng-6656-buildconsumer/pom.xml deleted file mode 100644 index baa41ff20..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - org.sonatype.mavenbook.multi - parent - 0.9-${changelist}-SNAPSHOT - pom - Multi Chapter Parent Project - - - - simple-parent - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/pom.xml b/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/pom.xml deleted file mode 100644 index 706d33484..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - org.sonatype.mavenbook.multi - parent - - simple-parent - pom - Multi Chapter Simple Parent Project - - - simple-weather - simple-webapp - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-weather/pom.xml b/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-weather/pom.xml deleted file mode 100644 index b7ea1daa3..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-weather/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - org.sonatype.mavenbook.multi - simple-parent - - simple-weather - jar - - Multi Chapter Simple Weather API - - diff --git a/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml b/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml deleted file mode 100644 index c07fcd10d..000000000 --- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/simple-parent/simple-webapp/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - org.sonatype.mavenbook.multi - simple-parent - - - simple-webapp - Multi Chapter Simple Web Application Project - - - org.sonatype.mavenbook.multi - simple-weather - - - - simple-webapp - - - - org.apache.maven.plugins - maven-war-plugin - 3.3.2 - - - - - diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/pom-template.xml b/core-it-suite/src/test/resources/mng-6772-override-in-project/pom-template.xml deleted file mode 100644 index 19149cd0d..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/pom-template.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.mng6772 - test - 0.1 - jar - - Maven Integration Test :: MNG-6772 - - Checks that overriding the central repository always wins over the super POM. - - - - - - org.apache.maven.its.mng6772 - a - 0.1 - pom - import - - - - - - - central - @baseurl@/repo - - - diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/.gitattributes b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/.gitattributes deleted file mode 100644 index e3bce59d1..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -*.pom text eol=lf -maven-metadata.xml text eol=lf - diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom deleted file mode 100644 index 5420f7bc1..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.mng6772 - a - 0.1 - pom - - - - - org.apache.maven.its.mng6772 - b - 0.1 - pom - import - - - - diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom.md5 b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom.md5 deleted file mode 100644 index 9fd5ca284..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -0e871be0b2826cd1b685c08c1ac592b7 \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom.sha1 b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom.sha1 deleted file mode 100644 index a8b02357e..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/a/0.1/a-0.1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -e4661f80f5265a892f65aad88613b39ac25b3265 \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom deleted file mode 100644 index 43874119b..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.mng6772 - b - 0.1 - pom - - - - - org.apache.maven.its.mng6772 - c - 0.1 - - - - diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom.md5 b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom.md5 deleted file mode 100644 index 10cf264b2..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -41e65e1263946b235faf620172565687 \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom.sha1 b/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom.sha1 deleted file mode 100644 index 23f762917..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/repo/org/apache/maven/its/mng6772/b/0.1/b-0.1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -d2c3318bde4e19f9b4d8aedd01bf2edf061f73b9 \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6772-override-in-project/settings-override.xml b/core-it-suite/src/test/resources/mng-6772-override-in-project/settings-override.xml deleted file mode 100644 index 662d3f08a..000000000 --- a/core-it-suite/src/test/resources/mng-6772-override-in-project/settings-override.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent-build.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent-build.pom deleted file mode 100644 index bc932c61d..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent-build.pom +++ /dev/null @@ -1,32 +0,0 @@ - - - - 4.0.0 - org.sonatype.mavenbook.multi - parent - 0.9-${changelist}-SNAPSHOT - pom - Multi Chapter Parent Project - - - - simple-parent - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent.pom deleted file mode 100644 index ecf4d09d0..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - parent - 0.9-MNG6957-SNAPSHOT - pom - Multi Chapter Parent Project - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent-build.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent-build.pom deleted file mode 100644 index 89ee52ccc..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent-build.pom +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - parent - - simple-parent - pom - Multi Chapter Simple Parent Project - - - simple-weather - simple-webapp - - - - simple-testutils - utils-parent - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 0.1-stub-SNAPSHOT - - - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent.pom deleted file mode 100644 index 4f402f6b6..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent.pom +++ /dev/null @@ -1,22 +0,0 @@ - - - 4.0.0 - - org.sonatype.mavenbook.multi - parent - 0.9-MNG6957-SNAPSHOT - - simple-parent - pom - Multi Chapter Simple Parent Project - - - - - maven-surefire-plugin - 0.1-stub-SNAPSHOT - - - - - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils-build.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils-build.pom deleted file mode 100644 index 75de31ce4..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils-build.pom +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - utils-parent - ../utils-parent - - simple-testutils - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils.pom deleted file mode 100644 index 1007f7ecf..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils.pom +++ /dev/null @@ -1,7 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - simple-testutils - 0.9-MNG6957-SNAPSHOT - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather-build.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather-build.pom deleted file mode 100644 index 7fbe5bfa2..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather-build.pom +++ /dev/null @@ -1,39 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - - simple-weather - jar - - Multi Chapter Simple Weather API - - - - org.sonatype.mavenbook.multi - simple-testutils - test - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather.pom deleted file mode 100644 index cde80acde..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather.pom +++ /dev/null @@ -1,16 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - simple-weather - 0.9-MNG6957-SNAPSHOT - Multi Chapter Simple Weather API - - - org.sonatype.mavenbook.multi - simple-testutils - 0.9-MNG6957-SNAPSHOT - test - - - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp-build.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp-build.pom deleted file mode 100644 index 655d0ccd1..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp-build.pom +++ /dev/null @@ -1,47 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - - - simple-webapp - Multi Chapter Simple Web Application Project - - - org.sonatype.mavenbook.multi - simple-weather - - - - simple-webapp - - - - org.apache.maven.plugins - maven-war-plugin - 3.3.2 - - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom deleted file mode 100644 index 95717ad66..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom +++ /dev/null @@ -1,16 +0,0 @@ - - - 4.0.0 - org.sonatype.mavenbook.multi - simple-webapp - 0.9-MNG6957-SNAPSHOT - Multi Chapter Simple Web Application Project - - - org.sonatype.mavenbook.multi - simple-weather - 0.9-MNG6957-SNAPSHOT - compile - - - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent-build.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent-build.pom deleted file mode 100644 index 933db5cdb..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent-build.pom +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - - utils-parent - pom - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent.pom b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent.pom deleted file mode 100644 index 22d4fdbcc..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent.pom +++ /dev/null @@ -1,11 +0,0 @@ - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - 0.9-MNG6957-SNAPSHOT - - utils-parent - pom - \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/pom.xml b/core-it-suite/src/test/resources/mng-6957-buildconsumer/pom.xml deleted file mode 100644 index bc932c61d..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - 4.0.0 - org.sonatype.mavenbook.multi - parent - 0.9-${changelist}-SNAPSHOT - pom - Multi Chapter Parent Project - - - - simple-parent - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/pom.xml b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/pom.xml deleted file mode 100644 index 89ee52ccc..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - parent - - simple-parent - pom - Multi Chapter Simple Parent Project - - - simple-weather - simple-webapp - - - - simple-testutils - utils-parent - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 0.1-stub-SNAPSHOT - - - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-testutils/pom.xml b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-testutils/pom.xml deleted file mode 100644 index 75de31ce4..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-testutils/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - utils-parent - ../utils-parent - - simple-testutils - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-weather/pom.xml b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-weather/pom.xml deleted file mode 100644 index 7fbe5bfa2..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-weather/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - - simple-weather - jar - - Multi Chapter Simple Weather API - - - - org.sonatype.mavenbook.multi - simple-testutils - test - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml deleted file mode 100644 index 655d0ccd1..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - - - simple-webapp - Multi Chapter Simple Web Application Project - - - org.sonatype.mavenbook.multi - simple-weather - - - - simple-webapp - - - - org.apache.maven.plugins - maven-war-plugin - 3.3.2 - - - - - diff --git a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/utils-parent/pom.xml b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/utils-parent/pom.xml deleted file mode 100644 index 933db5cdb..000000000 --- a/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/utils-parent/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - org.sonatype.mavenbook.multi - simple-parent - - utils-parent - pom - diff --git a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/.mvn/.gitkeep b/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/.mvn/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/module-a/pom.xml b/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/module-a/pom.xml deleted file mode 100644 index 4b2b16435..000000000 --- a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/module-a/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng7390 - parent - 1.0 - - - module-a - - diff --git a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/module-b/pom.xml b/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/module-b/pom.xml deleted file mode 100644 index a9d9f7e25..000000000 --- a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/module-b/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 4.0.0 - - - org.apache.maven.its.mng7390 - parent - 1.0 - - - module-b - - diff --git a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml b/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml deleted file mode 100644 index d353c2536..000000000 --- a/core-it-suite/src/test/resources/mng-7390-pl-outside-cwd/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng7390 - parent - 1.0 - - pom - - Maven Integration Test :: MNG-7390 - This test suite tests whether other modules in the same multi-module project can be selected when invoking Maven - from a submodule. - - - module-a - module-b - - - - UTF-8 - 1.8 - 1.8 - - - - - - org.apache.maven.its.plugins - maven-it-plugin-log-file - 2.1-SNAPSHOT - - target/touch.txt - - - - test - - reset - - validate - - - - - - - diff --git a/core-it-suite/src/test/resources/mng-7629/.mvn/placeholder.txt b/core-it-suite/src/test/resources/mng-7629/.mvn/placeholder.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/core-it-suite/src/test/resources/mng-7629/child-1/pom.xml b/core-it-suite/src/test/resources/mng-7629/child-1/pom.xml deleted file mode 100644 index 1a8c62fd7..000000000 --- a/core-it-suite/src/test/resources/mng-7629/child-1/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - 4.0.0 - - - org.apache.maven.its.mng7629 - test - 1.0-SNAPSHOT - - - child-1 - - - 8 - 8 - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.2.0 - - - attach-mdo - - attach-artifact - - - - - src/main/mdo/settings.mdo - mdo - - - - - - - - - - diff --git a/core-it-suite/src/test/resources/mng-7629/child-1/src/main/java/org/apache/maven/its/mng7629/Test.java b/core-it-suite/src/test/resources/mng-7629/child-1/src/main/java/org/apache/maven/its/mng7629/Test.java deleted file mode 100644 index 8fe6e4958..000000000 --- a/core-it-suite/src/test/resources/mng-7629/child-1/src/main/java/org/apache/maven/its/mng7629/Test.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.its.mng7629; - -class Test {} diff --git a/core-it-suite/src/test/resources/mng-7629/child-1/src/main/mdo/settings.mdo b/core-it-suite/src/test/resources/mng-7629/child-1/src/main/mdo/settings.mdo deleted file mode 100644 index 93fa6034a..000000000 --- a/core-it-suite/src/test/resources/mng-7629/child-1/src/main/mdo/settings.mdo +++ /dev/null @@ -1,1083 +0,0 @@ - - - - - - settings - Settings - - This is a reference for the user-specific configuration for Maven.

-

Includes things that should not be distributed with the pom.xml file, such as developer identity, along with - local settings, like proxy information.

-

The default location for the settings file is ~/.m2/settings.xml

- ]]> -
- - - package - org.apache.maven.settings - - - - - TrackableBase - 1.0.0+ - - common base class that contains code to track the source for - this instance (USER|GLOBAL) - - - - 1.0.0+ - - - - - - - - IdentifiableBase - TrackableBase - 1.0.0+ - - Mirror, Profile, Proxy and Server. - ]]> - - - id - 1.0.0+ - String - default - true - - - - - Settings - 1.0.0+ - TrackableBase - - Root element of the user configuration file. - - - - localRepository - 1.0.0+ - true - - Default value is: ${user.home}/.m2/repository - ]]> - - String - - - interactiveMode - 1.0.0+ - - - - boolean - true - - - usePluginRegistry - 1.0.0+ - - - - boolean - false - - - - - offline - 1.0.0+ - false - - - - boolean - false - - - - - proxies - 1.0.0+ - - - - - Proxy - * - - - - servers - 1.0.0+ - - - - - Server - * - - - - mirrors - 1.0.0+ - - Configuration of download mirrors for repositories. - - - Mirror - * - - - - profiles - 1.0.0+ - - - - - Profile - * - - - - activeProfiles - 1.0.0+ - - - - - String - * - - - - pluginGroups - 1.0.0+ - - List of groupIds to search for a plugin when that plugin - groupId is not explicitly provided. - - - String - * - - - - - - 1.0.0+ - - activeProxy field to null - */ - public void flushActiveProxy() - { - this.activeProxy = null; - } - - /** - * @return the first active proxy - */ - public synchronized Proxy getActiveProxy() - { - if ( activeProxy == null ) - { - java.util.List proxies = getProxies(); - if ( proxies != null && !proxies.isEmpty() ) - { - for ( Proxy proxy : proxies ) - { - if ( proxy.isActive() ) - { - activeProxy = proxy; - break; - } - } - } - } - - return activeProxy; - } - - public Server getServer( String serverId ) - { - Server match = null; - - java.util.List servers = getServers(); - if ( servers != null && serverId != null ) - { - for ( Server server : servers ) - { - if ( serverId.equals( server.getId() ) ) - { - match = server; - break; - } - } - } - - return match; - } - - @Deprecated - public Mirror getMirrorOf( String repositoryId ) - { - Mirror match = null; - - java.util.List mirrors = getMirrors(); - if ( mirrors != null && repositoryId != null ) - { - for ( Mirror mirror : mirrors ) - { - if ( repositoryId.equals( mirror.getMirrorOf() ) ) - { - match = mirror; - break; - } - } - } - - return match; - } - - private java.util.Map profileMap; - - /** - * Reset the profileMap field to null - */ - public void flushProfileMap() - { - this.profileMap = null; - } - - /** - * @return a Map of profiles field with Profile#getId() as key - * @see Profile#getId() - */ - public java.util.Map getProfilesAsMap() - { - if ( profileMap == null ) - { - profileMap = new java.util.LinkedHashMap(); - - if ( getProfiles() != null ) - { - for ( Profile profile : getProfiles() ) - { - profileMap.put( profile.getId(), profile ); - } - } - } - - return profileMap; - } - ]]> - - - - - - - - - Proxy - 1.0.0+ - IdentifiableBase - - <proxy> element contains informations required to a proxy settings. - ]]> - - - active - 1.0.0+ - false - true - - - - boolean - - - protocol - 1.0.0+ - - - - String - http - - - username - 1.0.0+ - - - - String - - - password - 1.0.0+ - - - - String - - - port - 1.0.0+ - - - - int - 8080 - - - host - 1.0.0+ - - - - String - true - - - nonProxyHosts - 1.0.0+ - - - - String - - - - - Server - 1.0.0+ - IdentifiableBase - - <server> element contains informations required to a server settings. - ]]> - - - username - 1.0.0+ - - - - String - - - password - 1.0.0+ - - - - String - - - privateKey - 1.0.0+ - - - - String - - - passphrase - 1.0.0+ - - - - String - - - filePermissions - 1.0.0+ - - - - String - - - directoryPermissions - 1.0.0+ - - - - String - - - configuration - DOM - - - - - - - - Mirror - 1.0.0+ - IdentifiableBase - - A download mirror for a given repository. - - - - mirrorOf - true - 1.0.0+ - String - - The server ID of the repository being mirrored, e.g., - "central". This MUST NOT match the mirror id. - - - - name - false - 1.0.0+ - String - - The optional name that describes the mirror. - - - - url - true - 1.0.0+ - String - The URL of the mirror repository. - - - layout - 1.1.0+ - String - default - The layout of the mirror repository. Since Maven 3. - - - mirrorOfLayouts - 1.1.0+ - String - default,legacy - - The layouts of repositories being mirrored. This value can be used to restrict the usage - of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3. - - - - blocked - 1.2.0+ - boolean - false - - Whether this mirror should be blocked from any download request but fail the download process, explaining why. - - - - - - 1.0.0+ - - - - - - - - - Profile - 1.0.0+ - IdentifiableBase - - - - - - activation - 1.0.0+ - - - - - Activation - - - - properties - - <property.name>property.value</property.name> - ]]> - - Properties - - String - * - - - - repositories - 1.0.0+ - - - - - Repository - * - - - - pluginRepositories - 1.0.0+ - - - - - Repository - * - - - - - - - - - Activation - 1.0.0+ - - - - - - activeByDefault - 1.0.0+ - boolean - - Flag specifying whether this profile is active as a default. - - - - jdk - 1.0.0+ - String - - - - - - os - 1.0.0+ - - - - - ActivationOS - - - - property - 1.0.0+ - - - - - ActivationProperty - - - - file - 1.0.0+ - - - - - ActivationFile - - - - - - - - RepositoryBase - 1.0.0+ - - - - - - id - 1.0.0+ - - - - String - - - name - 1.0.0+ - - - - String - - - url - 1.0.0+ - - - - String - - - layout - 1.0.0+ - - The type of layout this repository uses for locating and - storing artifacts - can be "legacy" or "default". - - String - default - - - - - 1.0.0+ - - - - - - - - - Repository - RepositoryBase - 1.0.0+ - - Repository contains the information needed for establishing - connections with remote repository - - - - releases - 1.0.0+ - - How to handle downloading of releases from this repository - - - RepositoryPolicy - - - - snapshots - 1.0.0+ - - How to handle downloading of snapshots from this repository - - - RepositoryPolicy - - - - - - - 1.0.0+ - - - - - - - - - RepositoryPolicy - 1.0.0+ - Download policy - - - enabled - 1.0.0+ - - Whether to use this repository for downloading this type of - artifact. - - boolean - true - - - updatePolicy - 1.0.0+ - - The frequency for downloading updates - can be "always", - "daily" (default), "interval:XXX" (in minutes) or "never" - (only if it doesn't exist locally). - - String - - - checksumPolicy - 1.0.0+ - - What to do when verification of an artifact checksum fails. Valid values are "fail" (default for Maven 4 and - above), "warn" (default for Maven 2 and 3) or "ignore". - - String - - - - - - ActivationProperty - 1.0.0+ - - - - - - name - 1.0.0+ - String - true - - The name of the property to be used to activate a profile. - - - - value - 1.0.0+ - String - - The value of the property to be used to activate a profile. - - - - - - ActivationOS - 1.0.0+ - - - - - - name - 1.0.0+ - String - - The name of the OS to be used to activate a profile. - - - - family - 1.0.0+ - String - - The general family of the OS to be used to activate a - profile (e.g. 'windows') - - - - arch - 1.0.0+ - String - - The architecture of the OS to be used to activate a profile. - - - - version - 1.0.0+ - String - - The version of the OS to be used to activate a profile. - - - - - - 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. - - - - - - -
diff --git a/core-it-suite/src/test/resources/mng-7629/child-2/pom.xml b/core-it-suite/src/test/resources/mng-7629/child-2/pom.xml deleted file mode 100644 index a690b32a5..000000000 --- a/core-it-suite/src/test/resources/mng-7629/child-2/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - 4.0.0 - - - org.apache.maven.its.mng7629 - test - 1.0-SNAPSHOT - - - child-2 - - - - org.apache.maven.its.mng7629 - child-1 - 1.0-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.3.0 - - - copy-model - - copy - - generate-sources - - - - org.apache.maven.its.mng7629 - child-1 - 1.0-SNAPSHOT - mdo - target/mdo/ - settings.mdo - - - - - - - - - - diff --git a/core-it-suite/src/test/resources/mng-7629/pom.xml b/core-it-suite/src/test/resources/mng-7629/pom.xml deleted file mode 100644 index 30e555b64..000000000 --- a/core-it-suite/src/test/resources/mng-7629/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng7629 - test - 1.0-SNAPSHOT - pom - - - child-1 - child-2 - - - diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/pom.xml b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/pom.xml deleted file mode 100644 index 4e39d213a..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/pom.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.its.mng-7836 - maven-hocon-extension - 1.0.0-SNAPSHOT - jar - - - 8 - ${javaVersion} - ${javaVersion} - - - - - org.apache.maven - maven-api-spi - 4.0.0-alpha-8-SNAPSHOT - provided - - - org.apache.maven - maven-api-core - 4.0.0-alpha-8-SNAPSHOT - provided - - - com.typesafe - config - 1.4.2 - - - javax.inject - javax.inject - 1 - - - javax.annotation - javax.annotation-api - 1.3.2 - - - org.junit.jupiter - junit-jupiter - 5.9.1 - test - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.3.0 - - - copy-mdo - - copy - - generate-sources - - - - org.apache.maven - maven-api-model - 4.0.0-alpha-8-SNAPSHOT - mdo - - - - - - - - org.codehaus.modello - modello-maven-plugin - 2.1.1 - - - generate-hocon-reader - - velocity - - generate-sources - - 4.2.0 - - target/dependency/maven-api-model-4.0.0-alpha-8-SNAPSHOT.mdo - - - - - - packageModelV4=org.apache.maven.api.model - - - - - - - org.eclipse.sisu - sisu-maven-plugin - 0.9.0.M4 - - - index-project - - main-index - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M7 - - - - - diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/main/java/org/apache/maven/hocon/HoconModelReader.java b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/main/java/org/apache/maven/hocon/HoconModelReader.java deleted file mode 100644 index 0a7e55b25..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/main/java/org/apache/maven/hocon/HoconModelReader.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.hocon; - -import javax.annotation.Priority; -import javax.inject.Named; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Map; -import java.util.Optional; - -import com.typesafe.config.Config; -import com.typesafe.config.ConfigFactory; -import org.apache.maven.api.model.Model; -import org.apache.maven.api.services.Source; -import org.apache.maven.api.spi.ModelParser; -import org.apache.maven.api.spi.ModelParserException; - -@Named("hocon") -@Priority(1) -public class HoconModelReader implements ModelParser { - - @Override - public Optional locate(Path path) { - Path pom = Files.isDirectory(path) ? path.resolve("pom.hocon") : path; - return Files.isRegularFile(pom) ? Optional.of(new PathSource(pom)) : Optional.empty(); - } - - @Override - public Model parse(Source source, Map map) throws ModelParserException { - Config config; - if (source.getPath() != null) { - config = ConfigFactory.parseFile(source.getPath().toFile()); - } else { - try (InputStream input = source.openStream()) { - config = ConfigFactory.parseReader(new InputStreamReader(input, StandardCharsets.UTF_8)); - } catch (IOException e) { - throw new ModelParserException("Unable to parse: " + source.getLocation(), e); - } - } - return new HoconReader().parseModel(config.root()); - } -} diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/main/java/org/apache/maven/hocon/PathSource.java b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/main/java/org/apache/maven/hocon/PathSource.java deleted file mode 100644 index cdf5b7bd4..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/main/java/org/apache/maven/hocon/PathSource.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.hocon; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Objects; - -import org.apache.maven.api.services.Source; - -public class PathSource implements Source { - - private final Path path; - - public PathSource(Path path) { - this.path = Objects.requireNonNull(path); - } - - @Override - public Path getPath() { - return path; - } - - @Override - public InputStream openStream() throws IOException { - return Files.newInputStream(path); - } - - @Override - public String getLocation() { - return path.toString(); - } - - @Override - public Source resolve(String s) { - return new PathSource(path.resolve(s)); - } -} diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/mdo/hocon-reader.vm b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/mdo/hocon-reader.vm deleted file mode 100644 index b21925f39..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/mdo/hocon-reader.vm +++ /dev/null @@ -1,206 +0,0 @@ -#* - 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 - - 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. -*# -#set ( $package = "org.apache.maven.hocon" ) -#set ( $className = "HoconReader" ) -# -#set ( $root = $model.getClass( $model.getRoot($version), $version ) ) -#set ( $rootXml = $Helper.xmlClassMetadata( $root ) ) -#set ( $rootTag = $rootXml.tagName ) -#set ( $rootUcapName = $Helper.capitalise( $root.name ) ) -#set ( $rootLcapName = $Helper.uncapitalise( $root.name ) ) -# -#MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/${className}.java -// =================== DO NOT EDIT THIS FILE ==================== -// Generated by Modello Velocity from ${template} -// template, any modifications will be overwritten. -// ============================================================== -package ${package}; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.text.DateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.function.Function; -import java.util.stream.Collectors; -import org.apache.maven.api.annotations.Generated; -#foreach ( $class in $model.allClasses ) -import ${packageModelV4}.${class.name}; -#end -import com.typesafe.config.ConfigList; -import com.typesafe.config.ConfigObject; -import com.typesafe.config.ConfigValue; -import com.typesafe.config.ConfigValueType; - -@Generated -public class ${className} { - -#foreach ( $class in $model.allClasses ) - #if ( $class.name != "InputSource" && $class.name != "InputLocation" ) - #set ( $classUcapName = $Helper.capitalise( $class.name ) ) - #set ( $classLcapName = $Helper.uncapitalise( $class.name ) ) - #set ( $ancestors = $Helper.ancestors( $class ) ) - #set ( $allFields = [] ) - #foreach ( $cl in $ancestors ) - #set ( $dummy = $allFields.addAll( $cl.getFields($version) ) ) - #end - public ${classUcapName} parse${classUcapName}(ConfigValue value) { - if (value instanceof ConfigObject) { - ${classUcapName}.Builder ${classLcapName} = ${classUcapName}.newBuilder(true); - ((ConfigObject) value).forEach((k, v) -> { - switch (k) { - #foreach ( $field in $allFields ) - #if ( ! $Helper.xmlFieldMetadata( $field ).transient && $field.name != "root" ) - #set ( $fieldTagName = $Helper.xmlFieldMetadata( $field ).tagName ) - #if ( ! $fieldTagName ) - #set ( $fieldTagName = $field.name ) - #end - #if ( $Helper.isFlatItems( $field ) ) - #set ( $fieldTagName = $Helper.singular( $fieldTagName ) ) - #end - #set ( $fieldCapName = $Helper.capitalise( $field.name ) ) - case "${fieldTagName}": { - #if ( $field.type == "String" ) - ${classLcapName}.${field.name}(getStringValue(v)); - break; - #elseif ( $field.type == "boolean" || $field.type == "Boolean" ) - ${classLcapName}.${field.name}(getBooleanValue(v)); - break; - #elseif ( $field.type == "int" ) - ${classLcapName}.${field.name}(getIntegerValue(v)); - break; - #elseif ( $field.type == "DOM" ) -// ${classLcapName}.${field.name}(XmlNodeBuilder.build(parser, true)); - break; - #elseif ( $field.type == "java.util.List" && $field.to == "String" && $field.multiplicity == "*" ) - ${classLcapName}.${field.name}(getStringList(v)); - break; - #elseif ( $field.type == "java.util.Properties" && $field.to == "String" && $field.multiplicity == "*" ) - ${classLcapName}.${field.name}(getStringMap(v)); - break; - #elseif ( $field.to && $field.multiplicity == "1" ) - ${classLcapName}.${field.name}(parse${field.toClass.name}(v)); - break; - #elseif ( $field.to && $field.multiplicity == "*" && $Helper.isFlatItems( $field ) ) - ${field.name}.add(parse${field.toClass.name}(v)); - break; - #elseif ( $field.to && $field.multiplicity == "*" ) - ${classLcapName}.${field.name}(getList(v, this::parse${field.toClass.name})); - break; - #else - // TODO: type=${field.type} to=${field.to} multiplicity=${field.multiplicity} - break; - #end - } - #end - #end - default: { - checkUnknownElement(k, v); - break; - } - } - }); - #foreach ( $field in $allFields ) - #if ( $Helper.isFlatItems( $field ) ) - ${classLcapName}.${field.name}(${field.name}); - #end - #end - return ${classLcapName}.build(); - #if($class.name=="Dependency") - } else if (value != null && value.valueType() == ConfigValueType.STRING) { - Dependency.Builder dependency = Dependency.newBuilder(true); - String[] tokens = ((String) value.unwrapped()).split(":"); - if (tokens.length < 3 || tokens.length > 5) { - throw new RuntimeException("Invalid artifact, you must specify " - + "groupId:artifactId:version[:packaging[:classifier]] " + value); - } - dependency.groupId(tokens[0]); - dependency.artifactId(tokens[1]); - dependency.version(tokens[2]); - if (tokens.length >= 4) { - dependency.type(tokens[3]); - } - if (tokens.length == 5) { - dependency.classifier(tokens[4]); - } - return dependency.build(); - #end - } else if (value != null) { - throw new IllegalArgumentException("Invalid syntax: cannot parse: " + value); - } - return null; - } - - #end -#end - - protected String getStringValue(ConfigValue v) { - return v.unwrapped().toString(); - } - - protected List getStringList(ConfigValue v) { - if (v instanceof ConfigList) { - return ((ConfigList) v).unwrapped().stream().map(Object::toString) - .collect(Collectors.toList()); - } - throw new IllegalArgumentException("Unable to convert to List: '" + v + "'"); - } - - protected boolean getBooleanValue(ConfigValue v) { - return Boolean.parseBoolean(v.unwrapped().toString()); - } - - protected int getIntegerValue(ConfigValue v) { - return Integer.parseInt(v.unwrapped().toString()); - } - - protected ConfigList getList(ConfigValue v) { - if (v instanceof ConfigList) { - return (ConfigList) v; - } - throw new IllegalArgumentException("Unable to convert to List: '" + v + "'"); - } - - protected List getList(ConfigValue v, Function parser) { - return getList(v).stream().map(parser).collect(Collectors.toList()); - } - - protected Map getStringMap(ConfigValue v) { - if (v instanceof ConfigObject) { - return ((ConfigObject) v).entrySet().stream().collect(Collectors.toMap( - e -> e.getKey(), - e -> getStringValue(e.getValue()) - )); - } - throw new IllegalArgumentException("Unable to convert to Map: '" + v + "'"); - } - - protected void checkUnknownElement(String k, Object v) { - throw new IllegalArgumentException("Unrecognized element '" + k + "' with value '" + v + "'"); - } - -} diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/test/java/org/apache/maven/hocon/ParsingTest.java b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/test/java/org/apache/maven/hocon/ParsingTest.java deleted file mode 100644 index 6f611af0f..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/test/java/org/apache/maven/hocon/ParsingTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.hocon; - -import java.io.File; - -import com.typesafe.config.Config; -import com.typesafe.config.ConfigFactory; -import org.apache.maven.api.model.Model; -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -class ParsingTest { - - @Test - void testParse() throws Exception { - Config config = ConfigFactory.parseFile(new File("src/test/resources/pom.hocon")); - - Model model = new HoconReader().parseModel(config.root()); - - assertEquals("40", model.getParent().getVersion()); - assertEquals(1, model.getDependencies().size()); - assertEquals(2, model.getProperties().size()); - } -} diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/test/resources/pom.hocon b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/test/resources/pom.hocon deleted file mode 100644 index c51b554e4..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/maven-hocon-extension/src/test/resources/pom.hocon +++ /dev/null @@ -1,36 +0,0 @@ -# -# 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 -# -# 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. -# -modelVersion = 4.0.0 -parent { - groupId = org.apache.maven.extensions - artifactId = maven-extensions - version = 40 -} -groupId = org.apache.maven.extensions -artifactId = maven-hocon-extension -version = 1.0.0-SNAPSHOT - -properties = { - "my.property" = foo - pluginVersion = 3.9 -} - -dependencies = [ - { groupId = org.apache.maven, artifactId = maven-api-core, version = 4.0.0-alpha-8-SNAPSHOT } -] \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/simple/.mvn/extensions.xml b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/simple/.mvn/extensions.xml deleted file mode 100644 index 5c69abcbc..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/simple/.mvn/extensions.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - org.apache.maven.its.mng-7836 - maven-hocon-extension - 1.0.0-SNAPSHOT - - diff --git a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/simple/pom.hocon b/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/simple/pom.hocon deleted file mode 100644 index 3164b5174..000000000 --- a/core-it-suite/src/test/resources/mng-7836-alternative-pom-syntax/simple/pom.hocon +++ /dev/null @@ -1,37 +0,0 @@ -# -# 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 -# -# 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. -# -modelVersion = 4.0.0 -parent { - groupId = org.apache.maven.extensions - artifactId = maven-extensions - version = 40 -} -groupId = org.apache.maven.its.mng-7836 -artifactId = hocon-simple -version = 1.0.0-SNAPSHOT - -properties = { - "my.property" = foo - pluginVersion = 3.9 -} - -dependencies = [ - # just add one dummy dependency - "com.typesafe:config:1.4.2" -] \ No newline at end of file diff --git a/core-it-suite/src/test/resources/mng-7891-extension-configuration/build-extension/pom.xml b/core-it-suite/src/test/resources/mng-7891-extension-configuration/build-extension/pom.xml deleted file mode 100644 index 951402ade..000000000 --- a/core-it-suite/src/test/resources/mng-7891-extension-configuration/build-extension/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - org.apache.maven.its.mng7891 - build-extension - 0.0.1-SNAPSHOT - - - - org.apache.maven.its.mng7891 - extension - 1.0-SNAPSHOT - - - The session has just started at ${maven.build.timestamp} - All projects are read now! The build will start and the user has passed -DuserValue=${userValue} on the commandline - - - - - - diff --git a/core-it-suite/src/test/resources/mng-7891-extension-configuration/core-extension/.mvn/extensions.xml b/core-it-suite/src/test/resources/mng-7891-extension-configuration/core-extension/.mvn/extensions.xml deleted file mode 100644 index b11a7172b..000000000 --- a/core-it-suite/src/test/resources/mng-7891-extension-configuration/core-extension/.mvn/extensions.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - org.apache.maven.its.mng7891 - extension - 1.0-SNAPSHOT - - - The session has just started at ${maven.build.timestamp} - All projects are read now! The build will start and the user has passed -DuserValue=${userValue} on the commandline - - - - diff --git a/core-it-suite/src/test/resources/mng-7891-extension-configuration/core-extension/pom.xml b/core-it-suite/src/test/resources/mng-7891-extension-configuration/core-extension/pom.xml deleted file mode 100644 index 248798ee3..000000000 --- a/core-it-suite/src/test/resources/mng-7891-extension-configuration/core-extension/pom.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - org.apache.maven.its.mng7891 - core-extension - 0.0.1-SNAPSHOT - diff --git a/core-it-suite/src/test/resources/mng-7891-extension-configuration/extension/pom.xml b/core-it-suite/src/test/resources/mng-7891-extension-configuration/extension/pom.xml deleted file mode 100644 index d738b93db..000000000 --- a/core-it-suite/src/test/resources/mng-7891-extension-configuration/extension/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - org.apache.maven.its.mng7891 - extension - 1.0-SNAPSHOT - jar - - - 8 - ${javaVersion} - ${javaVersion} - 3.8.6 - - - - - org.apache.maven - maven-core - ${maven.version} - provided - - - - - - - org.eclipse.sisu - sisu-maven-plugin - 0.9.0.M4 - - - index-project - - main-index - - - - - - - diff --git a/core-it-suite/src/test/resources/mng-7891-extension-configuration/extension/src/main/java/org/apache/maven/its/mng7891/MyLifecycleParticipant.java b/core-it-suite/src/test/resources/mng-7891-extension-configuration/extension/src/main/java/org/apache/maven/its/mng7891/MyLifecycleParticipant.java deleted file mode 100644 index 21f5f6786..000000000 --- a/core-it-suite/src/test/resources/mng-7891-extension-configuration/extension/src/main/java/org/apache/maven/its/mng7891/MyLifecycleParticipant.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * 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. - */ -package org.apache.maven.its.mng7891; - -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; - -import org.apache.maven.AbstractMavenLifecycleParticipant; -import org.apache.maven.MavenExecutionException; -import org.apache.maven.execution.MavenSession; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.logging.Logger; - -@Named -@Singleton -public class MyLifecycleParticipant extends AbstractMavenLifecycleParticipant { - - private PlexusConfiguration configuration; - private Logger logger; - - @Inject - public MyLifecycleParticipant( - @Named("org.apache.maven.its.mng7891:extension") PlexusConfiguration configuration, Logger logger) { - this.configuration = configuration; - this.logger = logger; - } - - @Override - public void afterProjectsRead(MavenSession session) throws MavenExecutionException { - PlexusConfiguration messages = configuration.getChild("messages"); - PlexusConfiguration sessionStart = messages.getChild("projectsRead"); - logger.info(sessionStart.getValue("No session projects read message configured")); - } -}