Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Jan 18, 2024

No description provided.

Copyright owner and date was generated by finding the original author
and date from the git history.
@Ladicek
Copy link
Contributor Author

Ladicek commented Jan 18, 2024

In this PR, I replicate what @Azquelt did in jakartaee/cdi-tck#528

I generated the 2nd commit using this script:

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 || $data =~ pmuir || $data =~ antoine || $data =~ marlow ]] ; 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 

@Azquelt
Copy link
Member

Azquelt commented Jan 18, 2024

Running the (somewhat more manual) script I used for jakartaee/cdi-tck#528, I see no differences in the Java files between my workspace and this PR.

Copy link
Contributor

@Emily-Jiang Emily-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use: Eclipse Foundation and individual contributors instead of maintaining a particular company name. In this way, all new files will use the same header. Besides, I don't see any advantages of using a particular company.

@Ladicek
Copy link
Contributor Author

Ladicek commented Jan 19, 2024

No.

@Emily-Jiang
Copy link
Contributor

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 suggest for the contributors otherwise Red Hat are free to use contributors to Eclipse Foundation for easier maintenance.

@Emily-Jiang Emily-Jiang self-requested a review January 22, 2024 11:43
@Ladicek Ladicek merged commit 032bfb6 into jakartaee:main Jan 30, 2024
@Ladicek Ladicek deleted the copyright-headers branch January 30, 2024 15:10
@Ladicek Ladicek added this to the CDI 4.1 milestone Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants