This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch MNG-7182 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit f906bc40fd0cc33e72bbb3d849cf382eda498c5e Author: Guillaume Nodet <[email protected]> AuthorDate: Thu Jul 8 07:52:42 2021 +0200 Fix integration tests --- .../java/org/apache/maven/it/MavenITmng6090CIFriendlyTest.java | 2 ++ .../java/org/apache/maven/it/MavenITmng6656BuildConsumer.java | 4 ++++ .../java/org/apache/maven/it/MavenITmng6957BuildConsumer.java | 6 ++++++ .../test/resources/mng-6656-buildconsumer/expected/parent.pom | 10 +++++++--- .../mng-6656-buildconsumer/expected/simple-parent.pom | 10 +++++++--- .../mng-6656-buildconsumer/expected/simple-weather.pom | 10 +++++++--- .../mng-6656-buildconsumer/expected/simple-webapp.pom | 10 +++++++--- .../test/resources/mng-6957-buildconsumer/expected/parent.pom | 10 +++++++--- .../mng-6957-buildconsumer/expected/simple-parent.pom | 10 +++++++--- .../mng-6957-buildconsumer/expected/simple-testutils.pom | 10 +++++++--- .../mng-6957-buildconsumer/expected/simple-weather.pom | 10 +++++++--- .../mng-6957-buildconsumer/expected/simple-webapp.pom | 10 +++++++--- .../resources/mng-6957-buildconsumer/expected/utils-parent.pom | 10 +++++++--- 13 files changed, 82 insertions(+), 30 deletions(-) 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 9d72eba..66aefb3 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 @@ -85,6 +85,7 @@ public class MavenITmng6090CIFriendlyTest Verifier verifier = newVerifier( testDir.getAbsolutePath(), false ); verifier.setMavenDebug( false ); verifier.setAutoclean( false ); + verifier.setForkJvm(true); verifier.addCliOption( "-Drevision=1.2" ); verifier.addCliOption( "-Dmaven.experimental.buildconsumer=true" ); @@ -96,6 +97,7 @@ public class MavenITmng6090CIFriendlyTest verifier = newVerifier( testDir.getAbsolutePath(), false ); verifier.setMavenDebug( false ); verifier.setAutoclean( false ); + verifier.setForkJvm(true); verifier.addCliOption( "-Drevision=1.2" ); verifier.addCliOption( "-pl module-3" ); 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 index 6086e5c..0a7c654 100644 --- 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 @@ -76,15 +76,19 @@ public class MavenITmng6656BuildConsumer String content; content = FileUtils.fileRead( new File( testDir, "expected/parent.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6656-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-parent.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6656-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-weather.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6656-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-webapp.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6656-SNAPSHOT", "pom", content ); } 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 index 6486d45..a1e8ce5 100644 --- 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 @@ -76,21 +76,27 @@ public class MavenITmng6957BuildConsumer String content; content = FileUtils.fileRead( new File( testDir, "expected/parent.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6957-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-parent.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6957-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-weather.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6957-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-webapp.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6957-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/simple-testutils.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-testutils", "0.9-MNG6957-SNAPSHOT", "pom", content ); content = FileUtils.fileRead( new File( testDir, "expected/utils-parent.pom") ); + content = content.replaceAll( "\r\n", "\n" ).replaceAll( "\n", System.lineSeparator() ); verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "utils-parent", "0.9-MNG6957-SNAPSHOT", "pom", content ); } 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 index 53a7d3d..46447bf 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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"> +--> + +<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> @@ -25,4 +29,4 @@ under the License. <!-- Optimized from https://github.com/sonatype/maven-example-en/tree/master/examples/ch-multi --> -</project> \ No newline at end of file +</project> 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 index 8a92423..b726198 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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"> +--> + +<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> @@ -39,4 +43,4 @@ under the License. </pluginManagement> </build> -</project> \ No newline at end of file +</project> 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 index 10570e3..970ec47 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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"> +--> + +<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> @@ -27,4 +31,4 @@ under the License. <name>Multi Chapter Simple Weather API</name> -</project> \ No newline at end of file +</project> 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 index 7371207..c7977a6 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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"> +--> + +<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> @@ -44,4 +48,4 @@ under the License. </plugins> </pluginManagement> </build> -</project> \ No newline at end of file +</project> 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 index bfe5879..9291614 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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/xsd/maven-4.0.0.xsd"> +--> + +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.sonatype.mavenbook.multi</groupId> <artifactId>parent</artifactId> @@ -25,4 +29,4 @@ under the License. <!-- Optimized from https://github.com/sonatype/maven-example-en/tree/master/examples/ch-multi --> -</project> \ No newline at end of file +</project> 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 index 69c705e..cad5dee 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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/xsd/maven-4.0.0.xsd"> +--> + +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.sonatype.mavenbook.multi</groupId> @@ -40,4 +44,4 @@ under the License. </pluginManagement> </build> -</project> \ No newline at end of file +</project> 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 index ce7a73c..05580dc 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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/xsd/maven-4.0.0.xsd"> +--> + +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.sonatype.mavenbook.multi</groupId> @@ -23,4 +27,4 @@ under the License. <version>0.9-MNG6957-SNAPSHOT</version> </parent> <artifactId>simple-testutils</artifactId> -</project> \ No newline at end of file +</project> 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 index 9d75f1d..43bfc9c 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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/xsd/maven-4.0.0.xsd"> +--> + +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.sonatype.mavenbook.multi</groupId> @@ -36,4 +40,4 @@ under the License. </dependency> </dependencies> -</project> \ No newline at end of file +</project> 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 index dd8e443..edde31a 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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/xsd/maven-4.0.0.xsd"> +--> + +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.sonatype.mavenbook.multi</groupId> @@ -44,4 +48,4 @@ under the License. </plugins> </pluginManagement> </build> -</project> \ No newline at end of file +</project> 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 index 29064fd..a7fedb6 100644 --- 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 @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- +<?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 @@ -15,7 +17,9 @@ software distributed under the License is distributed on an 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/xsd/maven-4.0.0.xsd"> +--> + +<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.sonatype.mavenbook.multi</groupId> @@ -24,4 +28,4 @@ under the License. </parent> <artifactId>utils-parent</artifactId> <packaging>pom</packaging> -</project> \ No newline at end of file +</project>
