[
https://issues.apache.org/jira/browse/NUTCH-2688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roannel Fernández Hernández updated NUTCH-2688:
-----------------------------------------------
Description: Sometimes the license headers are written in .java classes in
a javadoc comment (/** license \*/), sometimes in a block comment (/* license
\*/), and sometimes is a javadoc comment but with several * (/**** license */).
The idea is to reach an understanding on how the license headers should be
written on .java files. (was: Sometimes the license headers are written in
.java classes in a javadoc comment (/** license \*/), sometimes in a block
comment (/* license \*/), and sometimes is a javadoc comment but with several *
(/**** license */). The idea is to reach an understanding on how the license
headers should be written on .java files.
According to a visual inspection, other Apache Java-based projects use two
aproaches mainly: javadoc comment and block comment. For example:
[Solr-lucene|https://github.com/apache/lucene-solr],
[Tika|https://github.com/apache/tika], [Spark|https://github.com/apache/spark]
use the block comment way, while [Hadoop|https://github.com/apache/hadoop] uses
javadoc comment.
To avoid to confuse the license header with a javadoc comment and it doesn't
look like a dangling javadoc comment (since javadoc comments must to be
inserted above a class declaration, a method declaration, or a field
declaration), I propose use the block comment for writing the license header in
all .java classes. There must not be an empty line between the license header
and the package declaration, unless it is a package comment file with package
comments.
For .java classes the license header looks like:
{code:java}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.nutch;
{code}
For a package comment file:
{code:java}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/**
* Package comments here.
*/
package org.apache.nutch;
{code}
What do you think guys?)
> Unify the licence headers
> -------------------------
>
> Key: NUTCH-2688
> URL: https://issues.apache.org/jira/browse/NUTCH-2688
> Project: Nutch
> Issue Type: Improvement
> Affects Versions: 1.15
> Reporter: Roannel Fernández Hernández
> Assignee: Roannel Fernández Hernández
> Priority: Trivial
> Fix For: 1.16
>
>
> Sometimes the license headers are written in .java classes in a javadoc
> comment (/** license \*/), sometimes in a block comment (/* license \*/), and
> sometimes is a javadoc comment but with several * (/**** license */). The
> idea is to reach an understanding on how the license headers should be
> written on .java files.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)