svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.maven / src / main / java / org / gvsig / installer / maven / GeneratePluginPackageMojo.java @ 34005
History | View | Annotate | Download (2.3 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.installer.maven; |
23 |
|
24 |
import java.io.OutputStream; |
25 |
|
26 |
import org.gvsig.installer.lib.api.InstallerLocator; |
27 |
import org.gvsig.installer.lib.api.InstallerManager; |
28 |
import org.gvsig.installer.lib.api.PackageInfo; |
29 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageService; |
30 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
31 |
|
32 |
/**
|
33 |
* Maven mojo to launch the gvSIG installer to generate a package of a gvSIG
|
34 |
* plugin.
|
35 |
* <p>
|
36 |
* Look at the <a href=
|
37 |
* "http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/gvsig-devel-guide/2.0.0/anexos/proyectos-oficiales-en-gvsig/nombrado-de-binarios-para-un-plugin-de-gvsig"
|
38 |
* >gvSIG plugin naming standard</a> for information about installers naming and
|
39 |
* versioning.
|
40 |
* </p>
|
41 |
*
|
42 |
* @see InstallerManager
|
43 |
*
|
44 |
* @author gvSIG Team
|
45 |
* @version $Id$
|
46 |
*
|
47 |
* @goal create-package
|
48 |
*/
|
49 |
public class GeneratePluginPackageMojo extends AbstractGeneratePackageMojo { |
50 |
|
51 |
@Override
|
52 |
protected void createPackage(MakePluginPackageService makePluginService, |
53 |
PackageInfo info, OutputStream os)
|
54 |
throws MakePluginPackageServiceException {
|
55 |
makePluginService.createPackage(info, os); |
56 |
} |
57 |
|
58 |
@Override
|
59 |
protected String getPackageTypeName() { |
60 |
return "Package"; |
61 |
} |
62 |
|
63 |
@Override
|
64 |
protected String getPackageFileName(PackageInfo info) { |
65 |
return InstallerLocator.getInstallerManager().getPackageFileName(info);
|
66 |
} |
67 |
} |