lundi 1 décembre 2014

Reuse a small method from Apache Ant: How to do that correctly


I adapted some code from the Apache Ant project in my work. The part I used is really small: ~70 lines, ~2000 characters. Adding dependency to ant to use that a single method seemed like an overkill.


The project I work on is internal to the company, so I included a javadoc like



@see <a href="...">original source</a>


for my colleagues to know the code wasn't mine.


Then I encountered this summary at tldrlegal which states that this is not enough, and to do this "properly" I have to do much more:



  • Include Copyright

  • Include License: Including the full text of license in modified software.

  • State Changes: Stating significant changes made to software.

  • Include Notice: If the library has a "NOTICE" file with attribution notes, you must include that NOTICE when you distribute. You may append to this NOTICE file.


From this I deduce that I actually have to include NOTICE file from ant (it's like 10 lines), somehow redistribute Apache 2 license text with the project, and include a monster comment like this before the function body or before the beginning of my class:



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://ift.tt/jtTJvY

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.


Is this true? Is there no other, more compact way to do it? Because this seems like a huge overkill, too. I only use a minuscule part of the project (namely, a single ~70-line method) and introduce a small change (returning List<String> instead of String[]).


P.S. I don't seek professional law advice, just some common-sense-based guidelines for this situation, preferrably with examples from other open-source projects.





Aucun commentaire:

Enregistrer un commentaire