mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
23.24.2016 61003ca6fb40d9be4ebf5a059115f34797c8f341
opendj-sdk/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/UpdateCopyrightMojo.java
@@ -313,7 +313,7 @@
     * Number of lines to add after the line which contains the lineBeforeCopyrightToken.
     * Used only if a new copyright line is needed.
     */
    @Parameter(required = true, defaultValue = "2")
    @Parameter(required = true, defaultValue = "1")
    private Integer nbLinesToSkip;
    /**
@@ -321,11 +321,11 @@
     * copyright section. Used only if a new copyright or portion copyright is
     * needed.
     */
    @Parameter(required = true, defaultValue = "6")
    @Parameter(required = true, defaultValue = "1")
    private Integer numberSpaceIdentation;
    /** The last non empty commented line before the copyright section. */
    @Parameter(required = true, defaultValue = "CDDL\\s+HEADER\\s+END")
    @Parameter(required = true, defaultValue = "\\\"Portions Copyright \\[year\\] \\[name of copyright owner\\]\\\"")
    private String lineBeforeCopyrightRegExp;
    /** The regular expression which identifies a copyrighted line. */
opendj-sdk/opendj-copyright-maven-plugin/src/test/java/org/forgerock/maven/UpdateCopyrightTestCase.java
@@ -48,7 +48,7 @@
    private static final String CURRENT_YEAR = Integer.toString(Calendar.getInstance().get(Calendar.YEAR));
    private static final String RESOURCE_DIR = "src/test/resources/files/";
    private static final String[] TEST_FOLDERS = { "openam-copyrights", "opendj-copyrights", "openidm-copyrights"};
    private static final String[] TEST_FOLDERS = { "forgerock-copyrights", "openidm-copyrights"};
    /** Customs tags in tests files. */
    private static final String MUST_BE_REMOVED_TAG = "MUST BE REMOVED:";
@@ -73,9 +73,7 @@
                // New copyright end String
            { TEST_FOLDERS[0], "Portions\\s+Copyright\\s+\\[year\\]\\s+\\[name\\s+of\\s+copyright\\s+owner\\]",
                1, 1, "Portions copyright", "Copyright", "ForgeRock\\s+AS", "ForgeRock AS." },
            { TEST_FOLDERS[1], "CDDL\\s+HEADER\\s+END", 1, 6, "Portions Copyright", "Copyright",
                "ForgeRock\\s+AS\\.", "ForgeRock AS." },
            { TEST_FOLDERS[2],
            { TEST_FOLDERS[1],
                "DO\\s+NOT\\s+ALTER\\s+OR\\s+REMOVE\\s+COPYRIGHT\\s+NOTICES\\s+OR\\s+THIS\\s+HEADER.", 1, 1,
                "Portions Copyrighted", "Copyright (c)", "ForgeRock\\s+AS\\.",
                "ForgeRock AS. All rights reserved." }
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-1.java
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-2.c
File was renamed from opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openam-copyrights/openam-bad-copyright-2.txt
@@ -16,4 +16,3 @@
 
MUST BE REMOVED: Copyright 2010 ForgeRock  AS.
EXPECTED OUTPUT: Copyright 2010-YEAR ForgeRock  AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-3.java
File was renamed from opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openam-copyrights/openam-bad-copyright-3.txt
@@ -13,4 +13,4 @@
 *
 */
 
 EXPECTED OUTPUT: Copyright YEAR ForgeRock AS.
 EXPECTED OUTPUT: Copyright YEAR ForgeRock AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-4.h
File was renamed from opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openam-copyrights/openam-bad-copyright-4.txt
@@ -14,4 +14,4 @@
 * Copyright 2010 Old Copyright Owner Inc.
 */
 
 EXPECTED OUTPUT: Portions copyright YEAR ForgeRock AS.
 EXPECTED OUTPUT: Portions copyright YEAR ForgeRock AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-5.txt
File was renamed from opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openam-copyrights/openam-bad-copyright-5.txt
@@ -15,4 +15,4 @@
 * copyright 2013-2014 Old copyright owner Inc.
 */
 
 EXPECTED OUTPUT: Portions copyright YEAR ForgeRock AS.
 EXPECTED OUTPUT: Portions copyright YEAR ForgeRock AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-6.txt
File was renamed from opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openam-copyrights/openam-bad-copyright-6.txt
@@ -17,4 +17,4 @@
 */
 
MUST BE REMOVED: Portions copyright 2013-2014 ForgeRock AS.
EXPECTED OUTPUT: Portions copyright 2013-YEAR ForgeRock AS.
EXPECTED OUTPUT: Portions copyright 2013-YEAR ForgeRock AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-7.html
New file
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
 ! The contents of this file are subject to the terms of the Common Development and
 ! Distribution License (the License). You may not use this file except in compliance with the
 ! License.
 !
 ! You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
 ! specific language governing permission and limitations under the License.
 !
 ! When distributing Covered Software, include this CDDL Header Notice in each file and include
 ! the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
 ! Header, with the fields enclosed by brackets [] replaced by your own identifying
 ! information: "Portions Copyright [year] [name of copyright owner]".
 !
 !      Copyright   2012-2014 ForgeRock  AS.
-->
MUST BE REMOVED: Copyright   2012-2014 ForgeRock  AS.
EXPECTED OUTPUT: Copyright   2012-YEAR ForgeRock  AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-8.xml
New file
@@ -0,0 +1,18 @@
<!--
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2013 ForgeRock AS.
 -->
MUST BE REMOVED: Copyright 2013 ForgeRock AS.
EXPECTED OUTPUT: Copyright 2013-YEAR ForgeRock AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/forgerock-copyrights/forgerock-bad-copyright-9.xsl
New file
@@ -0,0 +1,16 @@
<!--
 ~ The contents of this file are subject to the terms of the Common Development and
 ~ Distribution License (the License). You may not use this file except in compliance with the
 ~ License.
 ~
 ~ You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
 ~ specific language governing permission and limitations under the License.
 ~
 ~ When distributing Covered Software, include this CDDL Header Notice in each file and include
 ~ the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
 ~ Header, with the fields enclosed by brackets [] replaced by your own identifying
 ~ information: "Portions Copyright [year] [name of copyright owner]".
 ~
-->
EXPECTED OUTPUT: Copyright YEAR ForgeRock AS.
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-1.txt
File was deleted
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-2.txt
File was deleted
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-3.txt
File was deleted
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-4.txt
File was deleted
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-5.txt
File was deleted
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-6.txt
File was deleted
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-1.java
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-2.java
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-3.java
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-4.java
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-5.java
opendj-sdk/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-6.java
opendj-sdk/pom.xml
@@ -295,20 +295,6 @@
                                <goals>
                                    <goal>update-copyright</goal>
                                </goals>
                                <configuration>
                                    <!-- We need to accept the second part of the following regular
                                       ! expression for submodules:
                                       ! * opendj-rest2ldap
                                       !
                                       ! Please note that the regexp
                                       !  '\"Portions Copyright \[year\] \[name of copyright owner\]\"'
                                       ! must never be found before 'CDDL HEADER END' in other submodules,
                                       ! otherwise the plugin will fail.
                                     -->
                                    <lineBeforeCopyrightRegExp>
                                        (CDDL HEADER END|\"Portions Copyright \[year\] \[name of copyright owner\]\")
                                    </lineBeforeCopyrightRegExp>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>