[Lutinutil-commits] r1048 - trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license
Author: tchemit Date: 2008-08-18 15:22:41 +0000 (Mon, 18 Aug 2008) New Revision: 1048 Modified: trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/AvailableLicensesMojo.java trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/LicenseType.java trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java Log: ajout d'un goal pour construire le third-party file recopie des fichiers vers src/main/resources Modified: trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/AvailableLicensesMojo.java =================================================================== --- trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/AvailableLicensesMojo.java 2008-08-18 14:25:26 UTC (rev 1047) +++ trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/AvailableLicensesMojo.java 2008-08-18 15:22:41 UTC (rev 1048) @@ -1,17 +1,17 @@ /** * *##% Plugin maven pour switcher les licenses * Copyright (C) 2008 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>. ##%* Modified: trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/LicenseType.java =================================================================== --- trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/LicenseType.java 2008-08-18 14:25:26 UTC (rev 1047) +++ trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/LicenseType.java 2008-08-18 15:22:41 UTC (rev 1048) @@ -1,17 +1,17 @@ /** * *##% Plugin maven pour switcher les licenses * Copyright (C) 2008 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>. ##%* Modified: trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java =================================================================== --- trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java 2008-08-18 14:25:26 UTC (rev 1047) +++ trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java 2008-08-18 15:22:41 UTC (rev 1048) @@ -39,6 +39,7 @@ * @author chemit * @goal switch * @phase process-sources + * @execute goal=third-party * @requiresProject true */ public class SwitchLicenseMojo extends AbstractMojo { @@ -275,7 +276,11 @@ String line = reader.readLine(); sb.append(line).append('\n'); while ((line = reader.readLine()) != null) { - sb.append(" * ").append(line).append("\n"); + if (line.isEmpty()) { + sb.append(" *\n"); + } else { + sb.append(" * ").append(line).append("\n"); + } } tmpHeader = sb.toString(); licenseHeaderContent = tmpHeader.substring(0, tmpHeader.length() - 1);
participants (1)
-
tchemit@users.labs.libre-entreprise.org