1 package org.apache.maven.plugin.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.plugin.testing.stubs.MavenProjectStub;
23 import org.apache.maven.model.Scm;
24 import org.apache.maven.model.Build;
25 import org.apache.maven.model.Model;
26 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
27
28 import java.util.List;
29 import java.util.ArrayList;
30 import java.io.FileReader;
31 import java.io.File;
32
33
34
35
36 public class QuotedPathMavenProjectStub
37 extends MavenProjectStub
38 {
39 private Scm scm;
40
41 private Build build;
42
43 public QuotedPathMavenProjectStub()
44 {
45 setGroupId( "quotedpath.test" );
46 setArtifactId( "quotedpath-test" );
47 setVersion( "1.0-SNAPSHOT" );
48 setName( "Maven Javadoc Plugin Quoted Path Test" );
49 setUrl( "http://maven.apache.org" );
50 setPackaging( "jar" );
51
52 Scm scm = new Scm();
53 scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
54 setScm( scm );
55
56 Build build = new Build();
57 build.setFinalName( "quotedpath-test" );
58 build.setDirectory( getBasedir() + "/target/test/unit/quotedpath'test/target" );
59 setBuild( build );
60
61 String basedir = getBasedir().getAbsolutePath();
62 List compileSourceRoots = new ArrayList();
63 compileSourceRoots.add( basedir + "/src/test/resources/unit/quotedpath'test/quotedpath/test" );
64 setCompileSourceRoots( compileSourceRoots );
65
66 MavenXpp3Reader pomReader = new MavenXpp3Reader();
67
68 try
69 {
70 Model model = pomReader.read( new FileReader( new File( getBasedir() +
71 "/src/test/resources/unit/quotedpath'test/quotedpath-test-plugin-config.xml" ) ) );
72 setModel( model );
73 }
74 catch ( Exception e )
75 {
76
77 }
78 }
79
80 public Scm getScm()
81 {
82 return scm;
83 }
84
85 public void setScm( Scm scm )
86 {
87 this.scm = scm;
88 }
89
90 public Build getBuild()
91 {
92 return build;
93 }
94
95 public void setBuild( Build build )
96 {
97 this.build = build;
98 }
99
100
101 }