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
40
41 public class FlatMultiModuleMavenProjectStub
42 extends org.apache.maven.plugin.testing.stubs.MavenProjectStub
43 {
44 public void setDistributionManagement( DistributionManagement distributionManagement )
45 {
46 getModel().setDistributionManagement( distributionManagement );
47 }
48
49 public Model getModel()
50 {
51 Model model = super.getModel();
52 if ( model == null )
53 {
54 model = new Model();
55 setModel( model );
56 }
57 return model;
58 }
59
60 public DistributionManagement getDistributionManagement()
61 {
62 return getModel().getDistributionManagement();
63 }
64
65 public List<String> getModules()
66 {
67 List<String> modules = new ArrayList<String>();
68 modules.add( "../core" );
69 modules.add( "../webapp" );
70 modules.add( "../commons" );
71
72 return modules;
73 }
74
75 public File getBasedir()
76 {
77 return new File( "/flat-multi-module/root-project" ).getAbsoluteFile();
78 }
79
80 public Scm getScm()
81 {
82 Scm scm = new Scm();
83 scm.setConnection( "scm:svn:file://localhost/target/svnroot/flat-multi-module/trunk/root-project" );
84
85 return scm;
86 }
87
88 @Override
89 public String getGroupId()
90 {
91 return "GROUPID";
92 }
93
94 @Override
95 public String getArtifactId()
96 {
97 return "ARTIFACTID";
98 }
99
100 @Override
101 public String getVersion()
102 {
103 return "VERSION";
104 }
105 }