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.List;
26
27 public class MavenITmng5214DontMapWsdlToJar
28 extends AbstractMavenIntegrationTestCase
29 {
30 public MavenITmng5214DontMapWsdlToJar()
31 {
32 super( "[3.1,)" );
33 }
34
35
36
37
38
39
40
41 public void testitTestPhase()
42 throws Exception
43 {
44 File setupDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5214/dependency" );
45
46 Verifier setupVerifier = newVerifier( setupDir.getAbsolutePath() );
47 setupVerifier.setAutoclean( false );
48 setupVerifier.setMavenDebug( true );
49 setupVerifier.deleteDirectory( "target" );
50 setupVerifier.deleteArtifacts( "org.apache.maven.its.mng5214" );
51 setupVerifier.setLogFileName( "log-setup.txt" );
52 setupVerifier.addCliOption( "-PcreateWsdl" );
53 setupVerifier.executeGoal( "generate-resources" );
54
55 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5214" );
56
57 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
58 verifier.setAutoclean( false );
59 verifier.deleteDirectory( "consumer/target" );
60 verifier.deleteDirectory( "dependency/target" );
61 verifier.setLogFileName( "log-test.txt" );
62 verifier.executeGoal( "test" );
63 verifier.verifyErrorFreeLog();
64 List<String> lines = verifier.loadFile( verifier.getBasedir(), verifier.getLogFileName(), false );
65
66
67 for ( String line : lines )
68 {
69 if ( line.contains( "RESOLVE-ONE-DEPENDENCY org.apache.maven.its.mng5214:dependency:wsdl:1.0-SNAPSHOT" ) )
70 {
71 assertFalse( line.contains( "classes-main" ) );
72 assertTrue( line.endsWith( ".wsdl" ) );
73 }
74 }
75 }
76 }