From f715b1080684c09eb6d51ccb1062d6e6ba52477c Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sat, 16 Jun 2018 01:37:21 +0200 Subject: [PATCH] [MNG-6428] IT for MNG-5958 fails on Java 9+ --- .../it/MavenITmng5958LifecyclePhaseBinaryCompat.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java index 3ee3fe10f8..add814d0e0 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java @@ -17,19 +17,19 @@ public class MavenITmng5958LifecyclePhaseBinaryCompat throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5958-lifecycle-phases/good" ); - + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); verifier.verifyTextInLog( "CLASS_NAME=java.lang.String" ); verifier.resetStreams(); } - + public void testBad() throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5958-lifecycle-phases/bad" ); - + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); try { @@ -37,8 +37,10 @@ public class MavenITmng5958LifecyclePhaseBinaryCompat } catch ( VerificationException e ) { + // TODO There is no good way to test for Java 9+ in Verifier in order to add 'java.base/' + // to the string. verifier.verifyTextInLog( "[ERROR] Internal error: java.lang.ClassCastException: " - + "org.apache.maven.lifecycle.mapping.LifecyclePhase cannot be cast to java.lang.String -> [Help 1]" ); + + "org.apache.maven.lifecycle.mapping.LifecyclePhase cannot be cast to " ); } verifier.resetStreams(); }