[jsword-devel] GPL and JSword

DM Smith dmsmith555 at yahoo.com
Sat May 7 13:08:21 MST 2005


Bet that got your attention!

Nothing radical, nothing to start a long thread;)

I would like to suggest that we change where we put the license notice 
in the source.

Right now the GPL license notice is in the type's javadoc. I would like 
to recommend that we move it to be a file comment, preceding the package 
declaration. I don't know that this is a standard, but it is fairly 
typical of java code. Also, there is direct support for it in Eclipse 
(more on that below) and CheckStyle can be made to check that it is at 
the top and is unchanged.

The difference is that it would not show up in the javadoc for each 
class. I do recommend that we add it to each package's javadoc 
(package.html)

The following settings in eclipse (using 3.1M6 for the example) will 
enable a package comment:
Window->Preferences->Java->Code Style->Code Templates->Comments->Files 
to set the package comment.
Window->Preferences->Java->Code Style->Code Templates->Code->New Java 
Files to put it at the top of the file.
Window->Preferences->Java->Code Style->Code Templates->Comments->Types 
to remove it from the class .

For the first I recommend: (There is no change to the text other than 
formatting.)
/**
 * Distribution License:
 * JSword 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.
 *
 * The License is available on the internet at:
 *      http://www.gnu.org/copyleft/gpl.html
 * or by writing to:
 *      Free Software Foundation, Inc.
 *      59 Temple Place - Suite 330
 *      Boston, MA 02111-1307, USA
 *
 * Copyright: ${year}
 *     The copyright to this program is held by it's authors.
 *
 * ID: $$ID$$
 */

For the second I recommend: (filecomment is the name of the variable set 
above)
${filecomment}
${package_declaration}

${typecomment}
${type_declaration}

For the third I recommend: (replace my author string with yours)
/**
 *
 * @see gnu.gpl.License for license details.
 *      The copyright to this program is held by it's authors.
 * @author DM Smith [ dmsmith555 at yahoo dot com]
 */
I would like to figure out how to modify ${user} or create my own 
template variable, ${author}, to use with @author



More information about the jsword-devel mailing list