1 package org.apache.maven.it;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23
24 import org.apache.maven.it.util.ResourceExtractor;
25
26 public class MavenITmng5561PluginRelocationLosesConfigurationTest
27 extends AbstractMavenIntegrationTestCase
28 {
29
30 public MavenITmng5561PluginRelocationLosesConfigurationTest()
31 {
32 super( "[3.8.5,)" );
33 }
34
35 public void testit()
36 throws Exception
37 {
38 File testDir =
39 ResourceExtractor.simpleExtractResources( getClass(),
40 "/mng-5561-plugin-relocation-loses-configuration" );
41 File oldPluginWithRelocationDir = new File( testDir, "old-plugin-with-relocation" );
42 File newPluginDir = new File( testDir, "new-plugin" );
43 File projectDir = new File( testDir, "project" );
44
45 Verifier verifier;
46
47 verifier = newVerifier( oldPluginWithRelocationDir.getAbsolutePath() );
48 verifier.executeGoal( "install" );
49 verifier.resetStreams();
50 verifier.verifyErrorFreeLog();
51
52 verifier = newVerifier( newPluginDir.getAbsolutePath() );
53 verifier.executeGoal( "install" );
54 verifier.resetStreams();
55 verifier.verifyErrorFreeLog();
56
57 verifier = newVerifier( projectDir.getAbsolutePath() );
58 verifier.executeGoal( "verify" );
59 verifier.resetStreams();
60 verifier.verifyErrorFreeLog();
61 verifier.verifyTextInLog( "[WARNING] Hello from Maven!" );
62 }
63 }