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 import java.util.Properties;
26
27
28
29
30
31
32 public class MavenITmng2693SitePluginRealmTest
33 extends AbstractMavenIntegrationTestCase
34 {
35
36 public MavenITmng2693SitePluginRealmTest()
37 {
38 super( "(2.0.2,)" );
39 }
40
41
42
43
44
45
46 public void testit()
47 throws Exception
48 {
49 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2693" );
50 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
51 verifier.setAutoclean( false );
52 verifier.deleteDirectory( "target" );
53 verifier.executeGoal( "pre-site" );
54 verifier.verifyErrorFreeLog();
55 verifier.resetStreams();
56
57 Properties pclProps = verifier.loadProperties( "target/pcl.properties" );
58 assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.ClassA" ) );
59 assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.ClassB" ) );
60 assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.SomeClass" ) );
61 assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/a.properties" ) );
62 assertEquals( "1", pclProps.getProperty( "org/apache/maven/plugin/coreit/a.properties.count" ) );
63 assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/b.properties" ) );
64 assertEquals( "1", pclProps.getProperty( "org/apache/maven/plugin/coreit/b.properties.count" ) );
65 assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/it.properties" ) );
66 assertEquals( "2", pclProps.getProperty( "org/apache/maven/plugin/coreit/it.properties.count" ) );
67
68 Properties tcclProps = verifier.loadProperties( "target/tccl.properties" );
69 assertEquals( pclProps, tcclProps );
70 }
71
72 }