svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.installer / org.gvsig.installer.maven / src / main / java / org / gvsig / installer / maven / GeneratePluginPackageMojo.java @ 40560
History | View | Annotate | Download (2.29 KB)
1 | 40560 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40560 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | 40435 | jjdelcerro | *
|
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 | 40560 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * 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 | 40560 | jjdelcerro | * For any additional information, do not hesitate to contact us
|
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | 40435 | jjdelcerro | */
|
24 | package org.gvsig.installer.maven; |
||
25 | |||
26 | import java.io.OutputStream; |
||
27 | |||
28 | import org.gvsig.installer.lib.api.InstallerLocator; |
||
29 | import org.gvsig.installer.lib.api.InstallerManager; |
||
30 | import org.gvsig.installer.lib.api.PackageInfo; |
||
31 | import org.gvsig.installer.lib.api.creation.MakePluginPackageService; |
||
32 | import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
||
33 | |||
34 | /**
|
||
35 | * Maven mojo to launch the gvSIG installer to generate a package of a gvSIG
|
||
36 | * plugin.
|
||
37 | * <p>
|
||
38 | * Look at the <a href="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"
|
||
39 | * >gvSIG plugin naming standard</a> for information about installers naming and
|
||
40 | * versioning.
|
||
41 | * </p>
|
||
42 | *
|
||
43 | * @see InstallerManager
|
||
44 | *
|
||
45 | * @author gvSIG Team
|
||
46 | * @version $Id$
|
||
47 | *
|
||
48 | * @goal create-package
|
||
49 | */
|
||
50 | public class GeneratePluginPackageMojo extends AbstractGeneratePackageMojo { |
||
51 | |||
52 | @Override
|
||
53 | protected void createPackage(MakePluginPackageService makePluginService, |
||
54 | PackageInfo info, OutputStream os)
|
||
55 | throws MakePluginPackageServiceException {
|
||
56 | makePluginService.createPackage(info, os); |
||
57 | } |
||
58 | |||
59 | @Override
|
||
60 | protected String getPackageTypeName() { |
||
61 | return "Package"; |
||
62 | } |
||
63 | |||
64 | @Override
|
||
65 | protected String getPackageFileName(PackageInfo info) { |
||
66 | return InstallerLocator.getInstallerManager().getPackageFileName(info);
|
||
67 | } |
||
68 | } |