Author: jcouteau Date: 2010-04-16 16:06:40 +0200 (Fri, 16 Apr 2010) New Revision: 1756 Log: Add some doc, add site french translation Added: trunk/src/site/fr/ trunk/src/site/fr/apt/ trunk/src/site/fr/apt/descriptor.apt trunk/src/site/fr/apt/header.apt trunk/src/site/fr/apt/index.apt trunk/src/site/fr/apt/usage.apt trunk/src/site/site_fr.xml Modified: trunk/src/site/apt/descriptor.apt trunk/src/site/apt/index.apt trunk/src/site/site_en.xml Modified: trunk/src/site/apt/descriptor.apt =================================================================== --- trunk/src/site/apt/descriptor.apt 2010-04-16 11:56:15 UTC (rev 1755) +++ trunk/src/site/apt/descriptor.apt 2010-04-16 14:06:40 UTC (rev 1756) @@ -39,15 +39,13 @@ {{{./update-file-header-mojo.html}update-file-header}} and {{{./update-project-license-mojo.html}update-project-license}}. - TODO-TC-20100409 Do this documentation - xsd This file is ruled by a {{{./licenseProjectDescriptor-1.0.0.xsd}xsd file}}. Example - The next example applies a gpl v3 license on all java files in **src/main/java**. + The next example applies a lgpl v3 license on all java files in **src/main/java**. ------------------------------------------------------------------------------- @@ -71,4 +69,22 @@ </header> </headers> </project> -------------------------------------------------------------------------------- \ No newline at end of file +------------------------------------------------------------------------------- + +How to create your own project.xml file + + The project.xml file should be located in the src/license directory. + + The xml file is included in project tags. Then you describe the main license + using one of the codes present in maven-license-plugin (use + mvn license:license-list -Ddetail to get the list of the codes and + corresponding licenses). + + You can then declare headers. A header is the association of a license and a + comment-style. If no license is present, the mainLicense will be taken. You + can set here the base dir and the files to include and/or exclude pattern. + + Note that your are not limited in the number of headers. You can create a + header for one file in case of copied code from other projects, but in this + case you might prefer using the %%IgnoreLicense tag in the file itself. The + previous example should help you create your project.xml file. Modified: trunk/src/site/apt/index.apt =================================================================== --- trunk/src/site/apt/index.apt 2010-04-16 11:56:15 UTC (rev 1755) +++ trunk/src/site/apt/index.apt 2010-04-16 14:06:40 UTC (rev 1756) @@ -47,11 +47,11 @@ The header is composed of two parts : - * the first part gives some common informations for all files of a maven + * the first part gives some common information for all files of a maven module (such as project name, organisation, ...). * the second part resumes the license used. - Here a example : + Here an example : ------------------------------------------------------------------------------- @@ -96,9 +96,11 @@ * Usage - Instructions on how to use the Plugin can be found on {{{./usage.html}usage}} page + Instructions on how to use the Plugin can be found on {{{./usage.html}usage}} + page * Examples - to be done. + You can find examples on how to configure and use maven-license-plugin on the + {{{./descriptor.html}descriptor}} page Added: trunk/src/site/fr/apt/descriptor.apt =================================================================== --- trunk/src/site/fr/apt/descriptor.apt (rev 0) +++ trunk/src/site/fr/apt/descriptor.apt 2010-04-16 14:06:40 UTC (rev 1756) @@ -0,0 +1,92 @@ +~~~ +~~ #%L +~~ Maven License Plugin +~~ +~~ $Id: descriptor.apt 1754 2010-04-16 10:47:43Z tchemit $ +~~ $HeadURL: http://svn.nuiton.org/svn/maven-license-plugin/trunk/src/site/apt/descriptor... $ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin +~~ %% +~~ 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% +~~~ +---- +License project descriptor +---- + +Abstract + + Ce document décrit le fichier de description de license introduit dans la + version 2.1. + + Le but du fichier de description de license est d'énumérer tous les fichiers à + inclure dans le process de license par license et par type. + + Ce nouveau format est utilisé dans les goals + {{{./update-file-header-mojo.html}update-file-header}} et + {{{./update-project-license-mojo.html}update-project-license}}. + +xsd + + Ce fichier est géré par un {{{./licenseProjectDescriptor-1.0.0.xsd}fichier xsd}}_. + +Exemple + + L'exemple suivant applique la license lgpl v3 à tous les fichier java présents + dans **src/main/java**. + +------------------------------------------------------------------------------- + + <?xml version='1.0' encoding='UTF-8'?> + <project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-1.0.0.xsd"> + <mainLicense>gpl_v3</mainLicense> + <headers> + <header> + <licenseName>lgpl_v3</licenseName> + <commentStyle>java</commentStyle> + <fileSets> + <fileSet> + <basedir>all/src</basedir> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + </fileSets> + </header> + </headers> + </project> +------------------------------------------------------------------------------- + +Comment créer son propre fichier project.xml + + Le fichier project.xml doit être situé dans le dossier **src/license**. + + Le fichier xml est inclus entre des balises project. Vous décrivez ensuite la + license principale du projet en utilisant les codes du plugin (utilisez + mvn license:license-list -Ddetail pour connaitre la liste des codes et des + licenses correspondantes). + + Vous pouvez ensuite déclarer des headers. Un header est l'association d'une + license et d'un stye de commentaire. S'il n'y a pas de license, la license + principale du projet est utilisée. Vous pouvez déclarer le répertoire de base + et le pattern de sélection/inclusion de fichiers. + + Nottez que vous n'êtes pas limités dans le nombre de headers. Vous pouvez + créer un header pour un fichier dans le cas de code copié depuis un autre + projet par exemple, ou vous pouvez utiliser le tag %%IgnoreLicense dans le + fichier lui-même. L'exemple précédent devrait vous permettre de créer votre + propre fichier project.xml. Added: trunk/src/site/fr/apt/header.apt =================================================================== --- trunk/src/site/fr/apt/header.apt (rev 0) +++ trunk/src/site/fr/apt/header.apt 2010-04-16 14:06:40 UTC (rev 1756) @@ -0,0 +1,145 @@ +~~~ +~~ #%L +~~ Maven License Plugin +~~ +~~ $Id: header.apt 1754 2010-04-16 10:47:43Z tchemit $ +~~ $HeadURL: http://svn.nuiton.org/svn/maven-license-plugin/trunk/src/site/apt/header.apt $ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin +~~ %% +~~ 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% +~~~ +---- +File Header +---- + +Abstract + + Ce document décrit le modèle d'header de fichier introduit dans la version 2.1. + + Vous allez apprendre à l'adapter et l'utiliser avec le goal + {{{./update-file-header-mojo.html}update-file-header}}. + +Modèle de header + +* Exemple + + Voici un example de header de fichier (SANS inclusion dans un bloc commentaire) : + +-------------------------------------------------------------------------------- + + (1) # % L + (2) Description du projet + (3) %% + (4) Copyright (C) 2010 votre organization + (5) %% + (6) Contenu de la license + (7) # L % +-------------------------------------------------------------------------------- + + * (1) Le tag de début de process, utilisé pour détecter le début du header (ne JAMAIS l'enlever). + * (2) Section de description du projet + * (3) Délimiteur de section + * (4) Section copyright (plus d'information ci-dessous) + * (5) Délimiteur de section + * (6) Section license + * (7) Le tag de fin de process, utilisé pour détecter la fin du header (ne JAMAIS l'enlever). + +* Configuration + + Vous pouvez configurer : + + * le tag de début de process + * le délimiteur de section + * le tag de fin de process + +* Modèle de copyright + + La section de copyright doit être exactement de la forme : + +-------------------------------------------------------------------------------- + + Copyright (C) firstYear[ - lastYear] holder +-------------------------------------------------------------------------------- + + Si *firstYear* et *lastYear* sont les même, lastYear peut être omis. + +* Bloc commentaire + + Dans un fichier, nous devons obligatoirement placé le header de fichier dans + un commentaire. Dans le fichier de description, vous pouvez l'adapter en + choisissant un headerType. + +Styles de commeantaire disponible + + Voici la liste des styles de commentaire disponible. Vous pouvez les lister + en utilisant le goal {{{./comment-style-list-mojo.html}comment-style-list}}. + +* java style + +-------------------------------------------------------------------------------- + + /* + * HEADER + */ +-------------------------------------------------------------------------------- + +* xml style + +-------------------------------------------------------------------------------- + + <!-- + HEADER + --> +-------------------------------------------------------------------------------- + +* properties style + +-------------------------------------------------------------------------------- + + ###### + # HEADER + ###### +-------------------------------------------------------------------------------- + +* apt style + +-------------------------------------------------------------------------------- + + ~~~~~~ + ~~ HEADER + ~~~~~~ +-------------------------------------------------------------------------------- + +* rst style + +-------------------------------------------------------------------------------- + .. - + .. * HEADER + .. - +-------------------------------------------------------------------------------- + +Ignorer un header + + Si ne voulez pas que le goal `update-file-header` traite un fichier en + particulier, vous pouvez utiliser un tag spécifique dans votre classe : + +-------------------------------------------------------------------------------- + + %%License-Ignore +-------------------------------------------------------------------------------- + + Vous pouvez le changer avec la propriété **ignoreTag**. Added: trunk/src/site/fr/apt/index.apt =================================================================== --- trunk/src/site/fr/apt/index.apt (rev 0) +++ trunk/src/site/fr/apt/index.apt 2010-04-16 14:06:40 UTC (rev 1756) @@ -0,0 +1,108 @@ +~~~ +~~ #%L +~~ Maven License Plugin +~~ +~~ $Id: index.apt 1754 2010-04-16 10:47:43Z tchemit $ +~~ $HeadURL: http://svn.nuiton.org/svn/maven-license-plugin/trunk/src/site/apt/index.apt $ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin +~~ %% +~~ 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% +~~~ +---- +Introduction +---- + +Maven license Plugin + + Le Maven License Plugin est utilisé pour gérer les license dans un projet + Maven. + +* NOTE + Dans la documentation, les tags de process sont séparés par des espaces où le + plugin ne pourrait PAS gérer la license de ces fichiers ! + + +Header de license + + Le header de license est un commentaire ajouté en haut des fichiers source. + + Pour détecter le header dans les fichiers, nous utilisons la technologie + processor, avec les tags + +------------------------------------------------------------------------------- + + # % L Contenu # L % +------------------------------------------------------------------------------- + + Les header est composé de deux parties : + + * la première partie donne des informations générales du module maven telles + que nom du projet, organisation, ... + * la séconde partie résume la license elle-même. + + Voici un example : + +------------------------------------------------------------------------------- + + /* + * # % L + * Plugin maven de changement de license + * %% + * Copyright (C) 2008 - 2009 CodeLutin + * %% + * 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 % + */ +------------------------------------------------------------------------------- + +* Aperçu des goals + + Le plugin a les goals suivants : + + * {{{./update-project-license-mojo.html}update-project-license}} ajoute ou met à jour les fichiers de license du projet (depuis 2.1). + + * {{{./update-file-header-mojo.html}update-file-header}} ajoute ou met à jour les headers de license des fichiers (depuis 2.1). + + * {{{./add-third-party-mojo.html}add-third-party}} crée le fichier THIRD-PARTY.txt dans le build. + + * {{{./comment-style-list-mojo.html}comment-style-list}} Affiche la liste des styles de commentaire disponibles (depuis 2.1). + + * {{{./license-list-mojo.html}license-list}}Affiche la liste des licenses disponibles. + + * {{{./help-mojo.html}help}} Affiche l'aide du plugin (goals, usage). + +* Utilisation + + Les instructions sur l'utilsiation du plugin peuvent être trouvées sur la + page d'{{{./usage.html}utilisation}} + +* Examples + + Vous pouez trouvez des examples sur comment configurer et utiliser + maven-license-plugin sur la page du {{{./descriptor.html}descripteur}}. Added: trunk/src/site/fr/apt/usage.apt =================================================================== --- trunk/src/site/fr/apt/usage.apt (rev 0) +++ trunk/src/site/fr/apt/usage.apt 2010-04-16 14:06:40 UTC (rev 1756) @@ -0,0 +1,151 @@ +~~~ +~~ #%L +~~ Maven License Plugin +~~ +~~ $Id: usage.apt 1754 2010-04-16 10:47:43Z tchemit $ +~~ $HeadURL: http://svn.nuiton.org/svn/maven-license-plugin/trunk/src/site/apt/usage.apt $ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin +~~ %% +~~ 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% +~~~ +---- +Usage +---- + +Actions + +* update-project-license goal + + Ce goal crée ou met à jour le fichier LICENSE.txt et l'ajoute au build. + + Il peut aussi générer un fichier bundle License pour éviter la collision de + noms dans une application finale + + pour plus d'informations, référez-vous à la + {{{./update-project-license-mojo.html}page de détail}}. + +* update-file-header goal + + Ce goal ajoute ou met à jour les header de licenses des fichiers en utilisant + un fichier de description xml permettant de décrire les fichiers d'un module à + inclure dans le process de license. + + Pour plus d'informations, référez-vous à + {{{./update-file-header-mojo.html}la page de détail}}. + +* add-third-party goal + + Ce goal construit le fichier THIRD-PARTY.txt et l'ajoute au build. + + Pour plus de détails, référez-vous à + {{{./add-third-party-mojo.html}la page de détail}}. + +Obtenir des informations + +* license-list goal + + Ce goal affiche les licenses disponibles. + + A utiliser directement (et seulement) depuis la ligne de commande : + +------------------------------------------------------------------------------- + + mvn license:license-list +------------------------------------------------------------------------------- + + Pour afficher le header de license, utilisez le paramètre <<detail>> : + +------------------------------------------------------------------------------- + mvn license:license-list -Ddetail +------------------------------------------------------------------------------- + + Pour plus d'informations, référez-vous à + {{{./license-list-mojo.html}la page de détail}}. + +** Exemple d'exécution + +------------------------------------------------------------------------------- + [INFO] [license:license-list {execution: default-cli}] + [INFO] Available licenses : + + * agpl_v3 : GNU Affero General Public License (AGPL) version 3.0 + * apache_v2 : Apache License version 2.0 + * cddl_v1 : COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + * fdl_v1_3 : GNU Free Documentation License (FDL) version 1.3 + * gpl_v1 : GNU General Public License (GPL) version 1.0 + * gpl_v2 : GNU General Public License (GPL) version 2.0 + * gpl_v3 : GNU General Public License (GPL) version 3.0 + * lgpl_v2_1 : GNU General Lesser Public License (LGPL) version 2.1 + * lgpl_v3 : GNU General Lesser Public License (LGPL) version 3.0 + * mit : MIT-License +------------------------------------------------------------------------------- + +* comment-style-list goal + + Ce goal affiche les styles de commentaires disponibles pour boxer le header de + fichier. + + A utiliser directement (et simplement) depuis la ligne de commande : + +------------------------------------------------------------------------------- + + mvn license:comment-style-list +------------------------------------------------------------------------------- + + Pour afficher l'exemple, utilisez le paramètre <<detail>> : + +------------------------------------------------------------------------------- + + mvn license:comment-style-list -Ddetail +------------------------------------------------------------------------------- + + Pour plus d'informations, référez-vous à + {{{./comment-style-list-mojo.html}la page de détail}}. + +** Exemple d'exécution + +------------------------------------------------------------------------------- + [INFO] [license:comment-style-list {execution: default-cli}] + [INFO] List of available comment styles: + + - apt : header transformer with apt comment style + - java : header transformer with java comment style + - properties : header transformer with properties file comment style + - rst : header transformer with rst comment style + - xml : header transformer with xml comment style +------------------------------------------------------------------------------- + +* help goal + + Ce goal affiche l'aide du plugin (goals disponibles). + + A utiliser directement (et uniquement) depuis la ligne de commande. + +------------------------------------------------------------------------------- + + mvn license:help +------------------------------------------------------------------------------- + + Pour afficher l'aide verbeuse : + +------------------------------------------------------------------------------- + + mvn license:help -Ddetail +------------------------------------------------------------------------------- + + Pour plus d'informations, référez-vous à + {{{./help-mojo.html}la page de détail}}. Modified: trunk/src/site/site_en.xml =================================================================== --- trunk/src/site/site_en.xml 2010-04-16 11:56:15 UTC (rev 1755) +++ trunk/src/site/site_en.xml 2010-04-16 14:06:40 UTC (rev 1756) @@ -58,7 +58,7 @@ <item name="update-file-header" href="update-file-header-mojo.html"/> <item name="add-third-party" href="add-third-party-mojo.html"/> </item> - <item name="Get informations" href="usage.html#get-informations"> + <item name="Get information" href="usage.html#get-information"> <item name="license-list" href="license-list-mojo.html"/> <item name="comment-style-list" href="comment-style-list-mojo.html"/> <item name="help" href="help-mojo.html"/> @@ -69,7 +69,7 @@ <menu name="Downloads"> <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar" - name="Librairie (jar)"/> + name="Library (jar)"/> <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar" name="Javadoc (jar)"/> Added: trunk/src/site/site_fr.xml =================================================================== --- trunk/src/site/site_fr.xml (rev 0) +++ trunk/src/site/site_fr.xml 2010-04-16 14:06:40 UTC (rev 1756) @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Maven License Plugin + + $Id: site_en.xml 1751 2010-04-15 13:57:24Z tchemit $ + $HeadURL: http://svn.nuiton.org/svn/maven-license-plugin/trunk/src/site/site_en.xml $ + %% + Copyright (C) 2008 - 2010 CodeLutin + %% + 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% + --> +<project name="${project.name}"> + + <bannerLeft> + <name>${project.name}</name> + <href>index.html</href> + </bannerLeft> + + <poweredBy> + <logo href="http://maven.apache.org" + name="Maven" + img="images/logos/maven-feather.png"/> + <logo href="http://maven-nuiton.org/jrst" + name="JRst" + img="images/jrst-logo.png"/> + <logo href="http://docutils.sourceforge.net/rst.html" + name="ReStructuredText" + img="images/restructuredtext-logo.png"/> + </poweredBy> + + <body> + + <breadcrumbs> + <item name="${project.name}" href="index.html"/> + </breadcrumbs> + + <menu name="Utilisateur"> + <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="Usage" href="usage.html"> + <item name="Actions" href="usage.html#actions"> + <item name="update-project-license" href="update-project-license-mojo.html"/> + <item name="update-file-header" href="update-file-header-mojo.html"/> + <item name="add-third-party" href="add-third-party-mojo.html"/> + </item> + <item name="Obtenir des informations" href="usage.html#obtenir-des-informations"> + <item name="license-list" href="license-list-mojo.html"/> + <item name="comment-style-list" href="comment-style-list-mojo.html"/> + <item name="help" href="help-mojo.html"/> + </item> + </item> + </menu> + + <menu name="Téléchargements"> + <item + href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar" + name="Librairie (jar)"/> + <item + href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar" + name="Javadoc (jar)"/> + <item + href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-sources.jar" + name="Sources (jar)"/> + </menu> + + <menu ref="reports"/> + + </body> +</project>