r548 - in trunk: . src/main/java/org/nuiton/license src/test/java/org/nuiton/license
Author: tchemit Date: 2009-08-22 23:11:21 +0200 (Sat, 22 Aug 2009) New Revision: 548 Removed: trunk/src/main/java/org/nuiton/license/LicenseGenerator.java trunk/src/main/java/org/nuiton/license/LicenseGeneratorFactory.java trunk/src/test/java/org/nuiton/license/LicenseGeneratorFactoryTest.java Modified: trunk/changelog.txt trunk/src/main/java/org/nuiton/license/JarLicenseResolver.java trunk/src/main/java/org/nuiton/license/LicenseResolver.java Log: remove Deprecated code (moved in maven-licence-plugin) Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-08-22 16:16:15 UTC (rev 547) +++ trunk/changelog.txt 2009-08-22 21:11:21 UTC (rev 548) @@ -5,7 +5,6 @@ * Initial release * fork from previous project (org.codelutin:maven-license-switcher-plugin) - * deprecate LicenseGenerator and LicenseGeneratorFactory -- chemit -- mer 03 17:02:04 CET 2009 Modified: trunk/src/main/java/org/nuiton/license/JarLicenseResolver.java =================================================================== --- trunk/src/main/java/org/nuiton/license/JarLicenseResolver.java 2009-08-22 16:16:15 UTC (rev 547) +++ trunk/src/main/java/org/nuiton/license/JarLicenseResolver.java 2009-08-22 21:11:21 UTC (rev 548) @@ -37,7 +37,7 @@ */ public class JarLicenseResolver extends LicenseResolver { - protected static final Log log = LogFactory.getLog(JarLicenseResolver.class); + private static final Log log = LogFactory.getLog(JarLicenseResolver.class); public JarLicenseResolver() { super(acquireBaseURL()); Deleted: trunk/src/main/java/org/nuiton/license/LicenseGenerator.java =================================================================== --- trunk/src/main/java/org/nuiton/license/LicenseGenerator.java 2009-08-22 16:16:15 UTC (rev 547) +++ trunk/src/main/java/org/nuiton/license/LicenseGenerator.java 2009-08-22 21:11:21 UTC (rev 548) @@ -1,34 +0,0 @@ -/** - * *##% Maven helper plugin - * Copyright (C) 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>. ##%* - */ -package org.nuiton.license; - -/** - * A simple Contract to generate a new header for a given type of file - * - * @author chemit - * @deprecated since 1.0.0, this class is renamed to HeaderGenerator and - * moved to project maven-license-plugin. - * - */ -@Deprecated -public interface LicenseGenerator { - - String getHeader(String licenseHeaderContent); - -} Deleted: trunk/src/main/java/org/nuiton/license/LicenseGeneratorFactory.java =================================================================== --- trunk/src/main/java/org/nuiton/license/LicenseGeneratorFactory.java 2009-08-22 16:16:15 UTC (rev 547) +++ trunk/src/main/java/org/nuiton/license/LicenseGeneratorFactory.java 2009-08-22 21:11:21 UTC (rev 548) @@ -1,93 +0,0 @@ -/** - * *##% Maven helper plugin - * Copyright (C) 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>. ##%* - */ -package org.nuiton.license; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * A factory of {@link LicenseGenerator} - * - * @author chemit - * @deprecated since 1.0.0, no more use (LicenseGenerator is no more in this project...) - */ -@Deprecated -public class LicenseGeneratorFactory { - - public static class LicenceGeneratorContext { - - File src; - String[] files; - - public LicenceGeneratorContext(File src, String[] files) { - this.src = src; - this.files = files; - } - - public File getSrc() { - return src; - } - - public String[] getFiles() { - return files; - } - - public void setSrc(File src) { - this.src = src; - } - - public void setFiles(String[] files) { - this.files = files; - } - - } - - protected static Map<LicenseGenerator, List<String>> availableGenerator; - - public static Map<LicenseGenerator, List<String>> getAvailableGenerator() { - if (availableGenerator == null) { - availableGenerator = new HashMap<LicenseGenerator, List<String>>(); - } - return availableGenerator; - } - - public static List<String> getGeneratorMatchers(LicenseGenerator generator) { - List<String> result = null; - if (availableGenerator != null) { - result = availableGenerator.get(generator); - if (result == null) { - // add a new empty list in cache - result = new ArrayList<String>(); - availableGenerator.put(generator, result); - } - } - return result; - } - - public static void addGenerator(LicenseGenerator generator, String matcher) { - List<String> matchers = getGeneratorMatchers(generator); - if (matcher.isEmpty() || !matcher.contains(matcher)) { - matchers.add(matcher); - } - } - -} Modified: trunk/src/main/java/org/nuiton/license/LicenseResolver.java =================================================================== --- trunk/src/main/java/org/nuiton/license/LicenseResolver.java 2009-08-22 16:16:15 UTC (rev 547) +++ trunk/src/main/java/org/nuiton/license/LicenseResolver.java 2009-08-22 21:11:21 UTC (rev 548) @@ -47,7 +47,7 @@ */ public class LicenseResolver { - protected static final Log log = LogFactory.getLog(LicenseResolver.class); + private static final Log log = LogFactory.getLog(LicenseResolver.class); /** * BaseURL Deleted: trunk/src/test/java/org/nuiton/license/LicenseGeneratorFactoryTest.java =================================================================== --- trunk/src/test/java/org/nuiton/license/LicenseGeneratorFactoryTest.java 2009-08-22 16:16:15 UTC (rev 547) +++ trunk/src/test/java/org/nuiton/license/LicenseGeneratorFactoryTest.java 2009-08-22 21:11:21 UTC (rev 548) @@ -1,52 +0,0 @@ -/** - * *##% Maven helper plugin - * Copyright (C) 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>. ##%* - */ -package org.nuiton.license; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** @author chemit */ -public class LicenseGeneratorFactoryTest { - - @Before - public void setUp() { - // Add your code here - } - - @After - public void tearDown() { - // Add your code here - } - - @Test - public void testGetAvailableGenerator() { - // Add your code here - } - - @Test - public void testGetGeneratorMatchers() { - // Add your code here - } - - @Test - public void testAddGenerator() { - // Add your code here - } -}
participants (1)
-
tchemit@users.nuiton.org