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 org.apache.maven.it.util.ResourceExtractor;
23
24 import java.io.File;
25
26 public class MavenIT0021PomProfileTest
27 extends AbstractMavenIntegrationTestCase
28 {
29 public MavenIT0021PomProfileTest()
30 {
31 super( ALL_MAVEN_VERSIONS );
32 }
33
34
35
36
37
38
39
40 public void testit0021()
41 throws Exception
42 {
43 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0021" );
44
45 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
46 verifier.setAutoclean( false );
47 verifier.deleteArtifacts( "org.apache.maven.its.it0021" );
48 verifier.getSystemProperties().setProperty( "includeProfile", "true" );
49 verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
50 verifier.addCliOption( "--settings" );
51 verifier.addCliOption( "settings.xml" );
52 verifier.addCliOption( "-Pprofile-2" );
53 verifier.executeGoal( "validate" );
54 verifier.verifyErrorFreeLog();
55 verifier.resetStreams();
56
57 verifier.assertArtifactPresent( "org.apache.maven.its.it0021", "a", "0.1", "jar" );
58 verifier.assertArtifactPresent( "org.apache.maven.its.it0021", "b", "0.1", "jar" );
59 }
60
61 }