1 package org.apache.maven.plugins.release.stubs;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.ArrayList;
24 import java.util.List;
25
26 import org.apache.maven.model.DistributionManagement;
27 import org.apache.maven.model.Model;
28 import org.apache.maven.model.Scm;
29
30
31
32
33
34
35
36
37
38
39 public class FlatMultiModuleMavenProjectStub
40 extends org.apache.maven.plugin.testing.stubs.MavenProjectStub
41 {
42 public void setDistributionManagement( DistributionManagement distributionManagement )
43 {
44 getModel().setDistributionManagement( distributionManagement );
45 }
46
47 public Model getModel()
48 {
49 Model model = super.getModel();
50 if ( model == null )
51 {
52 model = new Model();
53 setModel( model );
54 }
55 return model;
56 }
57
58 public DistributionManagement getDistributionManagement()
59 {
60 return getModel().getDistributionManagement();
61 }
62
63 public List<String> getModules()
64 {
65 List<String> modules = new ArrayList<String>();
66 modules.add( "../core" );
67 modules.add( "../webapp" );
68 modules.add( "../commons" );
69
70 return modules;
71 }
72
73 public File getBasedir()
74 {
75 return new File( "/flat-multi-module/root-project" );
76 }
77
78 public Scm getScm()
79 {
80 Scm scm = new Scm();
81 scm.setConnection( "scm:svn:file://localhost/target/svnroot/flat-multi-module/trunk/root-project" );
82
83 return scm;
84 }
85
86 }