Personal tools
gvSIG Desktop
gvSIG Desktop

Cached time 11/22/13 08:21:03 Clear cache and reload

 
Document Actions

Cabeceras

by Cèsar Ordiñana last modified 2012-03-22 09:51

Cabeceras de código fuente y otros archivos

En todos los archivos de código fuente java del proyecto se incluirán la siguiente cabecera:

.. code-block:: java
    
    /**
     * gvSIG. Desktop Geographic Information System.
     *
     * Copyright © 2007-2012 gvSIG Association
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * as published by the Free Software Foundation; either version 2
     * of the License, or (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
     * MA  02110-1301, USA.
     *  
     * For any additional information, do not hesitate to contact us 
     * at info AT gvsig.com, or visit our website www.gvsig.com.
     */


En archivos de código fuente de otros lenguajes (C, C++, etc.), así como otros archivos de configuración o definición (XML, properties, etc.) se incluirá también la cabecera anterior, empleando el formato correspondiente de comentario.

Esta cabecera ha sido definida en la configuración de *Code Templates* de eclipse para que sea incluida por defecto cuando se crea un nuevo archivo.

Para actualizar archivos existentes sin cabecera o con la cabecera antigua, se ha configurado de base en el proyecto a partir de gvSIG 2.0 el plugin de maven `maven-license-plugin `_. Dicha configuración está disponible en el archivo `pom.xml `_ del proyecto *org.gvsig.maven.base.pom*. Para actualizar o incluir la cabecera anterior de forma automática, basta con lanzar la siguiente órden::

  mvn license:format

Hay que tener en cuenta que la orden anterior modificará las cabeceras a todos los tipos de archivos soportados por el plugin. Si alguno no es correcto o no está mapeado se puede añadir de forma sencilla.

También podemos validar si las cabeceras de nuestros archivos son correctas mediante la orden::

  mvn license:check

View source document

View source document Get permanent link


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: