Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.maven / src / main / java / org / gvsig / installer / maven / GeneratePluginPackageSetMojo.java @ 37599

History | View | Annotate | Download (2.27 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 installation bundle of
34
 * a gvSIG plugin.
35
 * <p>
36
 * 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"
37
 * >gvSIG plugin naming standard</a> for information about installers naming and
38
 * versioning.
39
 * </p>
40
 * 
41
 * @see InstallerManager
42
 * 
43
 * @author gvSIG Team
44
 * @version $Id$
45
 * 
46
 * @goal create-package-set
47
 */
48
public class GeneratePluginPackageSetMojo extends AbstractGeneratePackageMojo {
49

    
50
        @Override
51
        protected void createPackage(MakePluginPackageService makePluginService,
52
                        PackageInfo info, OutputStream os)
53
                        throws MakePluginPackageServiceException {
54
                makePluginService.createPackageSet(info, os);
55
        }
56

    
57
        @Override
58
        protected String getPackageTypeName() {
59
                return "Package Set";
60
        }
61

    
62
        @Override
63
        protected String getPackageFileName(PackageInfo info) {
64
                return InstallerLocator.getInstallerManager().getPackageSetFileName(
65
                                info);
66
        }
67
}