Revision 33698 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.maven/src/main/java/org/gvsig/installer/maven/GenerateInstallerMojo.java
GenerateInstallerMojo.java | ||
---|---|---|
55 | 55 |
* @author gvSIG Team |
56 | 56 |
* @version $Id$ |
57 | 57 |
* |
58 |
* @goal generate-installer
|
|
58 |
* @goal create-installer
|
|
59 | 59 |
* |
60 | 60 |
* @phase install |
61 | 61 |
*/ |
... | ... | |
103 | 103 |
private String packaging; |
104 | 104 |
|
105 | 105 |
/** |
106 |
* Plugin project name. |
|
107 |
* |
|
108 |
* @parameter expression="${project.name}" |
|
109 |
* @required |
|
110 |
*/ |
|
111 |
private String name; |
|
112 |
|
|
113 |
/** |
|
114 |
* Plugin project description. |
|
115 |
* |
|
116 |
* @parameter expression="${project.description}" |
|
117 |
* @required |
|
118 |
*/ |
|
119 |
private String description; |
|
120 |
|
|
121 |
/** |
|
122 |
* Plugin project version. |
|
123 |
* |
|
124 |
* @parameter expression="${project.version}" |
|
125 |
* @required |
|
126 |
*/ |
|
127 |
private String version; |
|
128 |
|
|
129 |
/** |
|
130 |
* Plugin build number. |
|
131 |
* |
|
132 |
* @parameter |
|
133 |
* @required |
|
134 |
*/ |
|
135 |
private int buildNumber; |
|
136 |
|
|
137 |
/** |
|
138 |
* Plugin state. |
|
139 |
* One of: devel, pilot, prototype, alpha[num], beta[num], RC[num], final. |
|
140 |
* |
|
141 |
* Defaults to "devel". |
|
142 |
* |
|
143 |
* @parameter |
|
144 |
*/ |
|
145 |
private String state; |
|
146 |
|
|
147 |
/** |
|
148 |
* If the plugin is a gvSIG official one. |
|
149 |
* |
|
150 |
* @parameter |
|
151 |
* @required |
|
152 |
*/ |
|
153 |
private boolean official; |
|
154 |
|
|
155 |
/** |
|
156 |
* The supported operating system. |
|
157 |
* Examples: lin (linux), win (windows), osx_10_4, osx_10_5, osx_10_6. |
|
158 |
* |
|
159 |
* Defaults to all. |
|
160 |
* |
|
161 |
* @parameter |
|
162 |
*/ |
|
163 |
private String operatingSystem; |
|
164 |
|
|
165 |
/** |
|
166 |
* The supported architecture. |
|
167 |
* Examples: x86 (32 bits), x86_64 (64 bits). |
|
168 |
* |
|
169 |
* Defaults to all. |
|
170 |
* |
|
171 |
* @parameter |
|
172 |
*/ |
|
173 |
private String architecture; |
|
174 |
|
|
175 |
/** |
|
176 |
* Minimum Java VM version supported. |
|
177 |
* Example: j1_5, j1_6. |
|
178 |
* |
|
179 |
* Defaults to j1_5. |
|
180 |
* |
|
181 |
* @parameter |
|
182 |
*/ |
|
183 |
private String javaVM; |
|
184 |
|
|
185 |
/** |
|
186 |
* The minimum gvSIG version supported. |
|
187 |
* |
|
188 |
* @parameter |
|
189 |
* @required |
|
190 |
*/ |
|
191 |
private String gvSIGVersion; |
|
192 |
|
|
193 |
/** |
|
194 |
* Installabe type. Only <strong>plugin</strong> is supported. |
|
195 |
* |
|
196 |
* @parameter default="${plugin}" |
|
197 |
*/ |
|
198 |
private String installableType = "plugin"; |
|
199 |
|
|
200 |
/** |
|
201 | 106 |
* If the mojo execution is disabled. Useful for projects that inherit |
202 | 107 |
* the maven plugin configuration but don't generate installer. |
203 | 108 |
* |
... | ... | |
222 | 127 |
|
223 | 128 |
log.info("Generating a installable for the plugin: " + artifactId |
224 | 129 |
+ " with the following information:"); |
225 |
log.info("\tPlugin name: " + name); |
|
226 |
log.info("\tPlugin description: " + description); |
|
227 |
log.info("\tPlugin version: " + version); |
|
228 |
log.info("\tPlugin build number: " + buildNumber); |
|
229 |
log.info("\tPlugin state: " + state); |
|
230 |
log.info("\tPlugin official: " + official); |
|
231 |
log.info("\tPlugin operatingSystem: " + operatingSystem); |
|
232 |
log.info("\tPlugin architecture: " + architecture); |
|
233 |
log.info("\tPlugin javaVM: " + javaVM); |
|
234 |
log.info("\tPlugin gvSIGVersion: " + gvSIGVersion); |
|
235 | 130 |
log.info("\tgvSIG Plugin's folder: " + pluginsFolder); |
236 | 131 |
log.info("\tBundle installation file to create: " + bundleFolder); |
237 | 132 |
|
... | ... | |
249 | 144 |
PackageInfo info = |
250 | 145 |
makePluginService.getPluginPackageInfo(artifactId); |
251 | 146 |
|
252 |
info.setBuild(buildNumber); |
|
253 |
// info.setCode(artifactId); |
|
254 |
info.setDescription(description); |
|
255 |
info.setName(name); |
|
256 |
info.setOfficial(official); |
|
257 |
info.setState(state); |
|
258 |
info.setType(installableType); |
|
259 |
info.setVersion(version); |
|
260 |
info.setOperatingSystem(operatingSystem); |
|
261 |
info.setArchitecture(architecture); |
|
262 |
info.setJavaVM(javaVM); |
|
263 |
info.setGvSIGVersion(gvSIGVersion); |
|
264 |
|
|
265 | 147 |
// Create the package bundle file |
266 | 148 |
String packageBundleFileName = |
267 | 149 |
bundleFileName == null ? manager.getPackageBundleFileName(info) |
Also available in: Unified diff