1 package org.apache.maven.plugins.javadoc.stubs;
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.model.Build;
23 import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
24
25 import java.io.File;
26 import java.util.ArrayList;
27 import java.util.List;
28
29
30
31
32
33 public class WrongEncodingOptionsTestMavenProjectStub extends MavenProjectStub
34 {
35 public WrongEncodingOptionsTestMavenProjectStub()
36 {
37 readModel( new File( getBasedir(), "wrong-encoding-test-plugin-config.xml" ) );
38
39 setGroupId( getModel().getGroupId() );
40 setArtifactId( getModel().getArtifactId() );
41 setVersion( getModel().getVersion() );
42 setName( getModel().getName() );
43 setUrl( getModel().getUrl() );
44 setPackaging( getModel().getPackaging() );
45
46 Build build = new Build();
47 build.setFinalName( getModel().getArtifactId() );
48 build.setSourceDirectory( getBasedir() + "/src/main/java" );
49 build.setDirectory( super.getBasedir() + "/target/test/unit/validate-options-test/target" );
50 setBuild( build );
51
52 List<String> compileSourceRoots = new ArrayList<>();
53 compileSourceRoots.add( getBasedir() + "/src/main/java" );
54 setCompileSourceRoots( compileSourceRoots );
55 }
56
57
58 @Override
59 public File getBasedir()
60 {
61 return new File( super.getBasedir() + "/src/test/resources/unit/validate-options-test" );
62 }
63 }