You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/06/19 10:58:04 UTC
[maven-integration-testing] branch MNG-6656 updated: [MNG-6656]
Improve test
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MNG-6656
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
The following commit(s) were added to refs/heads/MNG-6656 by this push:
new 168d410 [MNG-6656] Improve test
168d410 is described below
commit 168d410ebe0814057332d1fded32b6a7bc6538f5
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Jun 19 12:57:54 2020 +0200
[MNG-6656] Improve test
---
.../maven/it/MavenITmng6656BuildConsumer.java | 34 +++++++++-------------
.../mng-6656-buildconsumer/expected/parent.pom | 2 ++
.../test/resources/mng-6656-buildconsumer/pom.xml | 2 ++
3 files changed, 18 insertions(+), 20 deletions(-)
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 13306c1..b39ac57 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
@@ -51,20 +51,16 @@ public class MavenITmng6656BuildConsumer
super( "[3.7.0,)" );
}
- public void testValidOmittedVersions()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6656-buildconsumer" );
-
- Verifier verifier = newVerifier( testDir.getAbsolutePath(), false );
- verifier.setMavenDebug( false );
- verifier.setAutoclean( false );
- verifier.addCliOption( "-Dchangelist=JIRA101" );
-
- verifier.executeGoals( Arrays.asList( "validate" ) );
- verifier.verifyErrorFreeLog();
- }
-
+ /**
+ * 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
{
@@ -78,19 +74,17 @@ public class MavenITmng6656BuildConsumer
verifier.executeGoals( Arrays.asList( "install" ) );
verifier.verifyErrorFreeLog();
- // use original resource files to ensure correct EOLs
- File resourcesDir = new File( "src/test/resources/mng-6656-buildconsumer" );
String content;
- content = FileUtils.fileRead( new File( resourcesDir, "expected/parent.pom") );
+ content = FileUtils.fileRead( new File( testDir, "expected/parent.pom") );
verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "parent", "0.9-MNG6656-SNAPSHOT", "pom", content );
- content = FileUtils.fileRead( new File( resourcesDir, "expected/simple-parent.pom") );
+ content = FileUtils.fileRead( new File( testDir, "expected/simple-parent.pom") );
verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-parent", "0.9-MNG6656-SNAPSHOT", "pom", content );
- content = FileUtils.fileRead( new File( resourcesDir, "expected/simple-weather.pom") );
+ content = FileUtils.fileRead( new File( testDir, "expected/simple-weather.pom") );
verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-weather", "0.9-MNG6656-SNAPSHOT", "pom", content );
- content = FileUtils.fileRead( new File( resourcesDir, "expected/simple-webapp.pom") );
+ content = FileUtils.fileRead( new File( testDir, "expected/simple-webapp.pom") );
verifier.assertArtifactContents( "org.sonatype.mavenbook.multi", "simple-webapp", "0.9-MNG6656-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 5d81426..53a7d3d 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
@@ -22,5 +22,7 @@ under the License.
<version>0.9-MNG6656-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-6656-buildconsumer/pom.xml b/core-it-suite/src/test/resources/mng-6656-buildconsumer/pom.xml
index f41ed6a..1455523 100644
--- a/core-it-suite/src/test/resources/mng-6656-buildconsumer/pom.xml
+++ b/core-it-suite/src/test/resources/mng-6656-buildconsumer/pom.xml
@@ -28,6 +28,8 @@ under the License.
<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>