Skip to end of metadata
Go to start of metadata

Licenses

LAMS is released under the GPL license version 2.0, therefore any third party libraries we use must be compatible with the license.

License and Copyright Statement

All of our source code should have the following comment at the top. Note: when you are including multiple files into one file you don't need to include it in every subfile. e.g. when building a jsp using Tiles or a web.xml via webdoclet. We do not want our jsp files getting huge just due to the copyright statement.

Code Comment:

License Statement
Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
License Information: http://lamsfoundation.org/licensing/lams/2.0/

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2 as
  published by the Free Software Foundation.

  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

  http://www.gnu.org/licenses/gpl.txt

CVS Id Keyword

In a similar manner, we aim to put the CVS $Id$ keyword at the top of our files. This expands to include the CVS version of the file and the user who submitted the file. This makes it easier to track changes to files that maybe done "outside" of the usual CVS process.

The keyword must appear at the top of all language properties files and sql scripts. These files may be sent as a batch of files to people to work on them and it makes it easier to manually check the changes when files are returned to the LAMS development team.

Code Templates

Set up your IDE to automatically insert the license and id entries in source files where possible.

In Eclipse, new Java files can be set up to include the text by going to Preferences -> Java -> Code Style -> Code Templates and pasting the following in the Code -> New Java files pattern.

Java Classes
/****************************************************************
 * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
 * =============================================================
 * License Information: http://lamsfoundation.org/licensing/lams/2.0/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2.0
 * as published by the Free Software Foundation.
 *
 * 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
 *
 * http://www.gnu.org/licenses/gpl.txt
 * ****************************************************************
 */

/* $$Id$$ */
${package_declaration}

${typecomment}
${type_declaration}
SQL
-- Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
-- =============================================================
-- License Information: http://lamsfoundation.org/licensing/lams/2.0/
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License version 2.0 as
-- published by the Free Software Foundation.
--
-- 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
--
-- http://www.gnu.org/licenses/gpl.txt
-- ****************************************************************
--
-- $Id$
Language Properties
# Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
# =============================================================
# License Information: http://lamsfoundation.org/licensing/lams/2.0/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.0 as published by
# the Free Software Foundation.
#
# 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
#
# http://www.gnu.org/licenses/gpl.txt
#
# $Id$
JSP
<%--
Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
License Information: http://lamsfoundation.org/licensing/lams/2.0/

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2 as
  published by the Free Software Foundation.

  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

  http://www.gnu.org/licenses/gpl.txt
--%>
HTML and XML
<!--
Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
License Information: http://lamsfoundation.org/licensing/lams/2.0/

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2 as
  published by the Free Software Foundation.

  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

  http://www.gnu.org/licenses/gpl.txt
-->

Eclipse and CVS Keyword Expansion.

For CVS to expand out the $Id$ keyword, text/ASCII files should be set to be either "-kkv". If it doesn't have the "v", then the keyword won't expand. It is not usual to turn on the keyword expansion for binary files in case the $Id$ happens to occur for other reasons in the file.

In Eclipse text files default to "-kk". To change the mode of the files, click on a file or a folder and select "Team -> Change ASCII/Binary Property" from the popup menu. Change text files to "ASCII with keyword expansion (-kkv)". It is not possible to change binary files to support keyword expansion.

Only files that really are binary should be set to binary. For example, a swf file, a gif file or a jar file should be set to binary. A SQL file should be a text file. If a text file has accidently been put in as binary file then it should be possible to change the mode using "Team -> Change ASCII/Binary Property" option.

  • No labels