1 package org.apache.maven.plugins.modello;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.codehaus.modello.ModelloCli;
22
23 /**
24 * @author <a href="mailto:brett@apache.org">Brett Porter</a>
25 * @version $Id: ArtifactDeployer.java,v 1.6 2004/09/06 04:26:10 felipeal Exp $
26 */
27 public class ModelloCliWrapper
28 {
29 private String model;
30
31 private String packageWithVersion;
32
33 private String version;
34
35 private String type;
36
37 private String targetDirectory;
38
39 public void generate() throws Exception
40 {
41 ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
42 Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
43 String[] args = new String[] { this.model, this.type, this.targetDirectory, this.version, this.packageWithVersion };
44 ModelloCli.main( args );
45 Thread.currentThread().setContextClassLoader( oldClassLoader );
46 }
47
48 public String getModel()
49 {
50 return this.model;
51 }
52
53 public String getPackageWithVersion()
54 {
55 return this.packageWithVersion;
56 }
57
58 public String getVersion()
59 {
60 return this.version;
61 }
62
63 public String getType()
64 {
65 return this.type;
66 }
67
68 public String getTargetDirectory()
69 {
70 return this.targetDirectory;
71 }
72
73 public void setModel( String model )
74 {
75 this.model = model;
76 }
77
78 public void setPackageWithVersion( String packageWithVersion )
79 {
80 this.packageWithVersion = packageWithVersion;
81 }
82
83 public void setVersion( String version )
84 {
85 this.version = version;
86 }
87
88 public void setType( String type )
89 {
90 this.type = type;
91 }
92
93 public void setTargetDirectory( String targetDirectory )
94 {
95 this.targetDirectory = targetDirectory;
96 }
97 }