-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing copyright headers to Java source files #528
Conversation
Copyright owner and date was generated by finding the original author and date from the git history.
Impressive! To verify, I did the following: mvn -pl . -fn org.apache.rat:apache-rat-plugin:0.16:check -Drat.excludeSubprojects=false`
for F in $(grep -h ????? target/rat.txt | grep \\.java | sed -e 's| !????? ||') ; do
data=$(git log --format="%ae %as" $F | tail -1)
if [[ $data =~ redhat || $data =~ starksm ]] ; then
company="Red Hat, Inc."
elif [[ $data =~ ibm ]] ; then
company="IBM Corp."
else
exit 1
fi
year=$(echo $data | cut -d ' ' -f 2 | cut -d '-' -f 1)
cat > tmp.txt <<EOF
/*
* Copyright $year, $company, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
EOF
cat $F >> tmp.txt
mv tmp.txt $F
done Then, I committed the changes, exported a diff and compared with the diff from this PR. No difference between my commit and the commit in this PR (except the obvious difference in the commit header). |
Nice! That is somewhat neater than my script and serves as a good indication that the results are good. |
I don't think we agreed anything, we suggested we could change to a more generic copyright header. If we do decide to change it, we can still do that, but that doesn't stop us merging this to add the headers following the current scheme. This is probably better discussed on the issue. |
These are older files, not new ones. We therefore cannot claim the eclipse contributor variant and instead attribute it to the commiter's respective company |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the comments, I think we are better off to use the copyright statement of:
Copyright , Eclipse Foundation and individual contributors
I think that statement would be wrong. The eclipse foundation does not own the copyright on any of the code. Note that the Jakarta Data header says
Stating that the copyright belongs to the contributors, not to the Eclipse Foundation itself. In this case I'm not sure whether even that would be correct, as the original authors did not make their contribution to the Eclipse Foundation since it wasn't the owner of this project at the time. |
I disagree. This PR fills a gap that has existed for several years and does it consistently with existing code, which seems best considering the apparent importance. We can always simplify later. |
The projects are under Eclipse Foundation though. I prefer something universal. I looked at the MicroProfile files, they use |
I think I have expressed my opinion clearly. For Red Hat contributions, obviously the contributors have choose to use the copyright header to Red Hat, which is fine. I |
The copyright owner and date for each header was generated by finding the original author and date from the git history.
Add the apache RAT plugin to verify that all java files have an appropriate header.
For #525