Coder Social home page Coder Social logo

glassfish-copyright-plugin's People

Contributors

arjantijms avatar bshannon avatar cousjava avatar fredg02 avatar glassfish-bot avatar pzygielo avatar romain-grecourt avatar senivam avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glassfish-copyright-plugin's Issues

Java source/target of the project is at ancient level 1.6

I think it could be set to at least 1.7 (which Maven is committed to support still).

AFAIK most of ee4j projects are at 1.8+ (e.g. mail has profile for 1.7, but I'm not sure if it is being used for the release).
Perhaps even 1.8 could be considered then?

Not sure if such (breaking) change should be followed by major version update as well.

Plugin fails to run with Maven 3.6.2

for following configuration:

            <plugin>
                <groupId>org.glassfish.copyright</groupId>
                <artifactId>glassfish-copyright-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <excludeFile>copyright-exclude</excludeFile>
                </configuration>
                <executions>
                    <execution>
                        <id>copyright-check</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

mvn glassfish-copyright:check on JDK 11 says:

Failed to execute goal org.glassfish.copyright:glassfish-copyright-maven-plugin:2.2:check
(copyright-check) on project harness-lib:
Unable to parse configuration of mojo org.glassfish.copyright:glassfish-copyright-maven-
plugin:2.2:check for parameter resources:
Cannot assign configuration entry 'resources' with value 'null' of type
org.apache.maven.model.merge.ModelMerger.MergingList
to property of type java.util.ArrayList -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.glassfish.copyright:glassfish-copyright-maven-plugin:2.2:check (copyright-check) on project harness-lib:
Unable to parse configuration of mojo org.glassfish.copyright:glassfish-copyright-maven-plugin:2.2:check for parameter resources:
Cannot assign configuration entry 'resources' with value 'null' of type org.apache.maven.model.merge.ModelMerger.MergingList to property of type java.util.ArrayList
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)

copyright template with inception year and current year not working

I'm having this template:

/*
 * Copyright (c) 2020, YYYY, Oracle and/or its affiliates.
 */

running the repair task with year updates enabled on files that already have

/*
 * Copyright (c) 2020, 2021, Oracle and/or its affiliates.
 */

leads to

/*
 * Copyright (c) 2020, 2020, 2021  Oracle and/or its affiliates. All rights reserved.
 */

and I'm getting the warning Copyright year is wrong; is 021 , should be 2021

So, I have two issues:

  1. All rights reserved. should not be there
  2. The years are messed up

Cannot find git on windows

I'm trying to run the plugin on a windows machine and I get an IOException that the git executable cannot be found. I have git installed and the git.exe executable is in my Paht variable.

need improvement for handling of `The Apache Software License, Version 1.1`

Example of Apache licensing being badly formatted https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/servlet/api/jakarta_servlet/filterconfig/GetFilterNameTestServlet.java

Example output from applying another change to ^ file:
diff --git a/src/com/sun/ts/tests/servlet/api/jakarta_servlet/filterconfig/GetFilterNameTestServlet.java b/src/com/sun/ts/tests/servlet/api/jakarta_servlet/filterconfig/GetFilterNameTestServlet.java
index ccabe058d..c6b7f357c 100644
--- a/src/com/sun/ts/tests/servlet/api/jakarta_servlet/filterconfig/GetFilterNameTestServlet.java
+++ b/src/com/sun/ts/tests/servlet/api/jakarta_servlet/filterconfig/GetFilterNameTestServlet.java
@@ -1,59 +1,60 @@
/*
*

      • The Apache Software License, Version 1.1
      • Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
      • Copyright (c) 1999-2001 The Apache Software Foundation. All rights
      • reserved.
      • Redistribution and use in source and binary forms, with or without
      • modification, are permitted provided that the following conditions
      • are met:
        1. Redistributions of source code must retain the above copyright
      • notice, this list of conditions and the following disclaimer.
        1. Redistributions in binary form must reproduce the above copyright
      • notice, this list of conditions and the following disclaimer in
      • the documentation and/or other materials provided with the
      • distribution.
        1. The end-user documentation included with the redistribution, if
      • any, must include the following acknowlegement:
      •   "This product includes software developed by the
        
      •    Apache Software Foundation (http://www.apache.org/)."
        
      • Alternately, this acknowlegement may appear in the software itself,
      • if and wherever such third-party acknowlegements normally appear.
        1. The names "The Jakarta Project", "Tomcat", and "Apache Software
      • Foundation" must not be used to endorse or promote products derived
      • from this software without prior written permission. For written
        1. Products derived from this software may not be called "Apache"
      • nor may "Apache" appear in their names without prior written
      • permission of the Apache Group.
      • THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
      • WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
      • OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
      • DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
      • ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
      • SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
      • LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
      • USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
      • ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
      • OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
      • OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      • SUCH DAMAGE.
      • ====================================================================
      • This software consists of voluntary contributions made by many
      • individuals on behalf of the Apache Software Foundation. For more
      • information on the Apache Software Foundation, please see

        • The Apache Software License, Version 1.1

        • Copyright (c) YYYY Oracle and/or its affiliates. All rights reserved.
        • Copyright (c) 1999-2001 The Apache Software Foundation. All rights
        • reserved.

        • Redistribution and use in source and binary forms, with or without
        • modification, are permitted provided that the following conditions
        • are met:

          1. Redistributions of source code must retain the above copyright
        • notice, this list of conditions and the following disclaimer.

          1. Redistributions in binary form must reproduce the above copyright
        • notice, this list of conditions and the following disclaimer in
        • the documentation and/or other materials provided with the
        • distribution.

          1. The end-user documentation included with the redistribution, if
        • any, must include the following acknowlegement:
        •   "This product includes software developed by the
          
        •    Apache Software Foundation (http://www.apache.org/)."
          
        • Alternately, this acknowlegement may appear in the software itself,
        • if and wherever such third-party acknowlegements normally appear.

          1. The names "The Jakarta Project", "Tomcat", and "Apache Software
        • Foundation" must not be used to endorse or promote products derived
        • from this software without prior written permission. For written

          1. Products derived from this software may not be called "Apache"
        • nor may "Apache" appear in their names without prior written
        • permission of the Apache Group.

        • THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
        • WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        • OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        • DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
        • ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        • SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
        • LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
        • USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
        • ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        • OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
        • OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        • SUCH DAMAGE.
        • ====================================================================

        • This software consists of voluntary contributions made by many
        • individuals on behalf of the Apache Software Foundation. For more
        • information on the Apache Software Foundation, please see

  • */

Do not alter Copyright notice in files that contain "DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER"

Should the plugin ignore files that contain "DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER"?

Jakarta EE Platform TCK pr # 222 (javax.jms to jakarta.jms) shows what happens when the GlassFish Copyright Plugin is used to modify a file that shouldn't be changed:

diff --git a/lib/dtds/connector_1_6.dtd b/lib/dtds/connector_1_6.dtd
index 9bf099075..9aacf93ea 100644
--- a/lib/dtds/connector_1_6.dtd
+++ b/lib/dtds/connector_1_6.dtd
@@ -2,33 +2,15 @@
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- 
- Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- 
- The contents of this file are subject to the terms of either the GNU
- General Public License Version 2 only ("GPL") or the Common Development
- and Distribution License("CDDL") (collectively, the "License").  You
- may not use this file except in compliance with the License. You can obtain
- a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- language governing permissions and limitations under the License.
- 
- When distributing the software, include this License Header Notice in each
- file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- Sun designates this particular file as subject to the "Classpath" exception
- as provided by Sun in the GPL Version 2 section of the License file that
- accompanied this code.  If applicable, add the following below the License
- Header, with the fields enclosed by brackets [] replaced by your own
- identifying information: "Portions Copyrighted [year]
- [name of copyright owner]"
- 
- Contributor(s):
- 
- If you wish your version of this file to be governed by only the CDDL or
- only the GPL Version 2, indicate your decision by adding "[Contributor]
- elects to include this software in this distribution under the [CDDL or GPL
- Version 2] license."  If you don't indicate a single choice of license, a
- recipient has the option to distribute your version of this file under
- either the CDDL, the GPL Version 2 or to extend the choice of license to
- its licensees as provided above.  However, if you add GPL Version 2 code
- and therefore, elected the GPL Version 2 license, then the option applies
- only if the new code is made subject to such option by the copyright
- holder.
+
+    Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
+
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v. 2.0, which is available at
+    http://www.eclipse.org/legal/epl-2.0.
+
+    This Source Code may also be made available under the following Secondary
+    Licenses when the conditions for such availability set forth in the
+    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+    version 2 with the GNU Classpath Exception, which is available at
+    https://www.gnu.org/software/classpath/license.html.
+
+    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.