This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch MNG-6957 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 04d895bbb99198889c322699bd103c4e52b6ac1f Author: rfscholte <rfscho...@apache.org> AuthorDate: Tue Oct 6 22:05:40 2020 +0200 MNG-6957: versionless reactor dependencies/parent should work even if modules are aggregated in reverse order --- .../org/apache/maven/it/IntegrationTestSuite.java | 2 +- .../maven/it/MavenITmng5576CdFriendlyVersions.java | 32 ++++++- .../maven/it/MavenITmng5669ReadPomsOnce.java | 3 +- ...enITmng5895CIFriendlyUsageWithPropertyTest.java | 22 ++++- .../maven/it/MavenITmng6090CIFriendlyTest.java | 29 ++++++- .../maven/it/MavenITmng6957BuildConsumer.java | 97 ++++++++++++++++++++++ .../mng-6957-buildconsumer/expected/parent.pom | 28 +++++++ .../expected/simple-parent.pom | 42 ++++++++++ .../expected/simple-testutils.pom | 26 ++++++ .../expected/simple-weather.pom | 39 +++++++++ .../expected/simple-webapp.pom | 47 +++++++++++ .../expected/utils-parent.pom | 27 ++++++ .../test/resources/mng-6957-buildconsumer/pom.xml | 36 ++++++++ .../mng-6957-buildconsumer/simple-parent/pom.xml | 52 ++++++++++++ .../simple-parent/simple-testutils/pom.xml | 32 +++++++ .../simple-parent/simple-weather/pom.xml | 43 ++++++++++ .../simple-parent/simple-webapp/pom.xml | 51 ++++++++++++ .../simple-parent/utils-parent/pom.xml | 32 +++++++ 18 files changed, 635 insertions(+), 5 deletions(-) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index ee41a83..a7bb04d 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -106,7 +106,7 @@ public class IntegrationTestSuite // Tests that don't run stable and need to be fixed // ------------------------------------------------------------------------------------------------------------- // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 - + suite.addTestSuite( MavenITmng6957BuildConsumer.class ); suite.addTestSuite( MavenITmng6972AllowAccessToGraphPackageTest.class ); suite.addTestSuite( MavenITmng6759TransitiveDependencyRepositoriesTest.class ); suite.addTestSuite( MavenITmng6720FailFastTest.class ); diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java index d66b6ec..d68d79d 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5576CdFriendlyVersions.java @@ -43,7 +43,7 @@ public class MavenITmng5576CdFriendlyVersions * Verifies that property references with dotted notation work within * POM interpolation. */ - public void testContinuousDeliveryFriendlyVersionsAreWarningFree() + public void testContinuousDeliveryFriendlyVersionsAreWarningFreeWithoutBuildConsumer() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5576-cd-friendly-versions" ); @@ -52,6 +52,7 @@ public class MavenITmng5576CdFriendlyVersions verifier.setAutoclean( false ); verifier.deleteDirectory( "target" ); verifier.addCliOption( "-Dchangelist=changelist" ); + verifier.addCliOption( "-Dmaven.experimental.buildconsumer=false" ); verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); @@ -66,4 +67,33 @@ public class MavenITmng5576CdFriendlyVersions } } + /** + * Verifies that property references with dotted notation work within + * POM interpolation. + */ + public void testContinuousDeliveryFriendlyVersionsAreWarningFreeWithBuildConsumer() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5576-cd-friendly-versions" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.setLogFileName( "log-bc.txt" ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.addCliOption( "-Dchangelist=changelist" ); + verifier.addCliOption( "-Dmaven.experimental.buildconsumer=true" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + Properties props = verifier.loadProperties( "target/pom.properties" ); + assertEquals( "1.0.0.changelist", props.getProperty( "project.version" ) ); + + List<String> lines = verifier.loadFile( new File( testDir, "log-bc.txt" ), false ); + for( String line : lines ) + { + assertFalse( line, line.contains( "WARNING" ) ); + } + } + } diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java index 666b647..9a3195c 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java @@ -109,6 +109,7 @@ public class MavenITmng5669ReadPomsOnce verifier.getArtifactPath( "mng-coreit", "javaagent", "1.0-SNAPSHOT", "jar" ) ); verifier.filterFile( ".mvn/jvm.config", ".mvn/jvm.config", null, filterProperties ); + verifier.setLogFileName( "log-bc.txt" ); verifier.setForkJvm( true ); // pick up agent verifier.setMavenDebug( false ); verifier.setAutoclean( false ); @@ -118,7 +119,7 @@ public class MavenITmng5669ReadPomsOnce verifier.executeGoals( Arrays.asList( "verify" ) ); verifier.resetStreams(); - List<String> logTxt = verifier.loadLines( "log.txt", "utf-8" ); + List<String> logTxt = verifier.loadLines( "log-bc.txt", "utf-8" ); for ( String line : logTxt ) { if ( line.startsWith( "Picked up JAVA_TOOL_OPTIONS:" ) ) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5895CIFriendlyUsageWithPropertyTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5895CIFriendlyUsageWithPropertyTest.java index 7d13fd4..5d0db85 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5895CIFriendlyUsageWithPropertyTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5895CIFriendlyUsageWithPropertyTest.java @@ -49,7 +49,7 @@ public class MavenITmng5895CIFriendlyUsageWithPropertyTest * of defining the property via command line which is * already defined inside the pom. */ - public void testitShouldResolveTheDependencies() + public void testitShouldResolveTheDependenciesWithoutBuildConsumer() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5895-ci-friendly-usage-with-property" ); @@ -60,6 +60,7 @@ public class MavenITmng5895CIFriendlyUsageWithPropertyTest //verifier.setLogFileName( "log-only.txt" ); verifier.addCliOption( "-Drevision=1.2" ); + verifier.addCliOption( "-Dmaven.experimental.buildconsumer=false" ); verifier.executeGoal( "clean" ); verifier.executeGoal( "package" ); verifier.verifyErrorFreeLog(); @@ -67,4 +68,23 @@ public class MavenITmng5895CIFriendlyUsageWithPropertyTest } + public void testitShouldResolveTheDependenciesWithBuildConsumer() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5895-ci-friendly-usage-with-property" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath(), false ); + verifier.setMavenDebug( false ); + verifier.setAutoclean( false ); + + verifier.setLogFileName( "log-bc.txt" ); + verifier.addCliOption( "-Drevision=1.2" ); + verifier.addCliOption( "-Dmaven.experimental.buildconsumer=true" ); + verifier.executeGoal( "clean" ); + verifier.executeGoal( "package" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + } + } diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6090CIFriendlyTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6090CIFriendlyTest.java index 77b7248..e9d3abe 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6090CIFriendlyTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6090CIFriendlyTest.java @@ -50,7 +50,7 @@ public class MavenITmng6090CIFriendlyTest * install the projects and afterwards just build * a part of the whole reactor. */ - public void testitShouldResolveTheDependencies() + public void testitShouldResolveTheDependenciesWithoutBuildConsumer() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6090-ci-friendly" ); @@ -60,6 +60,7 @@ public class MavenITmng6090CIFriendlyTest verifier.setAutoclean( false ); verifier.addCliOption( "-Drevision=1.2" ); + verifier.addCliOption( "-Dmaven.experimental.buildconsumer=false" ); verifier.setLogFileName( "install-log.txt" ); verifier.executeGoals( Arrays.asList( "clean", "install" ) ); verifier.verifyErrorFreeLog(); @@ -74,7 +75,33 @@ public class MavenITmng6090CIFriendlyTest verifier.executeGoal( "package" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + } + public void testitShouldResolveTheDependenciesWithBuildConsumer() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6090-ci-friendly" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath(), false ); + verifier.setMavenDebug( false ); + verifier.setAutoclean( false ); + + verifier.addCliOption( "-Drevision=1.2" ); + verifier.addCliOption( "-Dmaven.experimental.buildconsumer=true" ); + verifier.setLogFileName( "install-log.txt" ); + verifier.executeGoals( Arrays.asList( "clean", "install" ) ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier = newVerifier( testDir.getAbsolutePath(), false ); + verifier.setMavenDebug( false ); + verifier.setAutoclean( false ); + + verifier.addCliOption( "-Drevision=1.2" ); + verifier.addCliOption( "-pl module-3" ); + verifier.executeGoal( "package" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); } } 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 new file mode 100644 index 0000000..dd5a9ae --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6957BuildConsumer.java @@ -0,0 +1,97 @@ +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.apache.maven.it.util.ResourceExtractor; +import org.apache.maven.shared.utils.io.FileUtils; + +import java.io.File; +import java.util.Arrays; + +/** + * With the build-consumer the pom.xml will be adjusted during the process. + * <ul> + * <li>CLI-friendly versions will be resolved</li> + * <li>parents can omit the version if the relative path points to the correct parent</li> + * <li>dependencies can omit the version if it is part of the reactor</li> + * </ul> + * + * During install the pom will be cleaned up + * <ul> + * <li>the modules will be removed</li> + * <li>the relativePath will be removed</li> + * </ul> + * + * <a href="https://issues.apache.org/jira/browse/MNG-6656">MNG-6656</a>. + * + */ +public class MavenITmng6957BuildConsumer + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng6957BuildConsumer() + { + super( "[3.7.0,)" ); + } + + /** + * Verifies: + * <ul> + * <li>preserve license</li> + * <li>consistent line separators</li> + * <li>resolved project versions (at least 2 levels deep) in parent and dependencies</li> + * <li>removal of modules in aggregators</li> + * </ul> + * @throws Exception + */ + public void testPublishedPoms() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6957-buildconsumer" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath(), false ); + verifier.setMavenDebug( false ); + verifier.setAutoclean( false ); + verifier.addCliOption( "-Dchangelist=MNG6957" ); + + verifier.executeGoals( Arrays.asList( "install" ) ); + verifier.verifyErrorFreeLog(); + + String content; + content = FileUtils.fileRead( new File( testDir, "expected/parent.pom") ); + verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6957-SNAPSHOT", "pom", content ); + + content = FileUtils.fileRead( new File( testDir, "expected/simple-parent.pom") ); + verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6957-SNAPSHOT", "pom", content ); + + content = FileUtils.fileRead( new File( testDir, "expected/simple-weather.pom") ); + verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6957-SNAPSHOT", "pom", content ); + + content = FileUtils.fileRead( new File( testDir, "expected/simple-webapp.pom") ); + verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6957-SNAPSHOT", "pom", content ); + + content = FileUtils.fileRead( new File( testDir, "expected/simple-testutils.pom") ); + verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-testutils", "0.9-MNG6957-SNAPSHOT", "pom", content ); + + content = FileUtils.fileRead( new File( testDir, "expected/utils-parent.pom") ); + verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "utils-parent", "0.9-MNG6957-SNAPSHOT", "pom", content ); + } + +} 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 new file mode 100644 index 0000000..46d9335 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/parent.pom @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>parent</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + <packaging>pom</packaging> + <name>Multi Chapter Parent Project</name> + + <!-- Optimized from https://github.com/sonatype/maven-example-en/tree/master/examples/ch-multi --> + +</project> \ No newline at end of file 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 new file mode 100644 index 0000000..6a0b3ab --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-parent.pom @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>parent</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + </parent> + <artifactId>simple-parent</artifactId> + <packaging>pom</packaging> + <name>Multi Chapter Simple Parent Project</name> + + + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + </plugins> + </pluginManagement> + </build> + +</project> \ No newline at end of file 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 new file mode 100644 index 0000000..b895793 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-testutils.pom @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>utils-parent</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + </parent> + <artifactId>simple-testutils</artifactId> +</project> \ No newline at end of file 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 new file mode 100644 index 0000000..439942a --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-weather.pom @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-parent</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + </parent> + <artifactId>simple-weather</artifactId> + <packaging>jar</packaging> + + <name>Multi Chapter Simple Weather API</name> + + <dependencies> + <dependency> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-testutils</artifactId> + <scope>test</scope> + <version>0.9-MNG6957-SNAPSHOT</version> + </dependency> + </dependencies> + +</project> \ No newline at end of file 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 new file mode 100644 index 0000000..80e8a3d --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/simple-webapp.pom @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-parent</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + </parent> + + <artifactId>simple-webapp</artifactId> + <name>Multi Chapter Simple Web Application Project</name> + <dependencies> + <dependency> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-weather</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + </dependency> + </dependencies> + <build> + <finalName>simple-webapp</finalName> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.6</version> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> \ No newline at end of file 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 new file mode 100644 index 0000000..3602406 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/expected/utils-parent.pom @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?><!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-parent</artifactId> + <version>0.9-MNG6957-SNAPSHOT</version> + </parent> + <artifactId>utils-parent</artifactId> + <packaging>pom</packaging> +</project> \ 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 new file mode 100644 index 0000000..1455523 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>parent</artifactId> + <version>0.9-${changelist}-SNAPSHOT</version> + <packaging>pom</packaging> + <name>Multi Chapter Parent Project</name> + + <!-- Optimized from https://github.com/sonatype/maven-example-en/tree/master/examples/ch-multi --> + <modules> + <module>simple-parent</module> + </modules> +</project> 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 new file mode 100644 index 0000000..11428b9 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/pom.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>parent</artifactId> + </parent> + <artifactId>simple-parent</artifactId> + <packaging>pom</packaging> + <name>Multi Chapter Simple Parent Project</name> + + <modules> + <module>simple-weather</module> + <module>simple-webapp</module> + <module>simple-testutils</module> + <module>utils-parent</module> + </modules> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + </plugins> + </pluginManagement> + </build> + +</project> 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 new file mode 100644 index 0000000..84f1f35 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-testutils/pom.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>utils-parent</artifactId> + <relativePath>../utils-parent</relativePath> + </parent> + <artifactId>simple-testutils</artifactId> +</project> 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 new file mode 100644 index 0000000..a216479 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-weather/pom.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-parent</artifactId> + </parent> + <artifactId>simple-weather</artifactId> + <packaging>jar</packaging> + + <name>Multi Chapter Simple Weather API</name> + + <dependencies> + <dependency> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-testutils</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> 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 new file mode 100644 index 0000000..9e9c087 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/simple-webapp/pom.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-parent</artifactId> + </parent> + + <artifactId>simple-webapp</artifactId> + <name>Multi Chapter Simple Web Application Project</name> + <dependencies> + <dependency> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-weather</artifactId> + </dependency> + </dependencies> + <build> + <finalName>simple-webapp</finalName> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.6</version> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> 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 new file mode 100644 index 0000000..f5c946f --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6957-buildconsumer/simple-parent/utils-parent/pom.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonatype.mavenbook.multi</groupId> + <artifactId>simple-parent</artifactId> + </parent> + <artifactId>utils-parent</artifactId> + <packaging>pom</packaging> +</project>