Maven-license-plugin-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 268 discussions
09 Apr '10
Author: tchemit
Date: 2010-04-10 01:09:12 +0200 (Sat, 10 Apr 2010)
New Revision: 1731
Log:
add svn:keywords on files
Modified:
trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/model/License.java
trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java
trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java
trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java
trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,3 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
package org.nuiton.license.plugin;
import org.apache.maven.plugin.MojoExecutionException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.nuiton.license.plugin.model.License;
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.apache.maven.artifact.Artifact;
Modified: trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.apache.maven.plugin.MojoExecutionException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.apache.maven.plugin.MojoExecutionException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.apache.maven.plugin.MojoExecutionException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.apache.maven.plugin.MojoExecutionException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.apache.commons.lang.StringUtils;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header;
import org.apache.commons.logging.Log;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header;
import org.nuiton.license.plugin.header.transformer.FileHeaderTransformer;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.generator;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.generator;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.generator;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.generator;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.generator;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.generator;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/model/License.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/model/License.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/model/License.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.model;
import org.apache.commons.lang.builder.ToStringBuilder;
Modified: trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.model;
import org.apache.commons.logging.Log;
Modified: trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.model;
import org.apache.commons.logging.Log;
Modified: trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.junit.Test;
Modified: trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.junit.Test;
Modified: trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin;
import org.junit.Assert;
Modified: trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.header.transformer;
import org.junit.After;
Modified: trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.model;
import org.junit.Assert;
Modified: trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java 2010-04-09 22:41:05 UTC (rev 1730)
+++ trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java 2010-04-09 23:09:12 UTC (rev 1731)
@@ -1,23 +1,4 @@
-/*
- * *##%
- * Maven License Plugin
- * 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>.
- * ##%*
- */
+
package org.nuiton.license.plugin.model;
import org.junit.Assert;
1
0
Author: tchemit
Date: 2010-04-10 00:41:05 +0200 (Sat, 10 Apr 2010)
New Revision: 1730
Log:
add svn:keywords
Modified:
trunk/LICENSE.txt
trunk/README.txt
trunk/changelog.txt
trunk/pom.xml
trunk/src/it/settings.xml
trunk/src/it/update-license/LICENSE.txt
trunk/src/it/update-license/README.txt
trunk/src/it/update-license/changelog.txt
trunk/src/it/update-license/invoker.properties
trunk/src/it/update-license/pom.xml
trunk/src/it/update-license/src/license/project.xml
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java
trunk/src/it/update-license/verify.groovy
trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/model/License.java
trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java
trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java
trunk/src/main/mdo/descriptor.mdo
trunk/src/main/resources/META-INF/licenses/agpl_v3/header.txt
trunk/src/main/resources/META-INF/licenses/agpl_v3/license.txt
trunk/src/main/resources/META-INF/licenses/apache_v2/header.txt
trunk/src/main/resources/META-INF/licenses/apache_v2/license.txt
trunk/src/main/resources/META-INF/licenses/cddl_v1/header.txt
trunk/src/main/resources/META-INF/licenses/cddl_v1/license.txt
trunk/src/main/resources/META-INF/licenses/fdl_v1_3/header.txt
trunk/src/main/resources/META-INF/licenses/fdl_v1_3/license.txt
trunk/src/main/resources/META-INF/licenses/gpl_v1/header.txt
trunk/src/main/resources/META-INF/licenses/gpl_v1/license.txt
trunk/src/main/resources/META-INF/licenses/gpl_v2/header.txt
trunk/src/main/resources/META-INF/licenses/gpl_v2/license.txt
trunk/src/main/resources/META-INF/licenses/gpl_v3/header.txt
trunk/src/main/resources/META-INF/licenses/gpl_v3/license.txt
trunk/src/main/resources/META-INF/licenses/lgpl_v2_1/header.txt
trunk/src/main/resources/META-INF/licenses/lgpl_v2_1/license.txt
trunk/src/main/resources/META-INF/licenses/lgpl_v3/header.txt
trunk/src/main/resources/META-INF/licenses/lgpl_v3/license.txt
trunk/src/main/resources/META-INF/licenses/licenses.properties
trunk/src/main/resources/META-INF/licenses/mit/header.txt
trunk/src/main/resources/META-INF/licenses/mit/license.txt
trunk/src/main/resources/META-INF/plexus/components.xml
trunk/src/main/resources/license/defaultHeader.vm
trunk/src/main/resources/log4j.properties
trunk/src/site/rst/descriptor.rst
trunk/src/site/rst/header.rst
trunk/src/site/rst/index.rst
trunk/src/site/rst/usage.rst
trunk/src/site/site_en.xml
trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java
trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/licenseOne.txt
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/licenseTwo.txt
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/testOne.xml
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/testTwo.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/bug_28.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/bug_28/JavaDummy_done.java2
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/bug_28/JavaDummy_skip.java2
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/JavaDummy.java2
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/JavaDummy_none.java2
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/javaDummy.css
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/javaDummy_none.css
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy.properties
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy.sh
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy_none.properties
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy_none.sh
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy.html
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy_none.html
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy_none.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
Property changes on: trunk/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/README.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/pom.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/settings.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/README.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/invoker.properties
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/pom.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/src/license/project.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/it/update-license/verify.groovy
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/model/License.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/mdo/descriptor.mdo
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/agpl_v3/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/agpl_v3/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/apache_v2/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/apache_v2/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/cddl_v1/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/cddl_v1/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/fdl_v1_3/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/fdl_v1_3/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/gpl_v1/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/gpl_v1/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/gpl_v2/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/gpl_v2/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/gpl_v3/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/gpl_v3/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/lgpl_v2_1/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/lgpl_v2_1/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/lgpl_v3/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/lgpl_v3/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/licenses.properties
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/mit/header.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/licenses/mit/license.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/META-INF/plexus/components.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/license/defaultHeader.vm
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/site/rst/descriptor.rst
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/site/rst/header.rst
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/site/rst/index.rst
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/site/rst/usage.rst
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/licenseOne.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/licenseTwo.txt
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/testOne.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/testTwo.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/bug_28/JavaDummy_done.java2
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/bug_28/JavaDummy_skip.java2
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/bug_28.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/JavaDummy.java2
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/JavaDummy_none.java2
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/javaDummy.css
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java/javaDummy_none.css
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/java.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy.properties
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy.sh
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy_none.properties
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties/javaDummy_none.sh
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/properties.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy.html
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy_none.html
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml/javaDummy_none.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/xml.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
___________________________________________________________________
Modified: svn:keywords
- "Author Date Id Revision HeadURL
+ HeadURL Id Date Revision Author
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml
___________________________________________________________________
Added: svn:keywords
+ HeadURL Id Date Revision Author
1
0
09 Apr '10
Author: tchemit
Date: 2010-04-09 23:40:28 +0200 (Fri, 09 Apr 2010)
New Revision: 1729
Log:
add line separator before svn keywords
Modified:
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 21:25:47 UTC (rev 1728)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 21:40:28 UTC (rev 1729)
@@ -595,6 +595,7 @@
buffer.append(projectName);
if (addSvnKeyWords) {
// add svn keyworks
+ buffer.append(FileHeaderTransformer.LINE_SEPARATOR);
buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$Author$");
buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$LastChangedDate$");
buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$LastChangedRevision$");
1
0
r1728 - in trunk/src: it/update-license/src/main/java/org/nuiton/license/plugin/test main/java/org/nuiton/license/plugin main/java/org/nuiton/license/plugin/header/transformer main/resources/license site site/rst test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src
by tchemit@users.nuiton.org 09 Apr '10
by tchemit@users.nuiton.org 09 Apr '10
09 Apr '10
Author: tchemit
Date: 2010-04-09 23:25:47 +0200 (Fri, 09 Apr 2010)
New Revision: 1728
Log:
- change section delimiter -- to %% to avoid error in xml comment
- add addSvnKeyWords flag in update-license goal to add svn:keywords on new header
- update doc
Added:
trunk/src/site/rst/descriptor.rst
Modified:
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
trunk/src/main/resources/license/defaultHeader.vm
trunk/src/site/rst/index.rst
trunk/src/site/site_en.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
Modified: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java
===================================================================
--- trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java 2010-04-09 21:25:47 UTC (rev 1728)
@@ -1,9 +1,9 @@
/*
* #%L
* License Test :: do NOT update!
- * --
+ * %%
* Copyright (C) 2010 Tony
- * --
+ * %%
* Fake to be removed!
* #L%
*/
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 21:25:47 UTC (rev 1728)
@@ -99,6 +99,14 @@
protected String inceptionYear;
/**
+ * A flag to add svn:keywors on new header.
+ *
+ * @parameter expression="${license.addSvnKeyWords}" default-value="false"
+ * @since 2.1
+ */
+ protected boolean addSvnKeyWords;
+
+ /**
* A flag to update copyright application time (change copyright last year
* if required) according to the last commit made on the processed file.
*
@@ -117,7 +125,6 @@
*/
protected String ignoreTag;
-
/**
* To specify an external extra licenses repository resolver (says the base
* url of the repository where the {@code license.properties} is present).
@@ -583,8 +590,23 @@
String copyrightHolder,
String encoding) throws IOException {
FileHeader result = new FileHeader();
- result.setDescription(projectName);
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(projectName);
+ if (addSvnKeyWords) {
+ // add svn keyworks
+ buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$Author$");
+ buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$LastChangedDate$");
+ buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$LastChangedRevision$");
+ buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$Id$");
+ buffer.append(FileHeaderTransformer.LINE_SEPARATOR).append("$HeadURL$");
+
+ }
+ result.setDescription(buffer.toString());
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("header description : " + result.getDescription());
+ }
+
String licenseContent = license.getHeaderContent(encoding);
result.setLicense(licenseContent);
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 21:25:47 UTC (rev 1728)
@@ -48,7 +48,7 @@
String ROLE_NAME = FileHeaderTransformer.class.getName();
/** default section delimiter */
- String DEFAULT_SECTION_DELIMITER = "--";
+ String DEFAULT_SECTION_DELIMITER = "%%";
/** default process start tag */
String DEFAULT_PROCESS_START_TAG = "#%L";
Modified: trunk/src/main/resources/license/defaultHeader.vm
===================================================================
--- trunk/src/main/resources/license/defaultHeader.vm 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/main/resources/license/defaultHeader.vm 2010-04-09 21:25:47 UTC (rev 1728)
@@ -1,4 +1,10 @@
$projectName
+
+#$Author#$
+#$LastChangedDate#$
+#$LastChangedRevision#$
+#$Id#$
+#$HeadURL#$
--
Copyright (C) $inceptionYear $organizationName
--
Added: trunk/src/site/rst/descriptor.rst
===================================================================
--- trunk/src/site/rst/descriptor.rst (rev 0)
+++ trunk/src/site/rst/descriptor.rst 2010-04-09 21:25:47 UTC (rev 1728)
@@ -0,0 +1,62 @@
+License project descriptor
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+:Author: Tony Chemit <chemit(a)codelutin.com>
+
+.. contents::
+ :depth: 2
+
+.. sectnum::
+ :start: 1
+ :depth: 2
+
+Abstract
+========
+
+This document describes the license project descriptor file introduced in version 2.1.
+
+The license file descriptor file aims to enumerate all files to include in
+license process per type and license.
+
+This new format is used in goal `update-license`_.
+
+TODO-TC-20100409 Do this documentation
+
+xsd
+===
+
+This file is ruled by a `xsd file`_.
+
+Example
+-------
+
+The next example applies a gpl v3 license on all java files in **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/licenseProject-1.0.0.xsd">
+ <mainLicense>gpl_v3</mainLicense>
+ <licenseSets>
+ <licenseSet>
+ <fileSets>
+ <fileSet>
+ <headerType>java</headerType>
+ <basedir>src/main/java</basedir>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </licenseSet>
+ </licenseSets>
+ </project>
+
+.. _update-license: update-license-mojo.html
+
+.. _comment-style-list: comment-style-list-mojo.html
+
+.. _xsd file: licenseProject-1.0.0.xsd
\ No newline at end of file
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/site/rst/index.rst 2010-04-09 21:25:47 UTC (rev 1728)
@@ -74,8 +74,10 @@
* `license license-list`_ display list of available license.
- * `license update-header`_ add or update license header on some files.
+ * `license update-license`_ add or update license header on some files (new versions).
+ * `license update-header`_ add or update license header on some files (deprecated).
+
Usage
~~~~~
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/site/site_en.xml 2010-04-09 21:25:47 UTC (rev 1728)
@@ -47,6 +47,7 @@
<menu name="User">
<item name="Introduction" href="index.html"/>
<item name="File header model" href="header.html"/>
+ <item name="License project descriptor" href="descriptor.html"/>
<item name="Usage" href="usage.html"/>
<item name="Goals" href="plugin-info.html">
<item name="add-license" href="add-license-mojo.html"/>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java 2010-04-09 19:58:48 UTC (rev 1727)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java 2010-04-09 21:25:47 UTC (rev 1728)
@@ -1,9 +1,9 @@
/*
* #%L
* License Test :: do NOT update!
- * --
+ * %%
* Copyright (C) 2000 Codelutin do NOT update!
- * --
+ * %%
* Fake to be removed!
* #L%
*/
1
0
09 Apr '10
Author: tchemit
Date: 2010-04-09 21:58:48 +0200 (Fri, 09 Apr 2010)
New Revision: 1727
Log:
- add header license
- fix author
Modified:
trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/model/License.java
trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java
trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java
trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin;
import org.apache.maven.plugin.MojoExecutionException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -30,7 +30,7 @@
* Le goal pour ajouter le fichier LICENSE.txt dans le classpath (et le generer
* s'il n'existe pas).
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @goal add-license
* @phase generate-resources
* @requiresProject true
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -47,7 +47,7 @@
* toutes les dependances du projet) dans le classpath (et le generer s'il
* n'existe pas).
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @goal add-third-party
* @phase generate-resources
* @requiresDependencyResolution test
Modified: trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -84,4 +84,4 @@
getLog().info(buffer.toString());
}
-}
\ No newline at end of file
+}
Modified: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -30,7 +30,7 @@
/**
* Displays all the available generators.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @requiresProject false
* @requiresDirectInvocation
* @goal generator-list
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -30,7 +30,7 @@
/**
* Display all available licenses.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @goal license-list
* @requiresProject false
* @requiresDirectInvocation
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -40,7 +40,7 @@
/**
* The goal to update (or add) the licence header on some files.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @requiresProject true
* @goal update-header
* @since 1.0.1
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin;
import org.apache.commons.lang.StringUtils;
@@ -29,7 +49,7 @@
* This goal use a specific project file descriptor {@code project.xml} to
* describe all files to update for a whole project.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @requiresProject true
* @goal update-license
* @since 2.1
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeader.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header;
import org.apache.commons.logging.Log;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header;
import org.nuiton.license.plugin.header.transformer.FileHeaderTransformer;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -26,7 +26,7 @@
/**
* Le generateur de header pour des fichiers apt.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @plexus.component role-hint="license-apt"
* @since 1.0.1
* @deprecated since 2.1, prefer use now the {@link FileHeader} api
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -27,7 +27,7 @@
/**
* A simple Contract to generate a new header for a given type of file.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @since 1.0.0
* @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -26,7 +26,7 @@
/**
* Le geénérateur de header pour les fichiers sources java.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @plexus.component role-hint="license-java"
* @since 1.0.1
* @deprecated since 2.1, prefer use now the {@link FileHeader} api
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -28,7 +28,7 @@
/**
* Une implentation de base pour les generateur d'en-tete de license.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @since 1.0.1
* @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -26,7 +26,7 @@
/**
* Le generateur de header pour des fichiers de proprietes.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @plexus.component role-hint="license-properties"
* @since 1.0.1
* @deprecated since 2.1, prefer use now the {@link FileHeader} api
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -26,7 +26,7 @@
/**
* Le generateur de header pour des fichiers xml.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @plexus.component role-hint="license-xml"
* @since 1.0.1
* @deprecated since 2.1, prefer use now the {@link FileHeader} api
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AptFileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
import org.nuiton.license.plugin.header.FileHeader;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/JavaFileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/PropertiesFileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/XmlFileHeaderTransformer.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/model/License.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/model/License.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/model/License.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -34,7 +34,7 @@
/**
* The model of a license.
*
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
*/
public class License {
Modified: trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/model/LicenseRepository.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -31,7 +31,7 @@
import java.util.Map.Entry;
/**
- * @author chemit
+ * @author tchemit <chemit(a)codelutin.com>
* @since 1.0.3
*/
public class LicenseRepository implements Iterable<License> {
Modified: trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/main/java/org/nuiton/license/plugin/model/LicenseStore.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.model;
import org.apache.commons.logging.Log;
Modified: trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin;
import org.junit.Assert;
@@ -14,6 +34,7 @@
* @since 2.1
*/
public class UpdateLicenseMojoTest extends AbstractMojoTest<UpdateLicenseMojo> {
+
@Override
protected String getGoalName(String methodName) {
return "update-license";
@@ -27,13 +48,13 @@
UpdateLicenseMojo mojo = getMojo();
String content;
- content = PluginHelper.readAsString(f, mojo.getEncoding());
+// content = PluginHelper.readAsString(f, mojo.getEncoding());
+//
+// // check no header
+// checkPattern(f, content, "Copyright (C) 2010", false);
+// checkPattern(f, content, "Project name : maven-license-plugin-java", false);
+// checkPattern(f, content, "Organization is CodeLutin", false);
- // check no header
- checkPattern(f, content, "Copyright (C) 2010", false);
- checkPattern(f, content, "Project name : maven-license-plugin-java", false);
- checkPattern(f, content, "Organization is CodeLutin", false);
-
mojo.execute();
Assert.assertEquals(1, mojo.getProcessedFiles().size());
@@ -48,7 +69,7 @@
@Test
public void updateLicense() throws Exception {
- File f = getMyBeanFile("updateLicense");
+ File f = getMyBeanFile("updateLicense");
UpdateLicenseMojo mojo = getMojo();
@@ -59,7 +80,7 @@
// check header
checkPattern(f, content, "Copyright (C) 2000 Codelutin do NOT update!", true);
checkPattern(f, content, "License Test :: do NOT update!", true);
- checkPattern(f, content, "Fake to be removed!", true);
+// checkPattern(f, content, "Fake to be removed!", true);
mojo.execute();
Assert.assertEquals(1, mojo.getProcessedFiles().size());
@@ -72,10 +93,8 @@
// check license changed
checkPattern(f, content, "Fake to be removed!", false);
-
}
-
@Test
public void ignoreLicense() throws Exception {
Modified: trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.header.transformer;
import org.junit.After;
Modified: trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/test/java/org/nuiton/license/plugin/model/LicenseRepositoryTest.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.model;
import org.junit.Assert;
Modified: trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java 2010-04-09 18:43:24 UTC (rev 1726)
+++ trunk/src/test/java/org/nuiton/license/plugin/model/LicenseStoreTest.java 2010-04-09 19:58:48 UTC (rev 1727)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
package org.nuiton.license.plugin.model;
import org.junit.Assert;
1
0
r1726 - in trunk/src/it/update-license: . src/main/java/org/nuiton/license/plugin/test
by tchemit@users.nuiton.org 09 Apr '10
by tchemit@users.nuiton.org 09 Apr '10
09 Apr '10
Author: tchemit
Date: 2010-04-09 20:43:24 +0200 (Fri, 09 Apr 2010)
New Revision: 1726
Log:
improve it test
Added:
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java
Modified:
trunk/src/it/update-license/verify.groovy
Added: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java
===================================================================
--- trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java (rev 0)
+++ trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java 2010-04-09 18:43:24 UTC (rev 1726)
@@ -0,0 +1,18 @@
+/*
+ * %%Ignore-License
+ *
+ * yet another license
+ *
+ * Copyright (C) 2000 Codelutin Do not update!
+ */
+
+/**
+ * this class owns a ignore license header and will not be updated.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+package org.nuiton.license.plugin.test;
+
+public class MyBean3 {
+}
Property changes on: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean3.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Modified: trunk/src/it/update-license/verify.groovy
===================================================================
--- trunk/src/it/update-license/verify.groovy 2010-04-09 18:35:55 UTC (rev 1725)
+++ trunk/src/it/update-license/verify.groovy 2010-04-09 18:43:24 UTC (rev 1726)
@@ -13,4 +13,12 @@
assert content.contains( 'do NOT update!' );
assert !content.contains( 'Fake to be removed!' );
+file = new File(basedir, 'src/main/java/org/nuiton/license/plugin/test/MyBean3.java');
+assert file.exists();
+
+content = file.text;
+assert content.contains( ' * %%Ignore-License' );
+assert content.contains( ' * yet another license' );
+assert content.contains( ' * Copyright (C) 2000 Codelutin Do not update!' );
+
return true;
1
0
r1725 - in trunk: . src/main/java/org/nuiton/license/plugin src/main/resources src/site src/site/rst
by tchemit@users.nuiton.org 09 Apr '10
by tchemit@users.nuiton.org 09 Apr '10
09 Apr '10
Author: tchemit
Date: 2010-04-09 20:35:55 +0200 (Fri, 09 Apr 2010)
New Revision: 1725
Log:
- add comment-style-list goal
- deprecates generator-list goal
- clean log configuration
- begin documentation
Added:
trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
trunk/src/site/rst/header.rst
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
trunk/src/main/resources/log4j.properties
trunk/src/site/rst/index.rst
trunk/src/site/rst/usage.rst
trunk/src/site/site_en.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/pom.xml 2010-04-09 18:35:55 UTC (rev 1725)
@@ -3,481 +3,486 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <!-- ************************************************************* -->
- <!-- *** POM Relationships *************************************** -->
- <!-- ************************************************************* -->
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
- <parent>
- <groupId>org.nuiton</groupId>
- <artifactId>mavenpom4redmine</artifactId>
- <version>2.0.7</version>
- </parent>
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mavenpom4redmine</artifactId>
+ <version>2.0.7</version>
+ </parent>
- <artifactId>maven-license-plugin</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <artifactId>maven-license-plugin</artifactId>
+ <version>2.1-SNAPSHOT</version>
- <dependencies>
+ <dependencies>
- <dependency>
- <groupId>org.nuiton.processor</groupId>
- <artifactId>nuiton-processor</artifactId>
- <version>${processor.version}</version>
- <scope>compile</scope>
- </dependency>
+ <dependency>
+ <groupId>org.nuiton.processor</groupId>
+ <artifactId>nuiton-processor</artifactId>
+ <version>${processor.version}</version>
+ <scope>compile</scope>
+ </dependency>
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <version>${helper.version}</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact</artifactId>
- </exclusion>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <version>${helper.version}</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact-manager</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-profile</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-settings</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-mail-sender-simple</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-simple</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-mail-sender-api</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-api</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-mail-sender-javamail</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-javamail</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.sonatype.plexus</groupId>
- <artifactId>plexus-cipher</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-cipher</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.sonatype.plexus</groupId>
- <artifactId>plexus-sec-dispatcher</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ </exclusion>
- </exclusions>
- </dependency>
+ </exclusions>
+ </dependency>
- <!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas -->
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.5.15</version>
- <scope>compile</scope>
- </dependency>
+ <!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas -->
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.5.15</version>
+ <scope>compile</scope>
+ </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>${maven.version}</version>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>${maven.version}</version>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-velocity</artifactId>
- <version>1.1.7</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>velocity</groupId>
- <artifactId>velocity</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.1.7</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
- <!-- tests dependencies -->
+ <!-- tests dependencies -->
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <version>${helper.version}</version>
- <scope>test</scope>
- <classifier>tests</classifier>
- <exclusions>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <version>${helper.version}</version>
+ <scope>test</scope>
+ <classifier>tests</classifier>
+ <exclusions>
- <exclusion>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-dependency-tree</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-dependency-tree</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-mail-sender-simple</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-simple</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-mail-sender-api</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-api</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-mail-sender-javamail</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-javamail</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.sonatype.plexus</groupId>
- <artifactId>plexus-cipher</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-cipher</artifactId>
+ </exclusion>
- <exclusion>
- <groupId>org.sonatype.plexus</groupId>
- <artifactId>plexus-sec-dispatcher</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ </exclusion>
- </exclusions>
- </dependency>
+ </exclusions>
+ </dependency>
- <dependency>
- <groupId>org.apache.maven.plugin-testing</groupId>
- <artifactId>maven-plugin-testing-harness</artifactId>
- <version>1.2</version>
- <scope>test</scope>
- <exclusions>
+ <dependency>
+ <groupId>org.apache.maven.plugin-testing</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ <exclusions>
- <exclusion>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-monitor</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-file</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-http-lightweight</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-archiver</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ </exclusion>
- </exclusions>
- </dependency>
+ </exclusions>
+ </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
- </dependencies>
+ </dependencies>
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
- <name>Maven License Plugin</name>
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Maven License Plugin</name>
- <description>
- Plugin pour mettre à jour l'en-tête des fichiers (avec la license
- choisie)
- dans un module maven 2.
- </description>
- <inceptionYear>2008</inceptionYear>
- <url>http://maven-site.nuiton.org/maven-license-plugin</url>
+ <description>
+ Plugin pour mettre à jour l'en-tête des fichiers (avec la license
+ choisie)
+ dans un module maven 2.
+ </description>
+ <inceptionYear>2008</inceptionYear>
+ <url>http://maven-site.nuiton.org/maven-license-plugin</url>
- <developers>
+ <developers>
- <developer>
- <name>Tony Chemit</name>
- <id>tchemit</id>
- <email>chemit(a)codelutin.com</email>
- <organization>CodeLutin</organization>
- <timezone>+2</timezone>
- <roles>
- <role>Développeur</role>
- </roles>
- </developer>
- </developers>
+ <developer>
+ <name>Tony Chemit</name>
+ <id>tchemit</id>
+ <email>chemit(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ </developers>
- <!-- ************************************************************* -->
- <!-- *** Build Environment ************************************** -->
- <!-- ************************************************************* -->
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
- <!-- Source control management. -->
- <scm>
- <connection>
- scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk
- </connection>
- <developerConnection>
- scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk
- </developerConnection>
- <url>
- http://www.nuiton.org/repositories/browse/maven-license-plugin/trunk
- </url>
- </scm>
+ <!-- Source control management. -->
+ <scm>
+ <connection>
+ scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk
+ </connection>
+ <developerConnection>
+ scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk
+ </developerConnection>
+ <url>
+ http://www.nuiton.org/repositories/browse/maven-license-plugin/trunk
+ </url>
+ </scm>
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
- <packaging>maven-plugin</packaging>
+ <packaging>maven-plugin</packaging>
- <properties>
+ <properties>
- <processor.version>1.0.2</processor.version>
- <helper.version>1.2.3-SNAPSHOT</helper.version>
- <mdoVersion>1.0.0</mdoVersion>
-
- <!-- documentation is in english -->
- <siteLocales>en</siteLocales>
+ <processor.version>1.0.2</processor.version>
+
+ <!-- TODO Remove this when mavenpom greater than 2.8 -->
+ <helper.version>1.2.3-SNAPSHOT</helper.version>
- </properties>
+ <!-- version of project license descriptor model -->
+ <mdoVersion>1.0.0</mdoVersion>
- <build>
+ <!-- documentation is in english -->
+ <siteLocales>en</siteLocales>
- <plugins>
+ </properties>
- <!-- generate descriptor model + reader -->
- <plugin>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-maven-plugin</artifactId>
- <version>1.0</version>
- <configuration>
- <version>${mdoVersion}</version>
- <lineLength>80</lineLength>
- <useJava5>true</useJava5>
- </configuration>
- <executions>
- <execution>
- <id>mdo</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>xpp3-reader</goal>
- <goal>xpp3-writer</goal>
- <goal>java</goal>
- <goal>xsd</goal>
- </goals>
- <configuration>
- <models>
- <model>src/main/mdo/descriptor.mdo</model>
- </models>
- </configuration>
- </execution>
- <execution>
- <id>mdo-site</id>
- <phase>pre-site</phase>
- <goals>
- <goal>xdoc</goal>
- <goal>xsd</goal>
- </goals>
- <configuration>
- <models>
- <model>src/main/mdo/descriptor.mdo</model>
- </models>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- expose new plexus components -->
- <plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>generate-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <build>
- <plugin>
- <artifactId>maven-plugin-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>helpmojo</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <!-- TC-20100117 : 1.3 does not works here -->
- <version>1.2</version>
- <executions>
- <!-- copy generated xsd to site -->
- <execution>
- <id>copy licenProject.xsd</id>
- <phase>pre-site</phase>
- <configuration>
- <tasks>
- <copy verbose="${maven.verbose}"
- failonerror="false"
- overwrite="false"
- file="target/generated-site/xsd/licenseProject-1.0.0.xsd"
- tofile="target/site/licenseProject-1.0.0.xsd"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <!-- generate descriptor model + reader -->
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <version>${mdoVersion}</version>
+ <lineLength>80</lineLength>
+ <useJava5>true</useJava5>
+ </configuration>
+ <executions>
+ <execution>
+ <id>mdo</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>xpp3-reader</goal>
+ <goal>xpp3-writer</goal>
+ <goal>java</goal>
+ <goal>xsd</goal>
+ </goals>
+ <configuration>
+ <models>
+ <model>src/main/mdo/descriptor.mdo</model>
+ </models>
+ </configuration>
+ </execution>
+ <execution>
+ <id>mdo-site</id>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>xdoc</goal>
+ <goal>xsd</goal>
+ </goals>
+ <configuration>
+ <models>
+ <model>src/main/mdo/descriptor.mdo</model>
+ </models>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- </plugins>
+ <!-- expose new plexus components -->
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- <pluginManagement>
- <plugins>
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- <plugin>
- <artifactId>maven-site-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.nuiton.jrst</groupId>
- <artifactId>doxia-module-jrst</artifactId>
- <version>${jrst.version}</version>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <!-- TC-20100117 : 1.3 does not works here -->
+ <version>1.2</version>
+ <executions>
+ <!-- copy generated xsd to site -->
+ <execution>
+ <id>copy licenProject.xsd</id>
+ <phase>pre-site</phase>
+ <configuration>
+ <tasks>
+ <copy verbose="${maven.verbose}"
+ failonerror="false"
+ overwrite="false"
+ file="target/generated-site/xsd/licenseProject-1.0.0.xsd"
+ tofile="target/site/licenseProject-1.0.0.xsd"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- </plugins>
- </pluginManagement>
+ </plugins>
- </build>
+ <pluginManagement>
+ <plugins>
- <reporting>
- <plugins>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton.jrst</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>${jrst.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </plugin>
- <plugin>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>2.5.1</version>
- </plugin>
+ </plugins>
+ </pluginManagement>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.3</version>
- </plugin>
+ </build>
- </plugins>
- </reporting>
+ <reporting>
+ <plugins>
- <profiles>
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
- <profile>
- <id>run-its</id>
- <build>
- <defaultGoal>integration-test</defaultGoal>
- <plugins>
- <plugin>
- <artifactId>maven-invoker-plugin</artifactId>
- <configuration>
- <pomIncludes>
- <pomInclude>**/pom.xml</pomInclude>
- </pomIncludes>
- <postBuildHookScript>verify</postBuildHookScript>
- <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
- <settingsFile>src/it/settings.xml</settingsFile>
- <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
- <!--<debug>true</debug>-->
- </configuration>
- <executions>
- <execution>
- <id>integration-test</id>
- <goals>
- <goal>install</goal>
- <goal>run</goal>
- </goals>
- <phase>integration-test</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
- </profiles>
+ </plugins>
+ </reporting>
+ <profiles>
+
+ <profile>
+ <id>run-its</id>
+ <build>
+ <defaultGoal>integration-test</defaultGoal>
+ <plugins>
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <pomIncludes>
+ <pomInclude>**/pom.xml</pomInclude>
+ </pomIncludes>
+ <postBuildHookScript>verify</postBuildHookScript>
+ <localRepositoryPath>${basedir}/target/local-repo
+ </localRepositoryPath>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
+ <!--<debug>true</debug>-->
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>install</goal>
+ <goal>run</goal>
+ </goals>
+ <phase>integration-test</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
</project>
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-04-09 18:35:55 UTC (rev 1725)
@@ -126,7 +126,12 @@
@Override
protected void init() throws Exception {
+ if (getLog().isDebugEnabled()) {
+ // always be verbose in debug mode
+ setVerbose(true);
+ }
+
// must generate if file does not exist
doGenerate = true;
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-04-09 18:35:55 UTC (rev 1725)
@@ -173,7 +173,12 @@
@Override
protected void init() throws Exception {
+ if (getLog().isDebugEnabled()) {
+ // always be verbose in debug mode
+ setVerbose(true);
+ }
+
doGenerate = true;
thirdPartyFile = new File(outputDirectory, thirdPartyFilename);
Added: trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-04-09 18:35:55 UTC (rev 1725)
@@ -0,0 +1,87 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.nuiton.license.plugin.header.transformer.FileHeaderTransformer;
+
+import java.util.Map;
+import java.util.Map.Entry;
+
+/**
+ * Displays all the available comment style to box file headers.
+ *
+ * @author themit <chemit(a)codelutin.com>
+ * @requiresProject false
+ * @requiresDirectInvocation
+ * @goal comment-style-list
+ * @since 2.1
+ */
+public class CommentStyleListMojo extends AbstractLicenseMojo {
+
+ /**
+ * Un drapeau pour afficher aussi le contenu des license.
+ *
+ * @parameter expression="${detail}"
+ * @since 2.1
+ */
+ protected boolean detail;
+
+ /**
+ * All available header transformers.
+ *
+ * @component role="org.nuiton.license.plugin.header.transformer.FileHeaderTransformer"
+ * @since 2.1
+ */
+ protected Map<String, FileHeaderTransformer> transformers;
+
+ @Override
+ protected void init() throws Exception {
+ //nothing to do
+ }
+
+ @Override
+ public void doAction() throws MojoExecutionException, MojoFailureException {
+
+ StringBuilder buffer = new StringBuilder("\n");
+ buffer.append("\n\n-------------------------------------------------------------------------------\n");
+ buffer.append(" maven-license-plugin\n");
+ buffer.append("-------------------------------------------------------------------------------\n\n");
+
+ buffer.append("List of available comment style:\n\n");
+ for (Entry<String, FileHeaderTransformer> e : transformers.entrySet()) {
+ FileHeaderTransformer generator = e.getValue();
+ buffer.append(" - ");
+ buffer.append(e.getKey());
+ buffer.append(" : ");
+ buffer.append(generator.getDescription());
+ buffer.append("\n");
+ if (detail) {
+ buffer.append("\n example : \n");
+ buffer.append(generator.boxComment("header", true));
+ buffer.append('\n');
+ }
+ }
+
+ getLog().info(buffer.toString());
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Modified: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-04-09 18:35:55 UTC (rev 1725)
@@ -35,7 +35,9 @@
* @requiresDirectInvocation
* @goal generator-list
* @since 1.0.1
+ * @deprecated since 2.1, use now the {@code comment(style-list} goal.
*/
+@Deprecated
public class GeneratorListMojo extends AbstractLicenseMojo {
/**
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-04-09 18:35:55 UTC (rev 1725)
@@ -59,6 +59,7 @@
@Override
protected void init() throws Exception {
+
// obtain licenses store
licenseStore = createLicenseStore(extraResolver);
}
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 18:35:55 UTC (rev 1725)
@@ -148,6 +148,7 @@
/** descriptor of project */
protected LicenseProject licenseProject;
+ /** set of processed files */
protected Set<File> processedFiles;
@Override
@@ -171,8 +172,26 @@
return;
}
+ if (isVerbose()) {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append("config - available comment styles :");
+ String commentFormat = "\n * %1$s (%2$s)";
+ for (Map.Entry<String, FileHeaderTransformer> e :
+ transformers.entrySet()) {
+ Map.Entry<String, FileHeaderTransformer> next = e;
+ FileHeaderTransformer transformer = next.getValue();
+ String str = String.format(commentFormat,
+ transformer.getName(),
+ transformer.getDescription()
+ );
+ buffer.append(str);
+ }
+ getLog().info(buffer.toString());
+ }
+
if (updateCopyright) {
+ getLog().warn("updateCopyright is not still available...");
//TODO-TC20100409 checks scm
// checks scm is ok
// for the moment, will only deal with svn except if scm
Modified: trunk/src/main/resources/log4j.properties
===================================================================
--- trunk/src/main/resources/log4j.properties 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/main/resources/log4j.properties 2010-04-09 18:35:55 UTC (rev 1725)
@@ -7,4 +7,4 @@
# package level
-log4j.logger.org.nuiton=INFO
+log4j.logger.org.nuiton=WARN
Added: trunk/src/site/rst/header.rst
===================================================================
--- trunk/src/site/rst/header.rst (rev 0)
+++ trunk/src/site/rst/header.rst 2010-04-09 18:35:55 UTC (rev 1725)
@@ -0,0 +1,126 @@
+License Header
+~~~~~~~~~~~~~~
+
+
+:Author: Tony Chemit <chemit(a)codelutin.com>
+
+.. contents::
+ :depth: 2
+
+.. sectnum::
+ :start: 1
+ :depth: 2
+
+Abstract
+========
+
+This document describes the file header model introduced in version 2.1.
+
+You will learn how to customize it and use it with the goal `update-license`_.
+
+Header model
+============
+
+Example
+-------
+
+Here is an example of a file header (with NO comment box) :
+
+::
+
+ (1) #%L
+ (2) Project description
+ (3) --
+ (4) Copyright (C) 2010 your organization
+ (5) --
+ (6) License content
+ (7) #L%
+
+ * (1) the start process tag used to detect begin of header (NEVER suppress it).
+ * (2) Project description section
+ * (3) Header section delimiter
+ * (4) Copyright section of the file (see next section for detail)
+ * (5) Header section delimiter
+ * (6) License section
+ * (7) the end process tag used to detect end of header (NEVER suppress it).
+
+Configuration
+-------------
+
+You can configure those things :
+
+ * start process tag
+ * header section delimiter
+ * end process tag
+
+Copyright model
+---------------
+
+Copyright section must exactly be of this form :
+
+::
+ Copyright (C) firstYear[ - lastYear] holder
+
+If *firstYear* and *lastYear* are the same then lastYear is omitted.
+
+Comment box
+-----------
+
+In a file, we must box the file header in a comment. In the descriptor file
+you can customize it by choosing a headerType.
+
+Available comment type
+======================
+
+Here is the available comment types.
+
+Using the goal `comment-style-list`_ you can find all of them.
+
+java style
+----------
+
+/*
+ * HEADER
+ */
+
+xml style
+---------
+
+<!--
+ HEADER
+-->
+
+properties style
+----------------
+
+######
+# HEADER
+######
+
+apt style
+---------
+
+~~~~~~
+~~ HEADER
+~~~~~~
+
+rst style
+---------
+
+TODO-TC20100409 Add rst implementation
+
+Ignore a header
+===============
+
+If you don't want `update-license` goal to treate a specific file, you can
+use a specific tag in your class :
+
+::
+
+ %%License-Ignore
+
+You can change it with **ignoreTag** property.
+
+.. _update-license: update-license-mojo.html
+
+.. _comment-style-list: comment-style-list-mojo.html
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/site/rst/index.rst 2010-04-09 18:35:55 UTC (rev 1725)
@@ -1,6 +1,15 @@
Introduction
------------
+:Author: Tony Chemit <chemit(a)codelutin.com>
+
+.. contents::
+ :depth: 2
+
+.. sectnum::
+ :start: 1
+ :depth: 2
+
Maven license Plugin
====================
@@ -16,7 +25,7 @@
::
- %L Content L%
+ #%L Content #L%
The header is composed of two parts :
@@ -29,7 +38,7 @@
::
/*
- * %L
+ * #%L
* Plugin maven de changement de license
* --
* Copyright (C) 2008 - 2009 CodeLutin
@@ -47,7 +56,7 @@
* 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%
+ * #L%
*/
Goals Overview
Modified: trunk/src/site/rst/usage.rst
===================================================================
--- trunk/src/site/rst/usage.rst 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/site/rst/usage.rst 2010-04-09 18:35:55 UTC (rev 1725)
@@ -1,6 +1,16 @@
Usage
-----
+:Author: Tony Chemit <chemit(a)codelutin.com>
+
+.. contents::
+ :depth: 2
+
+.. sectnum::
+ :start: 1
+ :depth: 2
+
+
add-license goal
================
@@ -56,13 +66,28 @@
update-header goal
==================
+**This goal is deprectaed since v 2.1**
+
+Prefer use now the **update-license** goal.
+
This goal adds or updates the license header on some files.
for full detail see `update-header`_ detail page.
+update-license goal
+===================
+
+This goal adds or updates the license header on some files using a xml
+descriptor file to describe all files to include in license process for a whole
+module.
+
+for full detail see `update-license`_ detail page.
+
How does it work ?
~~~~~~~~~~~~~~~~~~
+TODO-TC20100409 This is correct since 2.1 (redo a complete doc before 2.2)
+
The plugin is looking in the included files for the text between the tags :
::
@@ -295,6 +320,8 @@
.. _update-header: update-header-mojo.html
+.. _update-license: update-license-mojo.html
+
.. _generator-list: generator-list-mojo.html
.. _license-list: license-list-mojo.html
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2010-04-09 16:59:32 UTC (rev 1724)
+++ trunk/src/site/site_en.xml 2010-04-09 18:35:55 UTC (rev 1725)
@@ -21,47 +21,56 @@
-->
<project name="${project.name}">
- <bannerLeft>
- <name>${project.name}</name>
- <href>index.html</href>
- </bannerLeft>
+ <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>
+ <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>
+ <body>
- <breadcrumbs>
- <item name="${project.name}" href="index.html" />
- </breadcrumbs>
+ <breadcrumbs>
+ <item name="${project.name}" href="index.html"/>
+ </breadcrumbs>
- <menu name="User">
- <item name="Introduction" href="index.html"/>
- <item name="Usage" href="usage.html"/>
- <item name="Goals" href="plugin-info.html">
- <item name="add-license" href="add-license-mojo.html"/>
- <item name="add-third-party" href="add-third-party-mojo.html"/>
- <item name="update-header" href="update-header-mojo.html"/>
- <item name="generator-list" href="generator-list-mojo.html"/>
- <item name="license-list" href="license-list-mojo.html"/>
- <item name="help" href="help-mojo.html"/>
- </item>
- </menu>
-
- <menu name="Downloads">
- <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 name="User">
+ <item name="Introduction" href="index.html"/>
+ <item name="File header model" href="header.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="Goals" href="plugin-info.html">
+ <item name="add-license" href="add-license-mojo.html"/>
+ <item name="add-third-party" href="add-third-party-mojo.html"/>
+ <item name="update-header" href="update-header-mojo.html"/>
+ <item name="generator-list" href="generator-list-mojo.html"/>
+ <item name="license-list" href="license-list-mojo.html"/>
+ <item name="help" href="help-mojo.html"/>
+ </item>
+ </menu>
- <menu ref="reports"/>
+ <menu name="Downloads">
+ <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>
- </body>
+ <menu ref="reports"/>
+
+ </body>
</project>
1
0
Author: tchemit
Date: 2010-04-09 18:59:32 +0200 (Fri, 09 Apr 2010)
New Revision: 1724
Log:
reformat xml + add unit test for UpdateLicenseMojo
Added:
trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
Modified:
trunk/src/it/settings.xml
trunk/src/it/update-license/src/license/project.xml
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
Modified: trunk/src/it/settings.xml
===================================================================
--- trunk/src/it/settings.xml 2010-04-09 10:09:45 UTC (rev 1723)
+++ trunk/src/it/settings.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -21,36 +21,36 @@
<settings>
- <profiles>
- <profile>
- <id>it-repo</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <repositories>
- <repository>
- <id>local.central</id>
- <url>file:///@localRepository@</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>local.central</id>
- <url>file:///@localRepository@</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
+ <profiles>
+ <profile>
+ <id>it-repo</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.central</id>
+ <url>file:///@localRepository@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local.central</id>
+ <url>file:///@localRepository@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
</settings>
Modified: trunk/src/it/update-license/src/license/project.xml
===================================================================
--- trunk/src/it/update-license/src/license/project.xml 2010-04-09 10:09:45 UTC (rev 1723)
+++ trunk/src/it/update-license/src/license/project.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -2,19 +2,19 @@
<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/licenseProject-1.0.0.xsd">
- <mainLicense>gpl_v3</mainLicense>
- <licenseSets>
- <licenseSet>
- <licenseName>gpl_v3</licenseName>
- <fileSets>
- <fileSet>
- <headerType>java</headerType>
- <basedir>src/main/java</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </licenseSet>
- </licenseSets>
+ <mainLicense>gpl_v3</mainLicense>
+ <licenseSets>
+ <licenseSet>
+ <licenseName>gpl_v3</licenseName>
+ <fileSets>
+ <fileSet>
+ <headerType>java</headerType>
+ <basedir>src/main/java</basedir>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </licenseSet>
+ </licenseSets>
</project>
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 10:09:45 UTC (rev 1723)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -46,37 +46,62 @@
protected File descriptor;
/**
- * l'annee de creation du module (sera place dans le header)
+ * Name of project (or module).
+ * <p/>
+ * Will be used as description section of new header.
*
- * @parameter expression="${license.inceptionYear}" default-value="${project.inceptionYear}"
+ * @parameter expression="${license.projectName}" default-value="${project.name}"
* @required
* @since 2.1
*/
- protected String inceptionYear;
+ protected String projectName;
/**
- * le nom de l'organisation (sera place dans le header)
+ * Name of project's organization.
+ * <p/>
+ * Will be used as copyrigth's holder in new header.
*
- * @parameter expression="${license.organizationName}"
- * default-value="${project.organization.name}"
+ * @parameter expression="${license.organizationName}" default-value="${project.organization.name}"
* @required
* @since 2.1
*/
protected String organizationName;
/**
- * le nom du projet (sera place dans le header)
+ * Inception year of the project.
+ * <p/>
+ * Will be used as first year of copyright section in new header.
*
- * @parameter expression="${license.projectName}" default-value="${project.name}"
+ * @parameter expression="${license.inceptionYear}" default-value="${project.inceptionYear}"
* @required
* @since 2.1
*/
- protected String projectName;
+ protected String inceptionYear;
/**
- * To specify an external licenses repository resolver (says the base url
- * of the repository).
+ * A flag to update copyright application time (change copyright last year
+ * if required) according to the last commit made on the processed file.
*
+ * @parameter expression="${license.updateCopyright}" default-value="false"
+ * @since 2.1
+ */
+ protected boolean updateCopyright;
+
+ /**
+ * A tag to place on files that will be ignored by the plugin.
+ * <p/>
+ * Sometimes, it is necessary to do this when file is under a specific license.
+ *
+ * @parameter expression="${license.ignoreTag}" default-value="%%Ignore-License"
+ * @since 2.1
+ */
+ protected String ignoreTag;
+
+
+ /**
+ * To specify an external extra licenses repository resolver (says the base
+ * url of the repository where the {@code license.properties} is present).
+ *
* @parameter expression="${license.licenseResolver}"
* @since 2.1
*/
@@ -123,6 +148,8 @@
/** descriptor of project */
protected LicenseProject licenseProject;
+ protected Set<File> processedFiles;
+
@Override
protected boolean checkSkip() {
if (skipUpdateLicense) {
@@ -133,23 +160,34 @@
}
@Override
- protected void init() throws Exception {
+ public void init() throws Exception {
if (getLog().isDebugEnabled()) {
// always be verbose in debug mode
setVerbose(true);
}
- if (skipUpdateLicense) {
+ if (isSkipUpdateLicense()) {
return;
}
- timestamp = System.nanoTime();
+ if (updateCopyright) {
+
+ //TODO-TC20100409 checks scm
+ // checks scm is ok
+ // for the moment, will only deal with svn except if scm
+ // offers a nice api to obtain last commit date on a file
+
+ }
+
+ // set timestamp used for temporary files
+ setTimestamp(System.nanoTime());
+
// init licenses store
licenseStore = createLicenseStore(licenseResolver);
// load project descriptor
- FileReader reader = new FileReader(descriptor);
+ FileReader reader = new FileReader(getDescriptor());
try {
licenseProject = new LicenseProjectXpp3Reader().read(reader);
} finally {
@@ -157,12 +195,13 @@
}
// check that license project is sane (known licenses + header types)
- // + populate default license name in LicenseSet (with main License)
- validateProjectfile(licenseProject, licenseStore, transformers);
+ // + populate default license name in LicenseSet (with main License) if
+ // none given for licenseSet
+ validateProjectFile(licenseProject, licenseStore, transformers);
}
@Override
- protected void doAction() throws Exception {
+ public void doAction() throws Exception {
// create a file header processor which updates license content only
FileHeaderProcessor processor = new FileHeaderProcessor() {
@@ -171,10 +210,15 @@
public FileHeaderFilter newFilter(
FileHeader header, FileHeaderTransformer transformer) {
- return new UpdateLicenseHeaderFilter(header, transformer);
+ return new UpdateLicenseHeaderFilter(header,
+ transformer,
+ isUpdateCopyright()
+ );
}
};
+ processedFiles = new HashSet<File>();
+
for (LicenseSet licenseSet : licenseProject.getLicenseSets()) {
// obtain license from definition
@@ -182,7 +226,7 @@
License license = licenseStore.getLicense(licenseName);
if (isVerbose()) {
- getLog().info("process license \n" + license.getDescription());
+ getLog().info("process " + license.getDescription());
}
// file header to use if no header is found on a file
@@ -200,6 +244,10 @@
for (FileSet fileSet : licenseSet.getFileSets()) {
File basedir = new File(getProject().getBasedir(),
fileSet.getBasedir());
+ if (isVerbose()) {
+ getLog().info("process file set with basedir : " + basedir);
+ }
+
List<String> includes = fileSet.getIncludes();
if (includes.isEmpty()) {
@@ -230,76 +278,92 @@
// treate all files of entry
for (Map.Entry<File, String[]> entry : filestoTreate.entrySet()) {
File entryBasedir = entry.getKey();
- getLog().info("start entry \n" + entryBasedir);
+ getLog().info("process entry " + entryBasedir);
String[] paths = entry.getValue();
getLog().info(paths.length + " file(s) to treate.");
for (String path : paths) {
File file = new File(entryBasedir, path);
+ if (getProcessedFiles().contains(file)) {
+ getLog().info("skip already processed file " + file);
+ continue;
+ }
+ getProcessedFiles().add(file);
updateFile(processor, file);
}
}
}
}
+ if (getProcessedFiles() != null) {
+ getLog().info(getProcessedFiles().size() + " file(s) were treated.");
+ }
}
public void updateFile(FileHeaderProcessor processor,
File file) throws IOException {
- getLog().debug("scan file " + file);
+ getLog().debug("start for file " + file);
+
// file where to write result
- File processFile = new File(file.getAbsolutePath() + "_" +
- timestamp);
+ File processFile = new File(file.getAbsolutePath() + "_" + getTimestamp());
+ getLog().debug("will process into file " + processFile);
if (isVerbose()) {
getLog().info("process file " + file);
}
try {
+
processor.process(file, processFile);
- boolean touched = processor.isTouched();
- if (touched) {
+ if (processor.isTouched()) {
- getLog().info("header was updated for " + file);
- } else {
- if (processor.isDetectHeader()) {
- getLog().warn(
- "skip file " + file +
- " (no license footer tag found : '##%*' !)");
- } else {
+ if (isVerbose()) {
+ getLog().info("header was updated for " + file);
+ }
- // no license header found in file, add it
- getLog().info("adding license header on file " + file);
- String content = PluginHelper.readAsString(
- file,
- getEncoding()
- );
+ finalizeFile(file, processFile);
+ return;
+ }
- //FIXME-TC-20100409 form xml files must add header after a xml prolog line
- content = processor.getFullHeaderContent() + content;
- if (!dryRun) {
- writeFile(processFile, content, getEncoding());
- }
- }
+ if (processor.isDetectHeader()) {
+
+ // file has not a valid header (found a start process atg, but
+ // not an ending one), can not do anything
+ getLog().warn(
+ "skip file " + file +
+ " (no license footer tag found : '##%*' !)");
+
+ deleteFile(processFile);
+ return;
}
- if (keepBackup && !dryRun) {
- File backupFile = new File(file.getAbsolutePath() + "~");
- if (isVerbose()) {
- getLog().debug("backup original file " + file);
- }
- renameFile(file, backupFile);
- }
- if (dryRun) {
+ // file has no header dealed by the plugin
+
+ String content = PluginHelper.readAsString(file, getEncoding());
+
+ //check that file is not marked to be ignored
+ if (content.contains(getIgnoreTag())) {
+ getLog().info("ignore file (using " + getIgnoreTag() + ")");
+
deleteFile(processFile);
- } else {
- renameFile(processFile, file);
+ return;
}
+ // no header and not marked to be ignored : add a new header
+ getLog().info("adding license header on file " + file);
+
+ //FIXME-TC-20100409 form xml files must add header after a xml prolog line
+ content = processor.getFullHeaderContent() + content;
+ if (!isDryRun()) {
+ writeFile(processFile, content, getEncoding());
+ }
+
+ finalizeFile(file, processFile);
+
} catch (Exception e) {
getLog().warn(
"skip file " + file + " (could not process " +
- "for reason : " + e.getMessage() + ")");
+ "for reason : " + e.getMessage() + ")", e);
deleteFile(processFile);
} finally {
@@ -308,10 +372,43 @@
}
}
+ protected void finalizeFile(File file, File processFile) throws IOException {
+
+ if (isKeepBackup() && !isDryRun()) {
+ File backupFile = new File(file.getAbsolutePath() + "~");
+
+ if (backupFile.exists()) {
+
+ // always delete backup file, before the renaming
+ deleteFile(backupFile);
+ }
+
+ if (isVerbose()) {
+ getLog().debug("backup original file " + file);
+ }
+
+ renameFile(file, backupFile);
+ }
+
+ if (isDryRun()) {
+
+ // dry run, delete temporary file
+ deleteFile(processFile);
+ } else {
+
+ // replace file with
+ renameFile(processFile, file);
+ }
+ }
+
public long getTimestamp() {
return timestamp;
}
+ private File getDescriptor() {
+ return descriptor;
+ }
+
public String getProjectName() {
return projectName;
}
@@ -324,6 +421,14 @@
return organizationName;
}
+ public boolean isUpdateCopyright() {
+ return updateCopyright;
+ }
+
+ public String getIgnoreTag() {
+ return ignoreTag;
+ }
+
public boolean isKeepBackup() {
return keepBackup;
}
@@ -336,6 +441,10 @@
return skipUpdateLicense;
}
+ public Set<File> getProcessedFiles() {
+ return processedFiles;
+ }
+
public void setDryRun(boolean dryRun) {
this.dryRun = dryRun;
}
@@ -364,7 +473,16 @@
this.organizationName = organizationName;
}
- protected void validateProjectfile(
+
+ public void setUpdateCopyright(boolean updateCopyright) {
+ this.updateCopyright = updateCopyright;
+ }
+
+ public void setIgnoreTag(String ignoreTag) {
+ this.ignoreTag = ignoreTag;
+ }
+
+ protected void validateProjectFile(
LicenseProject licenseProject,
LicenseStore licenseStore,
Map<String, FileHeaderTransformer> transformers)
@@ -408,6 +526,17 @@
}
}
+ /**
+ * Build a default header given the parameters.
+ *
+ * @param license the license type ot use in header
+ * @param projectName project name as header description
+ * @param inceptionYear first year of copyright
+ * @param copyrightHolder holder of copyright
+ * @param encoding encoding used to read or write files
+ * @return the new file header
+ * @throws IOException if any problem while creating file header
+ */
protected FileHeader buildDefaultFileHeader(
License license,
String projectName,
@@ -416,9 +545,13 @@
String encoding) throws IOException {
FileHeader result = new FileHeader();
result.setDescription(projectName);
- result.setLicense(license.getHeaderContent(encoding));
+
+ String licenseContent = license.getHeaderContent(encoding);
+ result.setLicense(licenseContent);
+
Integer firstYear = Integer.valueOf(inceptionYear);
result.setCopyrightFirstYear(firstYear);
+
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
Integer lastYear = cal.get(Calendar.YEAR);
@@ -431,9 +564,12 @@
public class UpdateLicenseHeaderFilter extends FileHeaderFilter {
+ protected final boolean updateCopyright;
+
public UpdateLicenseHeaderFilter(FileHeader header,
- FileHeaderTransformer transformer) {
+ FileHeaderTransformer transformer, boolean updateCopyright) {
super(header, transformer);
+ this.updateCopyright = updateCopyright;
}
@Override
@@ -450,8 +586,15 @@
// updates license
fileHeader.setLicense(header.getLicense());
+ if (updateCopyright) {
+ // 1) obtain the svn last comit on this file
+
+ // 2) compute the last year of copyright
+
+ // 3) if necessary update last year
+ //fileHeader.setCopyrightLastYear(lastYear);
+ }
// build new brut header (with no boxing)
-
String newHeader = transformer.toString(fileHeader);
// box with process tag
Modified: trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java 2010-04-09 10:09:45 UTC (rev 1723)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -32,7 +32,12 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-/** @author chemit */
+/**
+ * @author tchemit <chemit àcodelutin.com>
+ * @since 1.0
+ * @deprecated since 2.1, will be remove soon.
+ */
+@Deprecated
public class UpdateHeaderMojoTest extends AbstractMojoTest<UpdateHeaderMojo> {
public static final String _LICENSE_TO_CHANGE_ =
@@ -84,21 +89,33 @@
assertTrue("generated file " + f + " was not found...",
f.exists());
+
String content = PluginHelper.readAsString(f, "utf-8");
if (mojo.isVerbose()) {
mojo.getLog().info("check generated file " + f);
}
for (String p : mandatoryPatterns) {
- checkPattern(content, p, true, f);
+
+ checkPattern(f,content, p, true);
}
for (String p : excludePatterns) {
- checkPattern(content, p, false, f);
+ checkPattern(f, content, p, false);
}
}
}
}
+ /**
+ * @param content
+ * @param pattern
+ * @param required
+ * @param f
+ * @throws IOException
+ * @deprecated since 2.1, prefer use the
+ * {@link #checkPattern(File, String, String, boolean)} method instead.
+ */
+ @Deprecated
protected void checkPattern(String content,
String pattern,
boolean required,
Added: trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,125 @@
+package org.nuiton.license.plugin;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.nuiton.plugin.AbstractMojoTest;
+import org.nuiton.plugin.PluginHelper;
+
+import java.io.File;
+
+/**
+ * Tests the {@link UpdateLicenseMojo}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+public class UpdateLicenseMojoTest extends AbstractMojoTest<UpdateLicenseMojo> {
+ @Override
+ protected String getGoalName(String methodName) {
+ return "update-license";
+ }
+
+ @Test
+ public void addLicense() throws Exception {
+
+ File f = getMyBeanFile("addLicense");
+
+ UpdateLicenseMojo mojo = getMojo();
+ String content;
+
+ content = PluginHelper.readAsString(f, mojo.getEncoding());
+
+ // check no header
+ checkPattern(f, content, "Copyright (C) 2010", false);
+ checkPattern(f, content, "Project name : maven-license-plugin-java", false);
+ checkPattern(f, content, "Organization is CodeLutin", false);
+
+ mojo.execute();
+ Assert.assertEquals(1, mojo.getProcessedFiles().size());
+
+ content = PluginHelper.readAsString(f, mojo.getEncoding());
+
+ // check header
+ checkPattern(f, content, "Copyright (C) 2010", true);
+ checkPattern(f, content, "Project name : maven-license-plugin-java", true);
+ checkPattern(f, content, "Organization is CodeLutin", true);
+ }
+
+ @Test
+ public void updateLicense() throws Exception {
+
+ File f = getMyBeanFile("updateLicense");
+
+ UpdateLicenseMojo mojo = getMojo();
+
+ String content;
+
+ content = PluginHelper.readAsString(f, mojo.getEncoding());
+
+ // check header
+ checkPattern(f, content, "Copyright (C) 2000 Codelutin do NOT update!", true);
+ checkPattern(f, content, "License Test :: do NOT update!", true);
+ checkPattern(f, content, "Fake to be removed!", true);
+
+ mojo.execute();
+ Assert.assertEquals(1, mojo.getProcessedFiles().size());
+
+ content = PluginHelper.readAsString(f, mojo.getEncoding());
+
+ // check header (description + copyright) does not changed
+ checkPattern(f, content, "Copyright (C) 2000 Codelutin do NOT update!", true);
+ checkPattern(f, content, "License Test :: do NOT update!", true);
+
+ // check license changed
+ checkPattern(f, content, "Fake to be removed!", false);
+
+ }
+
+
+ @Test
+ public void ignoreLicense() throws Exception {
+
+ File f = getMyBeanFile("ignoreLicense");
+
+ UpdateLicenseMojo mojo = getMojo();
+
+ String content;
+
+ content = PluginHelper.readAsString(f, mojo.getEncoding());
+
+ // check header
+ checkPattern(f, content, "Copyright (C) 2000 Codelutin Do not update!", true);
+ checkPattern(f, content, " * %%Ignore-License", true);
+ checkPattern(f, content, "yet another license", true);
+ checkPattern(f, content, "NEVER_FINd_ME!", false);
+
+ mojo.execute();
+ Assert.assertEquals(1, mojo.getProcessedFiles().size());
+
+ content = PluginHelper.readAsString(f, mojo.getEncoding());
+
+ // check header (description + copyright) does not changed
+ checkPattern(f, content, "Copyright (C) 2000 Codelutin Do not update!", true);
+ checkPattern(f, content, " * %%Ignore-License", true);
+ checkPattern(f, content, "yet another license", true);
+ checkPattern(f, content, "NEVER_FINd_ME!", false);
+ }
+
+ protected File getMyBeanFile(String testName) {
+ File f = PluginHelper.getFile(getBasedir(),
+ "target",
+ "test-classes",
+ "org",
+ "nuiton",
+ "license",
+ "plugin",
+ "updateLicenseMojoTest",
+ testName,
+ "src",
+ "MyBean.java"
+ );
+ return f;
+ }
+
+
+}
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/UpdateLicenseMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Modified: trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 10:09:45 UTC (rev 1723)
+++ trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -9,9 +9,9 @@
import java.util.regex.Matcher;
import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.COPYRIGHT_PATTERN;
-import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.DEFAULT_PROCESS_END_TAG;
-import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.DEFAULT_PROCESS_START_TAG;
-import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.DEFAULT_SECTION_DELIMITER;
+import static org.nuiton.license.plugin.header.transformer.FileHeaderTransformer.DEFAULT_PROCESS_END_TAG;
+import static org.nuiton.license.plugin.header.transformer.FileHeaderTransformer.DEFAULT_PROCESS_START_TAG;
+import static org.nuiton.license.plugin.header.transformer.FileHeaderTransformer.DEFAULT_SECTION_DELIMITER;
import static org.nuiton.license.plugin.header.transformer.FileHeaderTransformer.LINE_SEPARATOR;
import static org.nuiton.license.plugin.header.transformer.JavaFileHeaderTransformer.*;
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,20 @@
+<?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/licenseProject-1.0.0.xsd">
+ <mainLicense>gpl_v3</mainLicense>
+ <licenseSets>
+ <licenseSet>
+ <licenseName>lgpl_v3</licenseName>
+ <fileSets>
+ <fileSet>
+ <headerType>java</headerType>
+ <basedir>addLicense/src</basedir>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </licenseSet>
+ </licenseSets>
+</project>
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,10 @@
+package org.nuiton.license.plugin.updateLicenseMojoTest.addLicense.src;
+
+/**
+ * this class has no license, a new default one will be added.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+public class MyBean {
+}
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/src/MyBean.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>maven-license-plugin-java</artifactId>
+ <version>0</version>
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Add License to MyBean</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <descriptor>
+ target/test-classes/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
+ </descriptor>
+ <projectName>Project name : maven-license-plugin-java</projectName>
+ <organizationName>Organization is CodeLutin</organizationName>
+ <inceptionYear>2010</inceptionYear>
+ <ignoreTag>NEVER_FINd_ME!</ignoreTag>
+ <encoding>UTF-8</encoding>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>update-license</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,20 @@
+<?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/licenseProject-1.0.0.xsd">
+ <mainLicense>gpl_v3</mainLicense>
+ <licenseSets>
+ <licenseSet>
+ <licenseName>lgpl_v3</licenseName>
+ <fileSets>
+ <fileSet>
+ <headerType>java</headerType>
+ <basedir>ignoreLicense/src</basedir>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </licenseSet>
+ </licenseSets>
+</project>
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,17 @@
+/*
+ * %%Ignore-License
+ *
+ * yet another license
+ *
+ * Copyright (C) 2000 Codelutin Do not update!
+ */
+package org.nuiton.license.plugin.updateLicenseMojoTest.ignoreLicense.src;
+
+/**
+ * this class has no license, a new default one will be added.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+public class MyBean {
+}
\ No newline at end of file
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/src/MyBean.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>maven-license-plugin-java</artifactId>
+ <version>0</version>
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Add License to MyBean</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <descriptor>
+ target/test-classes/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
+ </descriptor>
+ <projectName>NEVER_FINd_ME!</projectName>
+ <organizationName>NEVER_FINd_ME!</organizationName>
+ <inceptionYear>2010</inceptionYear>
+ <ignoreTag>%%Ignore-License</ignoreTag>
+ <encoding>UTF-8</encoding>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>update-license</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,21 @@
+<?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/licenseProject-1.0.0.xsd">
+ <mainLicense>gpl_v3</mainLicense>
+ <licenseSets>
+ <licenseSet>
+ <licenseName>lgpl_v3</licenseName>
+ <fileSets>
+ <fileSet>
+ <headerType>java</headerType>
+ <basedir>updateLicense/src</basedir>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </licenseSet>
+ </licenseSets>
+</project>
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,20 @@
+/*
+ * #%L
+ * License Test :: do NOT update!
+ * --
+ * Copyright (C) 2000 Codelutin do NOT update!
+ * --
+ * Fake to be removed!
+ * #L%
+ */
+
+/**
+ * this class owns a header, only license will be updated.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+package org.nuiton.license.plugin.updateLicenseMojoTest.updateLicense.src;
+
+public class MyBean {
+}
Property changes on: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/src/MyBean.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml 2010-04-09 16:59:32 UTC (rev 1724)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>maven-license-plugin-java</artifactId>
+ <version>0</version>
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Update License to MyBean</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <descriptor>
+ target/test-classes/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
+ </descriptor>
+ <projectName>Project name : maven-license-plugin-java</projectName>
+ <organizationName>Organization is CodeLutin</organizationName>
+ <inceptionYear>2010</inceptionYear>
+ <ignoreTag>NEVER_FINd_ME!</ignoreTag>
+ <encoding>UTF-8</encoding>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>update-license</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
1
0
Author: tchemit
Date: 2010-04-09 12:09:45 +0200 (Fri, 09 Apr 2010)
New Revision: 1723
Log:
remove obsolete directory
Removed:
trunk/src/it/update-header-file/
1
0
09 Apr '10
Author: tchemit
Date: 2010-04-09 12:07:51 +0200 (Fri, 09 Apr 2010)
New Revision: 1722
Log:
- Evolution #478: Deprecates LicenseHeaderGenerator api
- rename update-header-file to update-license
Added:
trunk/src/it/update-license/
trunk/src/it/update-license/pom.xml
trunk/src/it/update-license/src/license/project.xml
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java
trunk/src/it/update-license/verify.groovy
trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
Removed:
trunk/src/it/update-header-file/LICENSE.txt
trunk/src/it/update-header-file/README.txt
trunk/src/it/update-header-file/changelog.txt
trunk/src/it/update-header-file/invoker.properties
trunk/src/it/update-header-file/pom.xml
trunk/src/it/update-header-file/src/
trunk/src/it/update-header-file/verify.groovy
trunk/src/it/update-license/pom.xml
trunk/src/it/update-license/src/license/project.xml
trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java
trunk/src/it/update-license/verify.groovy
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderFileMojo.java
Modified:
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
Deleted: trunk/src/it/update-header-file/LICENSE.txt
===================================================================
--- trunk/src/it/update-header-file/LICENSE.txt 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/it/update-header-file/LICENSE.txt 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,166 +0,0 @@
- GNU LESSER 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.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
-
Deleted: trunk/src/it/update-header-file/README.txt
===================================================================
--- trunk/src/it/update-header-file/README.txt 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/it/update-header-file/README.txt 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,2 +0,0 @@
-To test parserJava on a new project (says a project with no i18n translations)
-At the end we should have in target/generated-sources/i18n getters detected.
Deleted: trunk/src/it/update-header-file/changelog.txt
===================================================================
--- trunk/src/it/update-header-file/changelog.txt 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/it/update-header-file/changelog.txt 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1 +0,0 @@
-see the changelog of org.nuiton:i18n project.
\ No newline at end of file
Deleted: trunk/src/it/update-header-file/invoker.properties
===================================================================
--- trunk/src/it/update-header-file/invoker.properties 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/it/update-header-file/invoker.properties 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,21 +0,0 @@
-# A comma or space separated list of goals/phases to execute, may
-# specify an empty list to execute the default goal of the IT project
-invoker.goals=clean compile
-
-# Optionally, a list of goals to run during further invocations of Maven
-#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run
-
-# A comma or space separated list of profiles to activate
-#invoker.profiles=run-all run-once
-
-# The value for the environment variable MAVEN_OPTS
-#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m
-
-# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never"
-invoker.failureBehavior=fail-at-end
-
-# The expected result of the build, possible values are "success" (default) and "failure"
-#invoker.buildResult=success
-
-# A boolean value controlling the -N flag, defaults to "false"
-#invoker.nonRecursive=false
Deleted: trunk/src/it/update-header-file/pom.xml
===================================================================
--- trunk/src/it/update-header-file/pom.xml 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/it/update-header-file/pom.xml 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <!-- ************************************************************* -->
- <!-- *** POM Relationships *************************************** -->
- <!-- ************************************************************* -->
-
- <groupId>org.nuiton.license.test</groupId>
- <artifactId>test-update-header-file</artifactId>
- <version>@pom.version@</version>
-
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
-
- <name>License Test :: update-header-file</name>
-
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
-
- <packaging>jar</packaging>
-
- <inceptionYear>2012</inceptionYear>
-
- <organization>
- <name>License Test</name>
- </organization>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <build>
-
- <plugins>
-
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-license-plugin</artifactId>
- <version>@pom.version@</version>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- <executions>
- <execution>
- <id>first</id>
- <goals>
- <goal>update-header-file</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- <execution>
- <!-- this execution is to test with no files -->
- <id>second</id>
- <goals>
- <goal>update-header-file</goal>
- </goals>
- <phase>compile</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
-
-
Deleted: trunk/src/it/update-header-file/verify.groovy
===================================================================
--- trunk/src/it/update-header-file/verify.groovy 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/it/update-header-file/verify.groovy 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,16 +0,0 @@
-
-file = new File(basedir, 'src/main/java/org/nuiton/license/plugin/test/MyBean.java');
-assert file.exists();
-
-content = file.text;
-assert content.contains( 'Copyright (C) 2012 License Test' );
-
-file = new File(basedir, 'src/main/java/org/nuiton/license/plugin/test/MyBean2.java');
-assert file.exists();
-
-content = file.text;
-assert content.contains( 'Copyright (C) 2010 Tony' );
-assert content.contains( 'do NOT update!' );
-assert !content.contains( 'Fake to be removed!' );
-
-return true;
Deleted: trunk/src/it/update-license/pom.xml
===================================================================
--- trunk/src/it/update-header-file/pom.xml 2010-04-07 10:21:25 UTC (rev 1718)
+++ trunk/src/it/update-license/pom.xml 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <!-- ************************************************************* -->
- <!-- *** POM Relationships *************************************** -->
- <!-- ************************************************************* -->
-
- <groupId>org.nuiton.license.test</groupId>
- <artifactId>test-update-header-file</artifactId>
- <version>@pom.version@</version>
-
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
-
- <name>License Test :: update-header-file</name>
-
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
-
- <packaging>jar</packaging>
-
- <build>
-
- <plugins>
-
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-license-plugin</artifactId>
- <version>@pom.version@</version>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- <executions>
- <execution>
- <id>first</id>
- <goals>
- <goal>update-header-file</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- <execution>
- <!-- this execution is to test with no files -->
- <id>second</id>
- <goals>
- <goal>update-header-file</goal>
- </goals>
- <phase>compile</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
-
-
Copied: trunk/src/it/update-license/pom.xml (from rev 1720, trunk/src/it/update-header-file/pom.xml)
===================================================================
--- trunk/src/it/update-license/pom.xml (rev 0)
+++ trunk/src/it/update-license/pom.xml 2010-04-09 10:07:51 UTC (rev 1722)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>test-update-header-file</artifactId>
+ <version>@pom.version@</version>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+
+ <name>License Test :: update-header-file</name>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>jar</packaging>
+
+ <inceptionYear>2012</inceptionYear>
+
+ <organization>
+ <name>License Test</name>
+ </organization>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+
+ <plugins>
+
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <id>first</id>
+ <goals>
+ <goal>update-license</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ <execution>
+ <!-- this execution is to test with no files -->
+ <id>second</id>
+ <goals>
+ <goal>update-license</goal>
+ </goals>
+ <phase>compile</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
+
Deleted: trunk/src/it/update-license/src/license/project.xml
===================================================================
--- trunk/src/it/update-header-file/src/license/project.xml 2010-04-07 10:21:25 UTC (rev 1718)
+++ trunk/src/it/update-license/src/license/project.xml 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,20 +0,0 @@
-<?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/licenseProject-1.0.0.xsd">
- <mainLicense>gpl_v3</mainLicense>
- <licenseSets>
- <licenseSet>
- <licenseName>gpl_v3</licenseName>
- <fileSets>
- <fileSet>
- <headerType>license-java</headerType>
- <basedir>src/main/java</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </licenseSet>
- </licenseSets>
-</project>
Copied: trunk/src/it/update-license/src/license/project.xml (from rev 1719, trunk/src/it/update-header-file/src/license/project.xml)
===================================================================
--- trunk/src/it/update-license/src/license/project.xml (rev 0)
+++ trunk/src/it/update-license/src/license/project.xml 2010-04-09 10:07:51 UTC (rev 1722)
@@ -0,0 +1,20 @@
+<?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/licenseProject-1.0.0.xsd">
+ <mainLicense>gpl_v3</mainLicense>
+ <licenseSets>
+ <licenseSet>
+ <licenseName>gpl_v3</licenseName>
+ <fileSets>
+ <fileSet>
+ <headerType>java</headerType>
+ <basedir>src/main/java</basedir>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </licenseSet>
+ </licenseSets>
+</project>
Deleted: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java
===================================================================
--- trunk/src/it/update-header-file/src/main/java/org/nuiton/license/plugin/test/MyBean.java 2010-04-07 10:21:25 UTC (rev 1718)
+++ trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,4 +0,0 @@
-package org.nuiton.license.plugin.test;
-
-public class MyBean {
-}
Copied: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java (from rev 1720, trunk/src/it/update-header-file/src/main/java/org/nuiton/license/plugin/test/MyBean.java)
===================================================================
--- trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java (rev 0)
+++ trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -0,0 +1,10 @@
+package org.nuiton.license.plugin.test;
+
+/**
+ * this class has no license, a new default one will be added.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+public class MyBean {
+}
Copied: trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java (from rev 1721, trunk/src/it/update-header-file/src/main/java/org/nuiton/license/plugin/test/MyBean2.java)
===================================================================
--- trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java (rev 0)
+++ trunk/src/it/update-license/src/main/java/org/nuiton/license/plugin/test/MyBean2.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -0,0 +1,20 @@
+/*
+ * #%L
+ * License Test :: do NOT update!
+ * --
+ * Copyright (C) 2010 Tony
+ * --
+ * Fake to be removed!
+ * #L%
+ */
+
+/**
+ * this class owns a header, only license will be updated.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+package org.nuiton.license.plugin.test;
+
+public class MyBean2 {
+}
Deleted: trunk/src/it/update-license/verify.groovy
===================================================================
--- trunk/src/it/update-header-file/verify.groovy 2010-04-07 10:21:25 UTC (rev 1718)
+++ trunk/src/it/update-license/verify.groovy 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,8 +0,0 @@
-
-file = new File(basedir, 'src/main/java/org/nuiton/license/plugin/test/MyBean.java');
-assert file.exists();
-
-content = file.text;
-//assert content.contains( 'Copyright' );
-
-return true;
Copied: trunk/src/it/update-license/verify.groovy (from rev 1720, trunk/src/it/update-header-file/verify.groovy)
===================================================================
--- trunk/src/it/update-license/verify.groovy (rev 0)
+++ trunk/src/it/update-license/verify.groovy 2010-04-09 10:07:51 UTC (rev 1722)
@@ -0,0 +1,16 @@
+
+file = new File(basedir, 'src/main/java/org/nuiton/license/plugin/test/MyBean.java');
+assert file.exists();
+
+content = file.text;
+assert content.contains( 'Copyright (C) 2012 License Test' );
+
+file = new File(basedir, 'src/main/java/org/nuiton/license/plugin/test/MyBean2.java');
+assert file.exists();
+
+content = file.text;
+assert content.contains( 'Copyright (C) 2010 Tony' );
+assert content.contains( 'do NOT update!' );
+assert !content.contains( 'Fake to be removed!' );
+
+return true;
Deleted: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderFileMojo.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderFileMojo.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -1,471 +0,0 @@
-package org.nuiton.license.plugin;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.maven.plugin.MojoFailureException;
-import org.nuiton.license.plugin.header.FileHeader;
-import org.nuiton.license.plugin.header.FileHeaderFilter;
-import org.nuiton.license.plugin.header.FileHeaderProcessor;
-import org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer;
-import org.nuiton.license.plugin.header.transformer.FileHeaderTransformer;
-import org.nuiton.license.plugin.model.License;
-import org.nuiton.license.plugin.model.LicenseStore;
-import org.nuiton.license.plugin.model.project.FileSet;
-import org.nuiton.license.plugin.model.project.LicenseProject;
-import org.nuiton.license.plugin.model.project.LicenseSet;
-import org.nuiton.license.plugin.model.project.io.xpp3.LicenseProjectXpp3Reader;
-import org.nuiton.plugin.PluginHelper;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * The goal to update (or add) the licence header on some files.
- * <p/>
- * This goal replace the {@code update-header} goal which can not deal with
- * Copyright.
- * <p/>
- * This goal use a specific project file descriptor {@code license.xml} to
- * describe all files to treate more precisly for a whole project.
- *
- * @author chemit
- * @requiresProject true
- * @goal update-header-file
- * @since 1.2
- */
-public class UpdateHeaderFileMojo extends AbstractLicenseMojo {
-
- /**
- * The project license descriptor file.
- *
- * @parameter expression="${license.descriptor}" default-value="src/license/project.xml"
- * @required
- * @since 2.1
- */
- protected File descriptor;
-
- /**
- * l'annee de creation du module (sera place dans le header)
- *
- * @parameter expression="${license.inceptionYear}" default-value="${project.inceptionYear}"
- * @required
- * @since 2.1
- */
- protected String inceptionYear;
-
- /**
- * le nom de l'organisation (sera place dans le header)
- *
- * @parameter expression="${license.organizationName}"
- * default-value="${project.organization.name}"
- * @required
- * @since 2.1
- */
- protected String organizationName;
-
- /**
- * le nom du projet (sera place dans le header)
- *
- * @parameter expression="${license.projectName}" default-value="${project.name}"
- * @required
- * @since 2.1
- */
- protected String projectName;
-
- /**
- * To specify an external licenses repository resolver (says the base url
- * of the repository).
- *
- * @parameter expression="${license.licenseResolver}"
- * @since 2.1
- */
- protected String licenseResolver;
-
- /**
- * A flag to keep a backup of every modified file.
- *
- * @parameter expression="${license.keepBackup}" default-value="false"
- * @since 2.1
- */
- protected boolean keepBackup;
-
- /**
- * A flag to skip the goal.
- *
- * @parameter expression="${skipUpdateHeader}" default-value="false"
- * @since 2.1
- */
- protected boolean skipUpdateHeader;
-
- /**
- * A flag to test plugin but modify no file.
- *
- * @parameter expression="${dryRun}" default-value="false"
- * @since 2.1
- */
- protected boolean dryRun;
-
- /**
- * All available header transformers.
- *
- * @component role="org.nuiton.license.plugin.header.transformer.FileHeaderTransformer"
- * @since 2.1
- */
- protected Map<String, FileHeaderTransformer> transformers;
-
- /** timestamp used for generation */
- protected long timestamp;
-
- /** store of licenses */
- protected LicenseStore licenseStore;
-
- /** descriptor of project */
- protected LicenseProject licenseProject;
-
- @Override
- protected boolean checkSkip() {
- if (skipUpdateHeader) {
- getLog().info("skip flag is on, will skip goal.");
- return false;
- }
- return super.checkSkip();
- }
-
- @Override
- protected void init() throws Exception {
- if (getLog().isDebugEnabled()) {
-
- // always be verbose in debug mode
- setVerbose(true);
- }
-
- if (skipUpdateHeader) {
- return;
- }
- timestamp = System.nanoTime();
-
- // init licenses store
- licenseStore = createLicenseStore(licenseResolver);
-
- // load project descriptor
- FileReader reader = new FileReader(descriptor);
- try {
- licenseProject = new LicenseProjectXpp3Reader().read(reader);
- } finally {
- reader.close();
- }
-
- // check that license project is sane (known licenses + header types)
- // + populate default license name in LicenseSet (with main License)
- validateProjectfile(licenseProject, licenseStore, transformers);
- }
-
- @Override
- protected void doAction() throws Exception {
-
- // create a file header processor which updates license content only
- FileHeaderProcessor processor = new UpdateHeaderLicenseProcessor();
-
- for (LicenseSet licenseSet : licenseProject.getLicenseSets()) {
- String licenseName = licenseSet.getLicenseName();
- License license = licenseStore.getLicense(licenseName);
-
- getLog().info("process license \n" + license.getDescription());
-
- // file header to use if no header is found on a file
- FileHeader defaultFileHeader = buildDefaultFileHeader(
- license,
- getProjectName(),
- getInceptionYear(),
- getOrganizationName(),
- getEncoding()
- );
-
- processor.setHeader(defaultFileHeader);
-
- for (FileSet fileSet : licenseSet.getFileSets()) {
- File basedir = new File(getProject().getBasedir(), fileSet.getBasedir());
- List<String> includes = fileSet.getIncludes();
- if (includes.isEmpty()) {
-
- // it means include all
- includes.add("**/*");
- }
- List<String> excludes = fileSet.getExcludes();
-
- Map<File, String[]> filestoTreate = new TreeMap<File, String[]>();
- getFilesToTreateForRoots(
- includes.toArray(new String[includes.size()]),
- excludes.isEmpty() ? null :
- excludes.toArray(new String[excludes.size()]),
- Arrays.asList(basedir.getAbsolutePath()),
- filestoTreate,
- null
- );
- FileHeaderTransformer transformer =
- transformers.get(fileSet.getHeaderType());
- processor.setTransformer(transformer);
-
- updateFiles(processor, filestoTreate);
- }
- }
- }
-
- public void updateFiles(FileHeaderProcessor processor,
- Map<File, String[]> filestoTreate) throws IOException {
-
- FileHeaderTransformer transformer = processor.getTransformer();
- FileHeader header = processor.getHeader();
-
- String defaultHeaderContent = transformer.toString(header);
- getLog().debug("default header :\n" + defaultHeaderContent);
-
- String defaultFullHeaderContent = transformer.boxProcessTag(defaultHeaderContent);
- getLog().info("default header (process tag boxed) :\n" + defaultFullHeaderContent);
-
- defaultFullHeaderContent = transformer.boxComment(defaultFullHeaderContent, true);
- getLog().info("default header to use :\n" + defaultFullHeaderContent);
-
- for (Map.Entry<File, String[]> entry : filestoTreate.entrySet()) {
- File basedir = entry.getKey();
- getLog().info("start entry \n" + basedir);
- String[] paths = entry.getValue();
- getLog().info(paths.length + " file(s) to treate.");
- for (String path : paths) {
- File file = new File(basedir, path);
- updateFile(processor, file, defaultFullHeaderContent);
- }
- }
- }
-
- public void updateFile(FileHeaderProcessor processor,
- File file,
- String defaultFullHeaderContent) throws IOException {
- getLog().debug("scan file " + file);
-
-
- // file where to writeFile result
- File processFile = new File(file.getAbsolutePath() + "_" +
- timestamp);
-
- if (isVerbose()) {
- getLog().info("process file " + file);
- }
-
- try {
- processor.process(file, processFile);
- boolean touched = processor.isTouched();
-
- if (touched) {
-
- getLog().info("header was updated for " + file);
- } else {
- if (processor.isDetectHeader()) {
- getLog().warn(
- "skip file " + file +
- " (no license footer tag found : '##%*' !)");
- } else {
-
- // no license header found in file, add it
- getLog().info("adding license header on file " + file);
- String content = PluginHelper.readAsString(
- file,
- getEncoding()
- );
- content = defaultFullHeaderContent + content;
- if (!dryRun) {
- writeFile(processFile, content, getEncoding());
- }
- }
- }
-
- if (keepBackup && !dryRun) {
- File backupFile = new File(file.getAbsolutePath() + "~");
- if (isVerbose()) {
- getLog().debug("backup original file " + file);
- }
- renameFile(file, backupFile);
- }
- if (dryRun) {
- deleteFile(processFile);
- } else {
- renameFile(processFile, file);
-
- }
-
- } catch (Exception e) {
- getLog().warn(
- "skip file " + file + " (could not process " +
- "for reason : " + e.getMessage() + ")");
- deleteFile(processFile);
- } finally {
- // toujours cleaner les états du filtre du processeur
- processor.reset();
- }
- }
-
- public long getTimestamp() {
- return timestamp;
- }
-
- public String getProjectName() {
- return projectName;
- }
-
- public String getInceptionYear() {
- return inceptionYear;
- }
-
- public String getOrganizationName() {
- return organizationName;
- }
-
- public boolean isKeepBackup() {
- return keepBackup;
- }
-
- public boolean isDryRun() {
- return dryRun;
- }
-
- public boolean isSkipUpdateHeader() {
- return skipUpdateHeader;
- }
-
- public void setDryRun(boolean dryRun) {
- this.dryRun = dryRun;
- }
-
- public void setKeepBackup(boolean keepBackup) {
- this.keepBackup = keepBackup;
- }
-
- public void setTimestamp(long timestamp) {
- this.timestamp = timestamp;
- }
-
- public void setProjectName(String projectName) {
- this.projectName = projectName;
- }
-
- public void setSkipUpdateHeader(boolean skipUpdateHeader) {
- this.skipUpdateHeader = skipUpdateHeader;
- }
-
- public void setInceptionYear(String inceptionYear) {
- this.inceptionYear = inceptionYear;
- }
-
- public void setOrganizationName(String organizationName) {
- this.organizationName = organizationName;
- }
-
- protected void validateProjectfile(
- LicenseProject licenseProject,
- LicenseStore licenseStore,
- Map<String, FileHeaderTransformer> transformers)
- throws MojoFailureException {
-
- List<String> licenseNames = Arrays.asList(licenseStore.getLicenseNames());
-
- // check licenses is known
- String mainLicense = licenseProject.getMainLicense();
- if (licenseStore.getLicense(mainLicense) == null) {
- throw new MojoFailureException(
- "main license '" + mainLicense +
- "' is unknown, use one of " + licenseNames);
- }
- for (LicenseSet licenseSet : licenseProject.getLicenseSets()) {
-
- String licenseName = licenseSet.getLicenseName();
- if (StringUtils.isEmpty(licenseName)) {
-
- // use the main license
- licenseSet.setLicenseName(mainLicense);
- } else {
-
- // check license name
- if (licenseStore.getLicense(licenseName) == null) {
- throw new MojoFailureException(
- "license '" + licenseName +
- "' is unknown, use one of " + licenseNames);
- }
- }
-
- // check header types (for each file set)
- for (FileSet fileSet : licenseSet.getFileSets()) {
- String headerType = fileSet.getHeaderType();
- if (!transformers.containsKey(headerType)) {
- throw new MojoFailureException(
- "headerType '" + headerType +
- "' is unknown, use one of " + transformers.keySet());
- }
- }
- }
- }
-
- protected FileHeader buildDefaultFileHeader(License license,
- String projectName,
- String inceptionYear,
- String copyrightHolder,
- String encoding) throws IOException {
- FileHeader result = new FileHeader();
- result.setDescription(projectName);
- result.setLicense(license.getHeaderContent(encoding));
- Integer firstYear = Integer.valueOf(inceptionYear);
- result.setCopyrightFirstYear(firstYear);
- Calendar cal = Calendar.getInstance();
- cal.setTime(new Date());
- Integer lastYear = cal.get(Calendar.YEAR);
- if (firstYear < lastYear) {
- result.setCopyrightLastYear(lastYear);
- }
- result.setCopyrightHolder(copyrightHolder);
- return result;
- }
-
- public class UpdateHeaderLicenseProcessor extends FileHeaderProcessor {
-
- @Override
- public FileHeaderFilter newFilter(FileHeader header, FileHeaderTransformer transformer) {
- return new FileHeaderFilter(header, transformer) {
- @Override
- protected String treateHeader(String ch) {
-
- // unbox comment
- String unbox = transformer.unboxComent(ch);
-
- // obtain current license of file
-
- FileHeader fileHeader = transformer.toFileHeader(unbox);
-
- // updates license
- fileHeader.setLicense(header.getLicense());
-
- // build new brut header (with no boxing)
-
- String newHeader = transformer.toString(fileHeader);
-
- // box with process tag
- newHeader = transformer.boxProcessTag(newHeader);
-
- // box header with comment prefix
- newHeader = transformer.boxComment(newHeader, false);
-
- int index = newHeader.indexOf(transformer.getProcessStartTag());
-
- String result = newHeader.substring(index);
- while (result.charAt(result.length() - 1) == AbstractFileHeaderTransformer.LINE_SEPARATOR) {
- result = result.substring(0, result.length() - 1);
- }
- if (isVerbose()) {
- getLog().debug("new Header =\n" + result);
- }
-
- return result;
- }
- };
- }
- }
-}
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -215,7 +215,7 @@
/**
* A flag to skip the goal.
*
- * @parameter expression="${skipUpdateHeader}" default-value="false"
+ * @parameter expression="${skipUpdateLicense}" default-value="false"
* @since 1.0.3
*/
protected boolean skipUpdateHeader;
Copied: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java (from rev 1720, trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderFileMojo.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -0,0 +1,481 @@
+package org.nuiton.license.plugin;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.plugin.MojoFailureException;
+import org.nuiton.license.plugin.header.FileHeader;
+import org.nuiton.license.plugin.header.FileHeaderFilter;
+import org.nuiton.license.plugin.header.FileHeaderProcessor;
+import org.nuiton.license.plugin.header.transformer.FileHeaderTransformer;
+import org.nuiton.license.plugin.model.License;
+import org.nuiton.license.plugin.model.LicenseStore;
+import org.nuiton.license.plugin.model.project.FileSet;
+import org.nuiton.license.plugin.model.project.LicenseProject;
+import org.nuiton.license.plugin.model.project.LicenseSet;
+import org.nuiton.license.plugin.model.project.io.xpp3.LicenseProjectXpp3Reader;
+import org.nuiton.plugin.PluginHelper;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * The goal to update (or add) the licence header on some files and also update
+ * (or add) the project license file.
+ * <p/>
+ * This goal replace the {@code update-header} goal which can not deal with
+ * Copyright.
+ * <p/>
+ * This goal use a specific project file descriptor {@code project.xml} to
+ * describe all files to update for a whole project.
+ *
+ * @author chemit
+ * @requiresProject true
+ * @goal update-license
+ * @since 2.1
+ */
+public class UpdateLicenseMojo extends AbstractLicenseMojo {
+
+ /**
+ * The project license descriptor file.
+ *
+ * @parameter expression="${license.descriptor}" default-value="src/license/project.xml"
+ * @required
+ * @since 2.1
+ */
+ protected File descriptor;
+
+ /**
+ * l'annee de creation du module (sera place dans le header)
+ *
+ * @parameter expression="${license.inceptionYear}" default-value="${project.inceptionYear}"
+ * @required
+ * @since 2.1
+ */
+ protected String inceptionYear;
+
+ /**
+ * le nom de l'organisation (sera place dans le header)
+ *
+ * @parameter expression="${license.organizationName}"
+ * default-value="${project.organization.name}"
+ * @required
+ * @since 2.1
+ */
+ protected String organizationName;
+
+ /**
+ * le nom du projet (sera place dans le header)
+ *
+ * @parameter expression="${license.projectName}" default-value="${project.name}"
+ * @required
+ * @since 2.1
+ */
+ protected String projectName;
+
+ /**
+ * To specify an external licenses repository resolver (says the base url
+ * of the repository).
+ *
+ * @parameter expression="${license.licenseResolver}"
+ * @since 2.1
+ */
+ protected String licenseResolver;
+
+ /**
+ * A flag to keep a backup of every modified file.
+ *
+ * @parameter expression="${license.keepBackup}" default-value="false"
+ * @since 2.1
+ */
+ protected boolean keepBackup;
+
+ /**
+ * A flag to skip the goal.
+ *
+ * @parameter expression="${license.skipUpdateLicense}" default-value="false"
+ * @since 2.1
+ */
+ protected boolean skipUpdateLicense;
+
+ /**
+ * A flag to test plugin but modify no file.
+ *
+ * @parameter expression="${dryRun}" default-value="false"
+ * @since 2.1
+ */
+ protected boolean dryRun;
+
+ /**
+ * All available header transformers.
+ *
+ * @component role="org.nuiton.license.plugin.header.transformer.FileHeaderTransformer"
+ * @since 2.1
+ */
+ protected Map<String, FileHeaderTransformer> transformers;
+
+ /** timestamp used for generation */
+ protected long timestamp;
+
+ /** store of licenses */
+ protected LicenseStore licenseStore;
+
+ /** descriptor of project */
+ protected LicenseProject licenseProject;
+
+ @Override
+ protected boolean checkSkip() {
+ if (skipUpdateLicense) {
+ getLog().info("skip flag is on, will skip goal.");
+ return false;
+ }
+ return super.checkSkip();
+ }
+
+ @Override
+ protected void init() throws Exception {
+ if (getLog().isDebugEnabled()) {
+
+ // always be verbose in debug mode
+ setVerbose(true);
+ }
+
+ if (skipUpdateLicense) {
+ return;
+ }
+ timestamp = System.nanoTime();
+
+ // init licenses store
+ licenseStore = createLicenseStore(licenseResolver);
+
+ // load project descriptor
+ FileReader reader = new FileReader(descriptor);
+ try {
+ licenseProject = new LicenseProjectXpp3Reader().read(reader);
+ } finally {
+ reader.close();
+ }
+
+ // check that license project is sane (known licenses + header types)
+ // + populate default license name in LicenseSet (with main License)
+ validateProjectfile(licenseProject, licenseStore, transformers);
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+
+ // create a file header processor which updates license content only
+ FileHeaderProcessor processor = new FileHeaderProcessor() {
+
+ @Override
+ public FileHeaderFilter newFilter(
+ FileHeader header, FileHeaderTransformer transformer) {
+
+ return new UpdateLicenseHeaderFilter(header, transformer);
+ }
+ };
+
+ for (LicenseSet licenseSet : licenseProject.getLicenseSets()) {
+
+ // obtain license from definition
+ String licenseName = licenseSet.getLicenseName();
+ License license = licenseStore.getLicense(licenseName);
+
+ if (isVerbose()) {
+ getLog().info("process license \n" + license.getDescription());
+ }
+
+ // file header to use if no header is found on a file
+ FileHeader defaultFileHeader = buildDefaultFileHeader(
+ license,
+ getProjectName(),
+ getInceptionYear(),
+ getOrganizationName(),
+ getEncoding()
+ );
+
+ // change default license header in processor
+ processor.setHeader(defaultFileHeader);
+
+ for (FileSet fileSet : licenseSet.getFileSets()) {
+ File basedir = new File(getProject().getBasedir(),
+ fileSet.getBasedir());
+ List<String> includes = fileSet.getIncludes();
+ if (includes.isEmpty()) {
+
+ // it means include all
+ includes.add("**/*");
+ }
+ List<String> excludes = fileSet.getExcludes();
+
+ Map<File, String[]> filestoTreate = new TreeMap<File, String[]>();
+
+ // obtain files to treate
+ getFilesToTreateForRoots(
+ includes.toArray(new String[includes.size()]),
+ excludes.isEmpty() ? null :
+ excludes.toArray(new String[excludes.size()]),
+ Arrays.asList(basedir.getAbsolutePath()),
+ filestoTreate,
+ null
+ );
+
+ // get header transformer according to file set
+ FileHeaderTransformer transformer =
+ transformers.get(fileSet.getHeaderType());
+
+ // change transformer in processor
+ processor.setTransformer(transformer);
+
+ // treate all files of entry
+ for (Map.Entry<File, String[]> entry : filestoTreate.entrySet()) {
+ File entryBasedir = entry.getKey();
+ getLog().info("start entry \n" + entryBasedir);
+ String[] paths = entry.getValue();
+ getLog().info(paths.length + " file(s) to treate.");
+ for (String path : paths) {
+ File file = new File(entryBasedir, path);
+ updateFile(processor, file);
+ }
+ }
+ }
+ }
+ }
+
+ public void updateFile(FileHeaderProcessor processor,
+ File file) throws IOException {
+ getLog().debug("scan file " + file);
+
+ // file where to write result
+ File processFile = new File(file.getAbsolutePath() + "_" +
+ timestamp);
+
+ if (isVerbose()) {
+ getLog().info("process file " + file);
+ }
+
+ try {
+ processor.process(file, processFile);
+ boolean touched = processor.isTouched();
+
+ if (touched) {
+
+ getLog().info("header was updated for " + file);
+ } else {
+ if (processor.isDetectHeader()) {
+ getLog().warn(
+ "skip file " + file +
+ " (no license footer tag found : '##%*' !)");
+ } else {
+
+ // no license header found in file, add it
+ getLog().info("adding license header on file " + file);
+ String content = PluginHelper.readAsString(
+ file,
+ getEncoding()
+ );
+
+ //FIXME-TC-20100409 form xml files must add header after a xml prolog line
+ content = processor.getFullHeaderContent() + content;
+ if (!dryRun) {
+ writeFile(processFile, content, getEncoding());
+ }
+ }
+ }
+
+ if (keepBackup && !dryRun) {
+ File backupFile = new File(file.getAbsolutePath() + "~");
+ if (isVerbose()) {
+ getLog().debug("backup original file " + file);
+ }
+ renameFile(file, backupFile);
+ }
+ if (dryRun) {
+ deleteFile(processFile);
+ } else {
+ renameFile(processFile, file);
+ }
+
+ } catch (Exception e) {
+ getLog().warn(
+ "skip file " + file + " (could not process " +
+ "for reason : " + e.getMessage() + ")");
+ deleteFile(processFile);
+ } finally {
+
+ // always clean processor internal states
+ processor.reset();
+ }
+ }
+
+ public long getTimestamp() {
+ return timestamp;
+ }
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ public String getInceptionYear() {
+ return inceptionYear;
+ }
+
+ public String getOrganizationName() {
+ return organizationName;
+ }
+
+ public boolean isKeepBackup() {
+ return keepBackup;
+ }
+
+ public boolean isDryRun() {
+ return dryRun;
+ }
+
+ public boolean isSkipUpdateLicense() {
+ return skipUpdateLicense;
+ }
+
+ public void setDryRun(boolean dryRun) {
+ this.dryRun = dryRun;
+ }
+
+ public void setKeepBackup(boolean keepBackup) {
+ this.keepBackup = keepBackup;
+ }
+
+ public void setTimestamp(long timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
+
+ public void setSkipUpdateLicense(boolean skipUpdateLicense) {
+ this.skipUpdateLicense = skipUpdateLicense;
+ }
+
+ public void setInceptionYear(String inceptionYear) {
+ this.inceptionYear = inceptionYear;
+ }
+
+ public void setOrganizationName(String organizationName) {
+ this.organizationName = organizationName;
+ }
+
+ protected void validateProjectfile(
+ LicenseProject licenseProject,
+ LicenseStore licenseStore,
+ Map<String, FileHeaderTransformer> transformers)
+ throws MojoFailureException {
+
+ List<String> licenseNames = Arrays.asList(licenseStore.getLicenseNames());
+
+ // check licenses is known
+ String mainLicense = licenseProject.getMainLicense();
+ if (licenseStore.getLicense(mainLicense) == null) {
+ throw new MojoFailureException(
+ "main license '" + mainLicense +
+ "' is unknown, use one of " + licenseNames);
+ }
+ for (LicenseSet licenseSet : licenseProject.getLicenseSets()) {
+
+ String licenseName = licenseSet.getLicenseName();
+ if (StringUtils.isEmpty(licenseName)) {
+
+ // use the main license
+ licenseSet.setLicenseName(mainLicense);
+ } else {
+
+ // check license name
+ if (licenseStore.getLicense(licenseName) == null) {
+ throw new MojoFailureException(
+ "license '" + licenseName +
+ "' is unknown, use one of " + licenseNames);
+ }
+ }
+
+ // check header types (for each file set)
+ for (FileSet fileSet : licenseSet.getFileSets()) {
+ String headerType = fileSet.getHeaderType();
+ if (!transformers.containsKey(headerType)) {
+ throw new MojoFailureException(
+ "headerType '" + headerType +
+ "' is unknown, use one of " + transformers.keySet());
+ }
+ }
+ }
+ }
+
+ protected FileHeader buildDefaultFileHeader(
+ License license,
+ String projectName,
+ String inceptionYear,
+ String copyrightHolder,
+ String encoding) throws IOException {
+ FileHeader result = new FileHeader();
+ result.setDescription(projectName);
+ result.setLicense(license.getHeaderContent(encoding));
+ Integer firstYear = Integer.valueOf(inceptionYear);
+ result.setCopyrightFirstYear(firstYear);
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(new Date());
+ Integer lastYear = cal.get(Calendar.YEAR);
+ if (firstYear < lastYear) {
+ result.setCopyrightLastYear(lastYear);
+ }
+ result.setCopyrightHolder(copyrightHolder);
+ return result;
+ }
+
+ public class UpdateLicenseHeaderFilter extends FileHeaderFilter {
+
+ public UpdateLicenseHeaderFilter(FileHeader header,
+ FileHeaderTransformer transformer) {
+ super(header, transformer);
+ }
+
+ @Override
+ protected String treateHeader(FileHeader header,
+ FileHeaderTransformer transformer,
+ String ch) {
+
+ // unbox comment
+ String unbox = transformer.unboxComent(ch);
+
+ // obtain current license of file
+ FileHeader fileHeader = transformer.toFileHeader(unbox);
+
+ // updates license
+ fileHeader.setLicense(header.getLicense());
+
+ // build new brut header (with no boxing)
+
+ String newHeader = transformer.toString(fileHeader);
+
+ // box with process tag
+ newHeader = transformer.boxProcessTag(newHeader);
+
+ // box header with comment prefix
+ newHeader = transformer.boxComment(newHeader, false);
+
+ // remove all before start process tag since we MUST begin by
+ // the start tag in processor logic.
+ int index = newHeader.indexOf(transformer.getProcessStartTag());
+
+ String result = newHeader.substring(index);
+
+ // remove all extra spaces characters at the end of header (since
+ // we UST finish with process end tag in processor logic.
+ while (Character.isSpaceChar(result.charAt(result.length() - 1))) {
+ result = result.substring(0, result.length() - 1);
+ }
+ if (isVerbose()) {
+ getLog().debug("updated Header =\n" + result);
+ }
+
+ return result;
+ }
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/UpdateLicenseMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderFilter.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -26,7 +26,7 @@
protected FileHeaderTransformer transformer;
- protected abstract String treateHeader(String ch);
+ protected abstract String treateHeader(FileHeader header, FileHeaderTransformer transformer, String ch);
public FileHeaderFilter(FileHeader header, FileHeaderTransformer transformer) {
this.header = header;
@@ -48,7 +48,7 @@
touched = true;
// update header
- String newHeader = treateHeader(ch);
+ String newHeader = treateHeader(header, transformer, ch);
return newHeader;
}
// ce cas arrive lorsque l'on a parcouru tout le fichier avec detection
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/FileHeaderProcessor.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -24,6 +24,15 @@
/** internal filter */
protected FileHeaderFilter filter;
+ /** cached header content */
+ protected String headerContent;
+
+ /** cached full header content (with process tag + comment box) */
+ protected String processTagHeaderContent;
+
+ /** cached full header content (with process tag + comment box) */
+ protected String fullHeaderContent;
+
public abstract FileHeaderFilter newFilter(FileHeader header, FileHeaderTransformer transformer);
public FileHeaderProcessor() {
@@ -69,22 +78,50 @@
}
}
- public FileHeader getHeader() {
- return header;
+ public String getHeaderContent() {
+ if (headerContent == null) {
+ headerContent = transformer.toString(header);
+ }
+ return headerContent;
}
+ public String getProcessTagHeaderContent() {
+ if (processTagHeaderContent == null) {
+
+ // box with process tag
+ processTagHeaderContent =
+ transformer.boxProcessTag(getHeaderContent());
+
+ }
+ return processTagHeaderContent;
+ }
+
+ public String getFullHeaderContent() {
+ if (fullHeaderContent == null) {
+
+ // box with comment
+ fullHeaderContent =
+ transformer.boxComment(getProcessTagHeaderContent(), true);
+ }
+ return fullHeaderContent;
+ }
+
+// public FileHeader getHeader() {
+// return header;
+// }
+//
+// public FileHeaderTransformer getTransformer() {
+// return transformer;
+// }
+
public void setHeader(FileHeader header) {
this.header = header;
- filter = null;
+ reset();
}
- public FileHeaderTransformer getTransformer() {
- return transformer;
- }
-
public void setTransformer(FileHeaderTransformer transformer) {
this.transformer = transformer;
- filter = null;
+ reset();
}
//
// protected FileHeaderFilter getFilter() {
@@ -100,6 +137,10 @@
public void reset() {
if (filter != null) {
filter.reset();
+ filter = null;
}
+ headerContent = null;
+ processTagHeaderContent = null;
+ fullHeaderContent = null;
}
}
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/AptLicenseHeaderGeneratorImpl.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -20,6 +20,7 @@
*/
package org.nuiton.license.plugin.header.generator;
+import org.nuiton.license.plugin.header.FileHeader;
import org.nuiton.processor.filters.LicenseFilter;
/**
@@ -28,7 +29,9 @@
* @author chemit
* @plexus.component role-hint="license-apt"
* @since 1.0.1
+ * @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
+@Deprecated
public class AptLicenseHeaderGeneratorImpl extends LicenseHeaderGenerator {
public static final String GENERATOR_NAME = "license-apt";
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -20,6 +20,8 @@
*/
package org.nuiton.license.plugin.header.generator;
+import org.nuiton.license.plugin.header.FileHeader;
+
import java.io.IOException;
/**
@@ -27,7 +29,9 @@
*
* @author chemit
* @since 1.0.0
+ * @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
+@Deprecated
public interface HeaderGenerator {
/** Plexus role name */
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/JavaLicenseHeaderGeneratorImpl.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -20,6 +20,7 @@
*/
package org.nuiton.license.plugin.header.generator;
+import org.nuiton.license.plugin.header.FileHeader;
import org.nuiton.processor.filters.LicenseFilter;
/**
@@ -28,7 +29,9 @@
* @author chemit
* @plexus.component role-hint="license-java"
* @since 1.0.1
+ * @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
+@Deprecated
public class JavaLicenseHeaderGeneratorImpl extends LicenseHeaderGenerator {
public static final String GENERATOR_NAME = "license-java";
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/LicenseHeaderGenerator.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -20,6 +20,7 @@
*/
package org.nuiton.license.plugin.header.generator;
+import org.nuiton.license.plugin.header.FileHeader;
import org.nuiton.plugin.PluginHelper;
import java.io.IOException;
@@ -29,7 +30,9 @@
*
* @author chemit
* @since 1.0.1
+ * @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
+@Deprecated
public abstract class LicenseHeaderGenerator implements HeaderGenerator {
protected String linePrefix;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -20,6 +20,7 @@
*/
package org.nuiton.license.plugin.header.generator;
+import org.nuiton.license.plugin.header.FileHeader;
import org.nuiton.processor.filters.LicenseFilter;
/**
@@ -28,7 +29,9 @@
* @author chemit
* @plexus.component role-hint="license-properties"
* @since 1.0.1
+ * @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
+@Deprecated
public class PropertiesLicenseHeaderGeneratorImpl extends LicenseHeaderGenerator {
public static final String GENERATOR_NAME = "license-properties";
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -20,6 +20,7 @@
*/
package org.nuiton.license.plugin.header.generator;
+import org.nuiton.license.plugin.header.FileHeader;
import org.nuiton.processor.filters.LicenseFilter;
/**
@@ -28,7 +29,9 @@
* @author chemit
* @plexus.component role-hint="license-xml"
* @since 1.0.1
+ * @deprecated since 2.1, prefer use now the {@link FileHeader} api
*/
+@Deprecated
public class XmlLicenseHeaderGeneratorImpl extends LicenseHeaderGenerator {
public static final String GENERATOR_NAME = "license-xml";
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformer.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -30,8 +30,6 @@
"(.[^\\d]+)?\\s(\\d{4})?(\\s+-\\s+(\\d{4})?){0,1}\\s+(.+)?"
);
- public static final char LINE_SEPARATOR = '\n';
-
/** name of transformer */
protected String name;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -36,6 +36,8 @@
/** default process end tag */
String DEFAULT_PROCESS_END_TAG = "#L%";
+ char LINE_SEPARATOR = '\n';
+
/** @return the name of the transformer */
String getName();
Modified: trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-08 20:03:11 UTC (rev 1721)
+++ trunk/src/test/java/org/nuiton/license/plugin/header/transformer/AbstractFileHeaderTransformerTest.java 2010-04-09 10:07:51 UTC (rev 1722)
@@ -12,7 +12,7 @@
import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.DEFAULT_PROCESS_END_TAG;
import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.DEFAULT_PROCESS_START_TAG;
import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.DEFAULT_SECTION_DELIMITER;
-import static org.nuiton.license.plugin.header.transformer.AbstractFileHeaderTransformer.LINE_SEPARATOR;
+import static org.nuiton.license.plugin.header.transformer.FileHeaderTransformer.LINE_SEPARATOR;
import static org.nuiton.license.plugin.header.transformer.JavaFileHeaderTransformer.*;
/**
1
0