1 package org.apache.its;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import static org.apache.its.util.TestUtils.archivePathFromChild;
23 import static org.apache.its.util.TestUtils.archivePathFromProject;
24 import static org.apache.its.util.TestUtils.assertZipContents;
25 import static org.apache.its.util.TestUtils.getTestDir;
26
27 import org.apache.maven.it.VerificationException;
28 import org.apache.maven.it.Verifier;
29 import org.junit.Test;
30
31 import java.io.File;
32 import java.io.IOException;
33 import java.net.URISyntaxException;
34 import java.util.Collections;
35 import java.util.HashSet;
36 import java.util.Set;
37
38 public class IT_005_MiscellaneousExcludes
39 {
40
41 private static final String BASENAME = "misc-excludes";
42 private static final String VERSION = "1";
43
44 @Test
45 public void execute()
46 throws VerificationException, IOException, URISyntaxException
47 {
48 File testDir = getTestDir( BASENAME );
49
50 Verifier verifier = new Verifier( testDir.getAbsolutePath() );
51
52 verifier.executeGoal( "package" );
53
54 verifier.verifyErrorFreeLog();
55 verifier.resetStreams();
56
57 File assembly = new File( testDir, "target/" + BASENAME + "-" + VERSION + "-source-release.zip" );
58
59 Set<String> required = Collections.emptySet();
60
61 Set<String> banned = new HashSet<String>();
62
63 banned.add( archivePathFromProject( BASENAME, VERSION, "/cobertura.ser" ) );
64 banned.add( archivePathFromProject( BASENAME, VERSION, "/release.properties" ) );
65 banned.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml.releaseBackup" ) );
66
67 banned.add( archivePathFromChild( BASENAME, VERSION, "child2", "/cobertura.ser" ) );
68
69 assertZipContents( required, banned, assembly );
70 }
71
72 }