Author: jcouteau Date: 2010-11-17 11:11:55 +0100 (Wed, 17 Nov 2010) New Revision: 1877 Url: http://nuiton.org/repositories/revision/maven-license-plugin/1877 Log: [#1010] Add an explanation in documention on how to use a new license Added: trunk/src/site/apt/addLicense.apt trunk/src/site/fr/apt/addLicense.apt Modified: trunk/src/site/site_en.xml trunk/src/site/site_fr.xml Added: trunk/src/site/apt/addLicense.apt =================================================================== --- trunk/src/site/apt/addLicense.apt (rev 0) +++ trunk/src/site/apt/addLicense.apt 2010-11-17 10:11:55 UTC (rev 1877) @@ -0,0 +1,126 @@ +~~~ +~~ #%L +~~ Maven License Plugin +~~ +~~ $Id$ +~~ $HeadURL$ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin, Jean Couteau +~~ %% +~~ This program is free software: you can redistribute it and/or modify +~~ it under the terms of the GNU Lesser General Public License as +~~ published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. +~~ +~~ You should have received a copy of the GNU General Lesser Public +~~ License along with this program. If not, see +~~ <http://www.gnu.org/licenses/lgpl-3.0.html>. +~~ #L% +~~~ + +---- +Add a license not present in maven-license-plugin +---- + +Add a license not present in maven-license-plugin + + You might want to add a new license that is not already managed by the plugin + (common free software licenses are managed, but in case of proprietary + software (open or closed source, other license might be used). + +* Create the license files + + * src/main/licences/my_licence/header.txt + + Example for GPLv3 : + +------------------------------------------------------------------------------- + +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 3 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, see +<http://www.gnu.org/licenses/gpl-3.0.html>. + +------------------------------------------------------------------------------- + + * src/main/licences/my_licence/license.txt + + Example for GPLv3 : + +------------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + +... + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. + + +------------------------------------------------------------------------------- + +* Declare the new license + + The new license(s) must be declared in the file : + src/main/licences/licenses.properties. One license per line like : + +------------------------------------------------------------------------------- + + my_licence=My license + +------------------------------------------------------------------------------- + + +* Configure the plugin + + You need to specify the name of your license and where to find it. + +------------------------------------------------------------------------------- + +<plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <configuration> + <licenseName>my_licence</licenseName> + <licenseResolver>file://${maven.src.dir}/licenses</licenseResolver> + </configuration> + <executions> + <execution> + <id>first</id> + <goals> + <goal>update-file-header</goal> + </goals> + <phase>process-sources</phase> + </execution> + </executions> +</plugin> + +------------------------------------------------------------------------------- \ No newline at end of file Added: trunk/src/site/fr/apt/addLicense.apt =================================================================== --- trunk/src/site/fr/apt/addLicense.apt (rev 0) +++ trunk/src/site/fr/apt/addLicense.apt 2010-11-17 10:11:55 UTC (rev 1877) @@ -0,0 +1,129 @@ +~~~ +~~ #%L +~~ Maven License Plugin +~~ +~~ $Id$ +~~ $HeadURL$ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin, Jean Couteau +~~ %% +~~ This program is free software: you can redistribute it and/or modify +~~ it under the terms of the GNU Lesser General Public License as +~~ published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. +~~ +~~ You should have received a copy of the GNU General Lesser Public +~~ License along with this program. If not, see +~~ <http://www.gnu.org/licenses/lgpl-3.0.html>. +~~ #L% +~~~ + +---- +Ajouter une license non présente dans maven-license-plugin +---- + +Ajouter une license non présente dans maven-license-plugin + + Vous pouvez souhaiter ajouter une nouvelle license qui n'est pas encore gérée + par le plugin (les principales licenses libres sont gérées, mais dans le cas + de logiciels privateurs (qu'ils soient open-source ou non), d'autres licenses + peuvent être utilisées). + +* Créer les fichiers de license + + * src/main/licences/ma_licence/header.txt + + Le texte de license repris en haut de chaque fichier source. + + Exemple pour la license GPLv3 : + +------------------------------------------------------------------------------- + +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 3 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, see +<http://www.gnu.org/licenses/gpl-3.0.html>. + +------------------------------------------------------------------------------- + + * src/main/licences/ma_licence/license.txt + + Exemple pour la license GPLv3 : + +------------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + +... + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. + + +------------------------------------------------------------------------------- + +* Déclarer la nouvelle license + + La(les) nouvelle(s) license(s) doit être déclarée dans le fichier + src/main/licences/licenses.properties. Une license par ligne : + +------------------------------------------------------------------------------- + + ma_licence=Ma license + +------------------------------------------------------------------------------- + + +* Configurer le plugin + + Vous devez spécifier la license et où la trouver. + +------------------------------------------------------------------------------- + +<plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <configuration> + <licenseName>my_licence</licenseName> + <licenseResolver>file://${maven.src.dir}/licenses</licenseResolver> + </configuration> + <executions> + <execution> + <id>first</id> + <goals> + <goal>update-file-header</goal> + </goals> + <phase>process-sources</phase> + </execution> + </executions> +</plugin> + +------------------------------------------------------------------------------- \ No newline at end of file Modified: trunk/src/site/site_en.xml =================================================================== --- trunk/src/site/site_en.xml 2010-11-16 10:33:37 UTC (rev 1876) +++ trunk/src/site/site_en.xml 2010-11-17 10:11:55 UTC (rev 1877) @@ -58,6 +58,7 @@ <item name="Introduction" href="index.html"/> <item name="File header model" href="header.html"/> <item name="License project descriptor" href="descriptor.html"/> + <item name="Add your license" href="addLicense.html"/> <item name="Usage" href="usage.html"> <item name="License" href="usage.html#License"> <item name="update-project-license" href="update-project-license-mojo.html"/> Modified: trunk/src/site/site_fr.xml =================================================================== --- trunk/src/site/site_fr.xml 2010-11-16 10:33:37 UTC (rev 1876) +++ trunk/src/site/site_fr.xml 2010-11-17 10:11:55 UTC (rev 1877) @@ -57,6 +57,7 @@ <item name="Introduction" href="index.html"/> <item name="Modèle de header de fichier" href="header.html"/> <item name="Descripteur de license du projet" href="descriptor.html"/> + <item name="Ajouter une license" href="addLicense.html"/> <item name="Utilisation" href="usage.html"> <item name="License" href="usage.html#License"> <item name="update-project-license" href="update-project-license-mojo.html"/>
participants (1)
-
jcouteau@users.nuiton.org