eclipse-ee4j / glassfish-copyright-plugin Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
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.
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)
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:
All rights reserved.
should not be thereI'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.
This is a place holder issue for Pull request from javaee/copyright-maven-plugin#2
When using 'repair', the plug-in puts newline a end of each file that doen't have one.
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 @@
/*
*
"This product includes software developed by the
Apache Software Foundation (http://www.apache.org/)."
"This product includes software developed by the
Apache Software Foundation (http://www.apache.org/)."
It might happen for this plugin to work on git cloned repository with no git
available in $PATH
. (Like in eclipse-ee4j/glassfish-build-maven-plugin#18).
This is a place holder issue for Pull request from javaee/copyright-maven-plugin#1
This is a place holder issue for Pull request from javaee/copyright-maven-plugin#5
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.