1 /**
2 * The MIT License
3 *
4 * Copyright 2006-2012 The Codehaus.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 * this software and associated documentation files (the "Software"), to deal in
8 * the Software without restriction, including without limitation the rights to
9 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 * of the Software, and to permit persons to whom the Software is furnished to do
11 * so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24 package org.codehaus.mojo.appassembler;
25
26 import java.io.File;
27 import java.util.List;
28 import java.util.Set;
29
30 /**
31 * @author <a href="mailto:kristian.nordal@gmail.com">Kristian Nordal</a>
32 * @version $Id: Program.java 16492 2012-04-29 18:26:21Z khmarbaise $
33 * @deprecated Use generate-daemons instead
34 */
35 public class Program
36 {
37 private String name;
38
39 private String mainClass;
40
41 /**
42 * Extra arguments which will be given the Main Class as arguments verbatim.
43 *
44 * @parameter
45 */
46 private List commandLineArguments;
47
48 /**
49 * The License header which can be used instead of the default header.
50 *
51 * @parameter
52 * @since 1.2
53 */
54 private File licenseHeaderFile;
55
56 /**
57 * Define the name of binary folder.
58 *
59 * @parameter default-value="bin"
60 * @since 1.2
61 */
62 private File binFolder;
63
64 /**
65 * JvmSettings for every program.
66 *
67 * @parameter
68 * @since 1.2
69 */
70 private org.codehaus.mojo.appassembler.model.JvmSettings jvmSettings;
71
72 /**
73 * The platforms the plugin will generate bin files for.
74 * Configure with string values - "all"(default/empty) | "windows" | "unix".
75 *
76 * @parameter
77 */
78 private Set platforms;
79
80 /**
81 * The default constructor.
82 */
83 public Program ( )
84 {
85 }
86
87 /**
88 * The constructor.
89 *
90 * @param name
91 * The name of the program.
92 * @param mainClass
93 * The main class of the program.
94 */
95 public Program ( String name, String mainClass )
96 {
97 this.name = name;
98 this.mainClass = mainClass;
99 }
100
101 /**
102 * The name.
103 *
104 * @return The name of the program.
105 */
106 public String getName ()
107 {
108 return name;
109 }
110
111 /**
112 * Set the name.
113 *
114 * @param name
115 * The name of the program.
116 */
117 public void setName ( String name )
118 {
119 this.name = name;
120 }
121
122 /**
123 * Get the main class.
124 *
125 * @return The name of the main class.
126 */
127 public String getMainClass ()
128 {
129 return mainClass;
130 }
131
132 /**
133 * Set the main class.
134 *
135 * @param mainClass
136 * The name of the main class.
137 */
138 public void setMainClass ( String mainClass )
139 {
140 this.mainClass = mainClass;
141 }
142
143 /**
144 * The platforms.
145 *
146 * @return The set of platforms.
147 */
148 public Set getPlatforms ()
149 {
150 return platforms;
151 }
152
153 /**
154 * The platforms.
155 *
156 * @param platforms
157 * The set with the platforms.
158 */
159 public void setPlatforms ( Set platforms )
160 {
161 this.platforms = platforms;
162 }
163
164 /**
165 * Get the command line arguments.
166 *
167 * @return The list of command line arguments.
168 */
169 public List getCommandLineArguments ()
170 {
171 return this.commandLineArguments;
172 }
173
174 /**
175 * Set the argument list.
176 *
177 * @param arguments
178 * The list of command line arguments.
179 */
180 public void setCommandLineArguments ( List arguments )
181 {
182 this.commandLineArguments = arguments;
183 }
184
185 /**
186 * Add an command line arguments.
187 *
188 * @param argument
189 * The argument which will be aded to list of arguments.
190 */
191 public void addCommandLineArgument ( String argument )
192 {
193 this.commandLineArguments.add ( argument );
194 }
195
196 /**
197 * Get the JVM settings.
198 *
199 * @return An instance of the JVM settings.
200 * @see JvmSettings
201 */
202 public org.codehaus.mojo.appassembler.model.JvmSettings getJvmSettings ()
203 {
204 return jvmSettings;
205 }
206
207 /**
208 * Set the JVM settings.
209 *
210 * @param jvmSettings
211 * The instance of the JVM settings which will be used.
212 */
213 public void setJvmSettings ( org.codehaus.mojo.appassembler.model.JvmSettings jvmSettings )
214 {
215 this.jvmSettings = jvmSettings;
216 }
217
218 /**
219 * Get the current license header file which is used.
220 *
221 * @return The file instance of the header file.
222 */
223 public File getLicenseHeaderFile ()
224 {
225 return licenseHeaderFile;
226 }
227
228 /**
229 * Set the license header file.
230 *
231 * @param licenseHeaderFile
232 * The File instance.
233 */
234 public void setLicenseHeaderFile ( File licenseHeaderFile )
235 {
236 this.licenseHeaderFile = licenseHeaderFile;
237 }
238
239 /**
240 * The bin folder.
241 *
242 * @return The bin folder.
243 */
244 public File getBinFolder ()
245 {
246 return binFolder;
247 }
248
249 /**
250 * Set the bin folder.
251 *
252 * @param binFolder
253 * The new bin folder name.
254 */
255 public void setBinFolder ( File binFolder )
256 {
257 this.binFolder = binFolder;
258 }
259
260 }