2

I have several (Java) projects under maven control, developed in Eclipse, repo under Mercurial/bitbucket that I licence under Apache2 (though this question applies to any licences). What is the best way to licence this?

I have included a verbatim copy of the (Apache) LICENCE.txt in the top directory of the project. However there is no licence in any of the source files so that if they are re-used in other projects (as I hope they can be) they may get separated from the licence info. [Source files can be configuration/data as well as code and are not Java-specific]. If there are any changes to the licence then all these files will have to be edited. Possible approaches are:

  • use a brief sentence to refer back to LICENSE.txt
  • use a Maven licence tool if there is one?
  • use an Eclipse licence tool if there is one?
  • use a Bitbucket licence tool if it has one?

[I am on Windows so I don't want a sed/awk/grep approach]

UPDATE - have accepted @Nicmancol as the first answer given worked for me

UPDATE2 - Hmm. It has added a licence to all sorts of files in the distrib. Not such a good idea

peter.murray.rust
  • 37,407
  • 44
  • 153
  • 217
  • Taking @Stephen C's answer (which points to an answer which is 2-3 years old) I have attempted to install Copyright Wizard from wdev91.com. It requires the "dropins" directory under Eclipse. I don't have one, do I create it. – peter.murray.rust Nov 18 '12 at 05:50
  • Having tried this approach I get: Cannot complete the install because one or more required items could not be found. Software currently installed: Shared profile 1.0.0.1308118925849 (SharedProfile_epp.package.java 1.0.0.1308118925849) Missing requirement: Shared profile 1.0.0.1308118925849 (SharedProfile_epp.package.java 1.0.0.1308118925849) requires 'org.maven.ide.eclipse [1.0.0.20110607-2117]' but it could not be found . Am I on the right track? – peter.murray.rust Nov 18 '12 at 05:50

2 Answers2

1

There are Eclipse plugins for adding / maintaining copyright notices in source file headers; e.g. see this SO question: How to manage license banners in source files of Eclipse plug-in projects. (The answers are more general than the question ...)

With a Maven project you can / should also add license details to the POM file.


From a purely legal perspective, it probably doesn't matter if a file gets separated from the "bundle" containing the copyright notice. Copyright applies irrespective of whether there is a copyright notice.

I agree that copyright applies irrespective, but authorship and licenses do not. So in an area where software is likely to be re-used we need to give the re-users that information.

Both authorship and licensing also apply irrespective of whether this is stated in each file.

  • Authorship is simply a fact, "William Stallings wrote Emacs" remains true even if someone strips the source headers. But knowing who the author of some piece of software is has no bearing over how someone else may use it, so it probably isn't of much relevance.

  • Licenses derive from copyright, and the default license is as set out in the relevant copyright law. That is, the default is that you do NOT have the right to make a copy, or have a copy that was made illegally.

    If a file becomes separated from the license information, then it is up to the user of the file to deal with the problem; i.e. HE needs to find out what the license is. Because, the default is that he has no license.

Basically, if the copyright and/or license are unclear, the obligation is on the copier to find out what the copyright / license status is ... not the copyright owner / licensor. And that is as it should be. It is not possible for the copyright owner / licensor to PREVENT the information from BECOMING separated, and penalizing the copyright holder / licensor for something (illegal) that someone else did to achieve that separation would be manifestly unfair.

Community
  • 1
  • 1
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • Thanks. I agree that copyright applies irrespective, but authorship and licenses do not. So in an area where software is likely to be re-used we need to give the re-users that information – peter.murray.rust Nov 18 '12 at 05:34
1

You can use the Maven License Plugin or the License Maven Plugin

Nickmancol
  • 1,034
  • 7
  • 16