licensee 9.11.0 → 9.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/licensee +1 -0
- data/lib/licensee.rb +4 -2
- data/lib/licensee/commands/detect.rb +2 -0
- data/lib/licensee/commands/diff.rb +5 -1
- data/lib/licensee/commands/license_path.rb +2 -0
- data/lib/licensee/commands/version.rb +2 -0
- data/lib/licensee/content_helper.rb +20 -10
- data/lib/licensee/hash_helper.rb +2 -0
- data/lib/licensee/license.rb +2 -0
- data/lib/licensee/license_field.rb +2 -0
- data/lib/licensee/license_meta.rb +2 -0
- data/lib/licensee/license_rules.rb +2 -0
- data/lib/licensee/matchers.rb +2 -0
- data/lib/licensee/matchers/cabal.rb +15 -1
- data/lib/licensee/matchers/cargo.rb +2 -0
- data/lib/licensee/matchers/copyright.rb +2 -0
- data/lib/licensee/matchers/cran.rb +2 -0
- data/lib/licensee/matchers/dice.rb +3 -1
- data/lib/licensee/matchers/dist_zilla.rb +2 -0
- data/lib/licensee/matchers/exact.rb +2 -0
- data/lib/licensee/matchers/gemspec.rb +2 -0
- data/lib/licensee/matchers/matcher.rb +2 -0
- data/lib/licensee/matchers/npm_bower.rb +2 -0
- data/lib/licensee/matchers/package.rb +2 -0
- data/lib/licensee/matchers/reference.rb +2 -0
- data/lib/licensee/matchers/spdx.rb +2 -0
- data/lib/licensee/project_files.rb +2 -0
- data/lib/licensee/project_files/license_file.rb +5 -3
- data/lib/licensee/project_files/package_manager_file.rb +2 -0
- data/lib/licensee/project_files/project_file.rb +11 -4
- data/lib/licensee/project_files/readme_file.rb +2 -0
- data/lib/licensee/projects.rb +2 -0
- data/lib/licensee/projects/fs_project.rb +2 -0
- data/lib/licensee/projects/git_project.rb +16 -8
- data/lib/licensee/projects/github_project.rb +2 -0
- data/lib/licensee/projects/project.rb +4 -2
- data/lib/licensee/rule.rb +2 -0
- data/lib/licensee/version.rb +3 -1
- data/spec/bin_spec.rb +2 -0
- data/spec/fixture_spec.rb +46 -0
- data/spec/fixtures/detect.json +6 -4
- data/spec/fixtures/fixtures.yml +110 -0
- data/spec/fixtures/html/license.html +262 -0
- data/spec/fixtures/license-hashes.json +30 -27
- data/spec/fixtures/mit-optional/LICENSE.txt +21 -0
- data/spec/integration_spec.rb +20 -0
- data/spec/licensee/commands/detect_spec.rb +5 -1
- data/spec/licensee/commands/license_path_spec.rb +2 -0
- data/spec/licensee/commands/version_spec.rb +2 -0
- data/spec/licensee/content_helper_spec.rb +22 -5
- data/spec/licensee/hash_helper_spec.rb +2 -0
- data/spec/licensee/license_field_spec.rb +2 -0
- data/spec/licensee/license_meta_spec.rb +2 -0
- data/spec/licensee/license_rules_spec.rb +2 -0
- data/spec/licensee/license_spec.rb +4 -2
- data/spec/licensee/matchers/cabal_matcher_spec.rb +93 -0
- data/spec/licensee/matchers/cargo_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/copyright_matcher_spec.rb +4 -2
- data/spec/licensee/matchers/cran_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/dice_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/dist_zilla_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/exact_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/gemspec_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/matcher_spec.rb +2 -0
- data/spec/licensee/matchers/npm_bower_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/package_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/reference_matcher_spec.rb +2 -0
- data/spec/licensee/matchers/spdx_matcher_spec.rb +2 -0
- data/spec/licensee/project_files/license_file_spec.rb +3 -1
- data/spec/licensee/project_files/package_info_spec.rb +2 -0
- data/spec/licensee/project_files/project_file_spec.rb +3 -0
- data/spec/licensee/project_files/readme_file_spec.rb +2 -0
- data/spec/licensee/project_spec.rb +2 -0
- data/spec/licensee/projects/git_project_spec.rb +23 -0
- data/spec/licensee/projects/github_project_spec.rb +2 -0
- data/spec/licensee/rule_spec.rb +2 -0
- data/spec/licensee_spec.rb +3 -1
- data/spec/spec_helper.rb +16 -3
- data/spec/vendored_license_spec.rb +9 -7
- data/vendor/choosealicense.com/_licenses/0bsd.txt +39 -0
- data/vendor/choosealicense.com/_licenses/afl-3.0.txt +7 -5
- data/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +1 -1
- data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +1 -1
- data/vendor/choosealicense.com/_licenses/cecill-2.1.txt +579 -0
- data/vendor/choosealicense.com/_licenses/epl-1.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/epl-2.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/odbl-1.0.txt +573 -0
- data/vendor/choosealicense.com/_licenses/osl-3.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/unlicense.txt +1 -1
- data/vendor/choosealicense.com/_licenses/upl-1.0.txt +3 -3
- metadata +40 -18
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Git-based project
|
2
4
|
#
|
3
5
|
# Analyze a given (bare) Git repository for license information
|
@@ -11,25 +13,31 @@ autoload :Rugged, 'rugged'
|
|
11
13
|
module Licensee
|
12
14
|
module Projects
|
13
15
|
class GitProject < Licensee::Projects::Project
|
14
|
-
attr_reader :
|
16
|
+
attr_reader :revision
|
15
17
|
|
16
18
|
class InvalidRepository < ArgumentError; end
|
17
19
|
|
18
20
|
def initialize(repo, revision: nil, **args)
|
19
|
-
@
|
20
|
-
repo
|
21
|
-
else
|
22
|
-
Rugged::Repository.new(repo)
|
23
|
-
end
|
24
|
-
|
21
|
+
@raw_repo = repo
|
25
22
|
@revision = revision
|
23
|
+
|
24
|
+
raise InvalidRepository if repository.head_unborn?
|
25
|
+
|
26
26
|
super(**args)
|
27
|
+
end
|
28
|
+
|
29
|
+
def repository
|
30
|
+
@repository ||= begin
|
31
|
+
return @raw_repo if @raw_repo.is_a? Rugged::Repository
|
32
|
+
|
33
|
+
Rugged::Repository.new(@raw_repo)
|
34
|
+
end
|
27
35
|
rescue Rugged::OSError, Rugged::RepositoryError
|
28
36
|
raise InvalidRepository
|
29
37
|
end
|
30
38
|
|
31
39
|
def close
|
32
|
-
|
40
|
+
repository.close
|
33
41
|
end
|
34
42
|
|
35
43
|
private
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Licensee::Project represents an open source project on disk
|
2
4
|
# It is not used directly, but rather is extended by FSProject and GitProject
|
3
5
|
# depending on the type of file system access available
|
@@ -113,7 +115,7 @@ module Licensee
|
|
113
115
|
return [] if files.empty? || files.nil?
|
114
116
|
|
115
117
|
found = files.map { |file| file.merge(score: yield(file[:name])) }
|
116
|
-
found.select! { |file| file[:score]
|
118
|
+
found.select! { |file| file[:score].positive? }
|
117
119
|
found.sort { |a, b| b[:score] <=> a[:score] }
|
118
120
|
end
|
119
121
|
|
@@ -137,7 +139,7 @@ module Licensee
|
|
137
139
|
# Returns an array of LicenseFiles with LPGL first
|
138
140
|
def prioritize_lgpl(files)
|
139
141
|
return files if files.empty?
|
140
|
-
return files unless files.first.license
|
142
|
+
return files unless files.first.license&.gpl?
|
141
143
|
|
142
144
|
lesser = files.find_index(&:lgpl?)
|
143
145
|
files.unshift(files.delete_at(lesser)) if lesser
|
data/lib/licensee/rule.rb
CHANGED
data/lib/licensee/version.rb
CHANGED
data/spec/bin_spec.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe 'fixture test' do
|
4
|
+
fixtures.each do |fixture|
|
5
|
+
let(:options) { { detect_packages: true, detect_readme: true } }
|
6
|
+
|
7
|
+
context "the #{fixture} fixture" do
|
8
|
+
let(:path) { fixture_path(fixture) }
|
9
|
+
let(:other) { Licensee::License.find('other') }
|
10
|
+
let(:none) { Licensee::License.find('none') }
|
11
|
+
let(:expectations) { fixture_licenses[fixture] || {} }
|
12
|
+
let(:license_file) { subject.license_file }
|
13
|
+
let(:matcher) { license_file&.matcher }
|
14
|
+
|
15
|
+
subject { Licensee.project(path, options) }
|
16
|
+
|
17
|
+
it 'has an expected license in fixtures-licenses.yml' do
|
18
|
+
msg = 'Expected an entry in `'.dup
|
19
|
+
msg << fixture_path('fixtures-licenses.yml')
|
20
|
+
msg << "` for the `#{fixture}` fixture. Please run "
|
21
|
+
msg << 'script/dump-fixture-licenses and confirm the output.'
|
22
|
+
expect(fixture_licenses).to have_key(fixture), msg
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'detects the license' do
|
26
|
+
expected = if expectations['key']
|
27
|
+
Licensee::License.find(expectations['key'])
|
28
|
+
else
|
29
|
+
none
|
30
|
+
end
|
31
|
+
|
32
|
+
expect(subject.license).to eql(expected)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns the expected hash' do
|
36
|
+
hash = license_file ? license_file.content_hash : nil
|
37
|
+
expect(hash).to eql(expectations['hash'])
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'uses the expected matcher' do
|
41
|
+
expected = matcher ? matcher.name.to_s : nil
|
42
|
+
expect(expected).to eql(expectations['matcher'])
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/spec/fixtures/detect.json
CHANGED
@@ -94,18 +94,20 @@
|
|
94
94
|
"name": "exact",
|
95
95
|
"confidence": 100
|
96
96
|
},
|
97
|
-
"matched_license": "MIT"
|
97
|
+
"matched_license": "MIT",
|
98
|
+
"attribution": "Copyright (c) 2014-2017 Ben Balter"
|
98
99
|
},
|
99
100
|
{
|
100
101
|
"filename": "licensee.gemspec",
|
101
|
-
"content": "
|
102
|
+
"content": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/licensee/version', __dir__)\n\nGem::Specification.new do |gem|\n gem.name = 'licensee'\n gem.version = Licensee::VERSION\n\n gem.summary = 'A Ruby Gem to detect open source project licenses'\n gem.description = <<-DESC\n Licensee automates the process of reading LICENSE files and\n compares their contents to known licenses using a fancy maths.\n DESC\n\n gem.authors = ['Ben Balter']\n gem.email = 'ben.balter@github.com'\n gem.homepage = 'https://github.com/benbalter/licensee'\n gem.license = 'MIT'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '~> 4.8')\n gem.add_dependency('reverse_markdown', '~> 1.0')\n gem.add_dependency('rugged', '~> 0.24')\n gem.add_dependency('thor', '~> 0.19')\n\n gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')\n gem.add_development_dependency('pry', '~> 0.9')\n gem.add_development_dependency('rake', '~> 10.3')\n gem.add_development_dependency('rspec', '~> 3.5')\n gem.add_development_dependency('rubocop', '~> 0.69')\n gem.add_development_dependency('simplecov', '~> 0.16')\n gem.add_development_dependency('webmock', '~> 3.1')\n\n gem.required_ruby_version = '> 2.3'\n\n # ensure the gem is built out of versioned files\n gem.files = Dir[\n 'Rakefile',\n '{bin,lib,man,test,vendor,spec}/**/*',\n 'README*', 'LICENSE*'\n ] & `git ls-files -z`.split(\"\\0\")\nend\n",
|
102
103
|
"content_hash": null,
|
103
104
|
"content_normalized": null,
|
104
105
|
"matcher": {
|
105
106
|
"name": "gemspec",
|
106
107
|
"confidence": 90
|
107
108
|
},
|
108
|
-
"matched_license": "MIT"
|
109
|
+
"matched_license": "MIT",
|
110
|
+
"attribution": null
|
109
111
|
}
|
110
112
|
]
|
111
|
-
}
|
113
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# Map of fixtures to expectation as an added integration test
|
2
|
+
---
|
3
|
+
apache-with-readme-notice:
|
4
|
+
key: apache-2.0
|
5
|
+
matcher: exact
|
6
|
+
hash: ab3901051663cb8ee5dea9ebdff406ad136910e3
|
7
|
+
bsd-3-lists:
|
8
|
+
key: bsd-3-clause
|
9
|
+
matcher:
|
10
|
+
hash:
|
11
|
+
bsd-plus-patents:
|
12
|
+
key: other
|
13
|
+
matcher:
|
14
|
+
hash:
|
15
|
+
bsl:
|
16
|
+
key: bsl-1.0
|
17
|
+
matcher: exact
|
18
|
+
hash: ca8f916d00c234719956e932061f192abb2d5bf9
|
19
|
+
case-sensitive:
|
20
|
+
key: other
|
21
|
+
matcher:
|
22
|
+
hash: da39a3ee5e6b4b0d3255bfef95601890afd80709
|
23
|
+
cc-by-nc-sa:
|
24
|
+
key: other
|
25
|
+
matcher:
|
26
|
+
hash: 5327932ea9cfee2d8d1ab7d5e088e868413eadea
|
27
|
+
cc-by-nd:
|
28
|
+
key: other
|
29
|
+
matcher:
|
30
|
+
hash: a75ef554ca6941d195bbc1197f934d43a75b312d
|
31
|
+
copyright-encoding:
|
32
|
+
key: no-license
|
33
|
+
matcher: copyright
|
34
|
+
hash: da39a3ee5e6b4b0d3255bfef95601890afd80709
|
35
|
+
crlf-license:
|
36
|
+
key: gpl-3.0
|
37
|
+
matcher: exact
|
38
|
+
hash: b22f1b1f953a38a8a11686587b98831858d6468b
|
39
|
+
description-license:
|
40
|
+
key: other
|
41
|
+
matcher:
|
42
|
+
hash: ab0fb718684bbc67c7dfc2e9ab2175dab4fcb819
|
43
|
+
fcpl-modified-mpl:
|
44
|
+
key: other
|
45
|
+
matcher:
|
46
|
+
hash: '06942321efd22b697fc4600bf68c0b6b3399cb12'
|
47
|
+
gemspec:
|
48
|
+
key:
|
49
|
+
matcher:
|
50
|
+
hash:
|
51
|
+
gpl3-without-instructions:
|
52
|
+
key: gpl-3.0
|
53
|
+
matcher: exact
|
54
|
+
hash: b22f1b1f953a38a8a11686587b98831858d6468b
|
55
|
+
html:
|
56
|
+
key: epl-1.0
|
57
|
+
matcher: dice
|
58
|
+
hash: 5265922b5943810a3ad23c66c50a0828ba342bfd
|
59
|
+
lgpl:
|
60
|
+
key: lgpl-3.0
|
61
|
+
matcher: exact
|
62
|
+
hash: bdb3c042bd84f914eacfbe4977c5e58352745809
|
63
|
+
license-folder:
|
64
|
+
key:
|
65
|
+
matcher:
|
66
|
+
hash:
|
67
|
+
license-in-parent-folder:
|
68
|
+
key: mit
|
69
|
+
matcher: exact
|
70
|
+
hash: d64f3bb4282a97b37454b5bb96a8a264a3363dc3
|
71
|
+
license-with-readme-reference:
|
72
|
+
key: mit
|
73
|
+
matcher: exact
|
74
|
+
hash: d64f3bb4282a97b37454b5bb96a8a264a3363dc3
|
75
|
+
markdown-gpl:
|
76
|
+
key: gpl-2.0
|
77
|
+
matcher: dice
|
78
|
+
hash: a0de4ee2a7e6ef2c2f6283b09cc755af5de5a5cb
|
79
|
+
mit:
|
80
|
+
key: mit
|
81
|
+
matcher: exact
|
82
|
+
hash: d64f3bb4282a97b37454b5bb96a8a264a3363dc3
|
83
|
+
mit-optional:
|
84
|
+
key: mit
|
85
|
+
matcher: exact
|
86
|
+
hash: d64f3bb4282a97b37454b5bb96a8a264a3363dc3
|
87
|
+
mit-with-copyright:
|
88
|
+
key: mit
|
89
|
+
matcher:
|
90
|
+
hash:
|
91
|
+
mpl-without-hrs:
|
92
|
+
key: mpl-2.0
|
93
|
+
matcher: exact
|
94
|
+
hash: b4db668fa7573bfdcae74eb51eafc961034f0a61
|
95
|
+
multiple-license-files:
|
96
|
+
key: other
|
97
|
+
matcher:
|
98
|
+
hash:
|
99
|
+
readme:
|
100
|
+
key: mit
|
101
|
+
matcher:
|
102
|
+
hash:
|
103
|
+
webmock:
|
104
|
+
key:
|
105
|
+
matcher:
|
106
|
+
hash:
|
107
|
+
wrk-modified-apache:
|
108
|
+
key: other
|
109
|
+
matcher:
|
110
|
+
hash: e733ea59fcc053841df5a1a3574a298d9ee3635e
|
@@ -0,0 +1,262 @@
|
|
1
|
+
|
2
|
+
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
3
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
8
|
+
<title>Eclipse Public License - Version 1.0</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body {
|
11
|
+
size: 8.5in 11.0in;
|
12
|
+
margin: 0.25in 0.5in 0.25in 0.5in;
|
13
|
+
tab-interval: 0.5in;
|
14
|
+
}
|
15
|
+
p {
|
16
|
+
margin-left: auto;
|
17
|
+
margin-top: 0.5em;
|
18
|
+
margin-bottom: 0.5em;
|
19
|
+
}
|
20
|
+
p.list {
|
21
|
+
margin-left: 0.5in;
|
22
|
+
margin-top: 0.05em;
|
23
|
+
margin-bottom: 0.05em;
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body lang="EN-US">
|
30
|
+
|
31
|
+
<h2>Eclipse Public License - v 1.0</h2>
|
32
|
+
|
33
|
+
<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
|
34
|
+
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
|
35
|
+
DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
|
36
|
+
AGREEMENT.</p>
|
37
|
+
|
38
|
+
<p><b>1. DEFINITIONS</b></p>
|
39
|
+
|
40
|
+
<p>"Contribution" means:</p>
|
41
|
+
|
42
|
+
<p class="list">a) in the case of the initial Contributor, the initial
|
43
|
+
code and documentation distributed under this Agreement, and</p>
|
44
|
+
<p class="list">b) in the case of each subsequent Contributor:</p>
|
45
|
+
<p class="list">i) changes to the Program, and</p>
|
46
|
+
<p class="list">ii) additions to the Program;</p>
|
47
|
+
<p class="list">where such changes and/or additions to the Program
|
48
|
+
originate from and are distributed by that particular Contributor. A
|
49
|
+
Contribution 'originates' from a Contributor if it was added to the
|
50
|
+
Program by such Contributor itself or anyone acting on such
|
51
|
+
Contributor's behalf. Contributions do not include additions to the
|
52
|
+
Program which: (i) are separate modules of software distributed in
|
53
|
+
conjunction with the Program under their own license agreement, and (ii)
|
54
|
+
are not derivative works of the Program.</p>
|
55
|
+
|
56
|
+
<p>"Contributor" means any person or entity that distributes
|
57
|
+
the Program.</p>
|
58
|
+
|
59
|
+
<p>"Licensed Patents" mean patent claims licensable by a
|
60
|
+
Contributor which are necessarily infringed by the use or sale of its
|
61
|
+
Contribution alone or when combined with the Program.</p>
|
62
|
+
|
63
|
+
<p>"Program" means the Contributions distributed in accordance
|
64
|
+
with this Agreement.</p>
|
65
|
+
|
66
|
+
<p>"Recipient" means anyone who receives the Program under
|
67
|
+
this Agreement, including all Contributors.</p>
|
68
|
+
|
69
|
+
<p><b>2. GRANT OF RIGHTS</b></p>
|
70
|
+
|
71
|
+
<p class="list">a) Subject to the terms of this Agreement, each
|
72
|
+
Contributor hereby grants Recipient a non-exclusive, worldwide,
|
73
|
+
royalty-free copyright license to reproduce, prepare derivative works
|
74
|
+
of, publicly display, publicly perform, distribute and sublicense the
|
75
|
+
Contribution of such Contributor, if any, and such derivative works, in
|
76
|
+
source code and object code form.</p>
|
77
|
+
|
78
|
+
<p class="list">b) Subject to the terms of this Agreement, each
|
79
|
+
Contributor hereby grants Recipient a non-exclusive, worldwide,
|
80
|
+
royalty-free patent license under Licensed Patents to make, use, sell,
|
81
|
+
offer to sell, import and otherwise transfer the Contribution of such
|
82
|
+
Contributor, if any, in source code and object code form. This patent
|
83
|
+
license shall apply to the combination of the Contribution and the
|
84
|
+
Program if, at the time the Contribution is added by the Contributor,
|
85
|
+
such addition of the Contribution causes such combination to be covered
|
86
|
+
by the Licensed Patents. The patent license shall not apply to any other
|
87
|
+
combinations which include the Contribution. No hardware per se is
|
88
|
+
licensed hereunder.</p>
|
89
|
+
|
90
|
+
<p class="list">c) Recipient understands that although each Contributor
|
91
|
+
grants the licenses to its Contributions set forth herein, no assurances
|
92
|
+
are provided by any Contributor that the Program does not infringe the
|
93
|
+
patent or other intellectual property rights of any other entity. Each
|
94
|
+
Contributor disclaims any liability to Recipient for claims brought by
|
95
|
+
any other entity based on infringement of intellectual property rights
|
96
|
+
or otherwise. As a condition to exercising the rights and licenses
|
97
|
+
granted hereunder, each Recipient hereby assumes sole responsibility to
|
98
|
+
secure any other intellectual property rights needed, if any. For
|
99
|
+
example, if a third party patent license is required to allow Recipient
|
100
|
+
to distribute the Program, it is Recipient's responsibility to acquire
|
101
|
+
that license before distributing the Program.</p>
|
102
|
+
|
103
|
+
<p class="list">d) Each Contributor represents that to its knowledge it
|
104
|
+
has sufficient copyright rights in its Contribution, if any, to grant
|
105
|
+
the copyright license set forth in this Agreement.</p>
|
106
|
+
|
107
|
+
<p><b>3. REQUIREMENTS</b></p>
|
108
|
+
|
109
|
+
<p>A Contributor may choose to distribute the Program in object code
|
110
|
+
form under its own license agreement, provided that:</p>
|
111
|
+
|
112
|
+
<p class="list">a) it complies with the terms and conditions of this
|
113
|
+
Agreement; and</p>
|
114
|
+
|
115
|
+
<p class="list">b) its license agreement:</p>
|
116
|
+
|
117
|
+
<p class="list">i) effectively disclaims on behalf of all Contributors
|
118
|
+
all warranties and conditions, express and implied, including warranties
|
119
|
+
or conditions of title and non-infringement, and implied warranties or
|
120
|
+
conditions of merchantability and fitness for a particular purpose;</p>
|
121
|
+
|
122
|
+
<p class="list">ii) effectively excludes on behalf of all Contributors
|
123
|
+
all liability for damages, including direct, indirect, special,
|
124
|
+
incidental and consequential damages, such as lost profits;</p>
|
125
|
+
|
126
|
+
<p class="list">iii) states that any provisions which differ from this
|
127
|
+
Agreement are offered by that Contributor alone and not by any other
|
128
|
+
party; and</p>
|
129
|
+
|
130
|
+
<p class="list">iv) states that source code for the Program is available
|
131
|
+
from such Contributor, and informs licensees how to obtain it in a
|
132
|
+
reasonable manner on or through a medium customarily used for software
|
133
|
+
exchange.</p>
|
134
|
+
|
135
|
+
<p>When the Program is made available in source code form:</p>
|
136
|
+
|
137
|
+
<p class="list">a) it must be made available under this Agreement; and</p>
|
138
|
+
|
139
|
+
<p class="list">b) a copy of this Agreement must be included with each
|
140
|
+
copy of the Program.</p>
|
141
|
+
|
142
|
+
<p>Contributors may not remove or alter any copyright notices contained
|
143
|
+
within the Program.</p>
|
144
|
+
|
145
|
+
<p>Each Contributor must identify itself as the originator of its
|
146
|
+
Contribution, if any, in a manner that reasonably allows subsequent
|
147
|
+
Recipients to identify the originator of the Contribution.</p>
|
148
|
+
|
149
|
+
<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
|
150
|
+
|
151
|
+
<p>Commercial distributors of software may accept certain
|
152
|
+
responsibilities with respect to end users, business partners and the
|
153
|
+
like. While this license is intended to facilitate the commercial use of
|
154
|
+
the Program, the Contributor who includes the Program in a commercial
|
155
|
+
product offering should do so in a manner which does not create
|
156
|
+
potential liability for other Contributors. Therefore, if a Contributor
|
157
|
+
includes the Program in a commercial product offering, such Contributor
|
158
|
+
("Commercial Contributor") hereby agrees to defend and
|
159
|
+
indemnify every other Contributor ("Indemnified Contributor")
|
160
|
+
against any losses, damages and costs (collectively "Losses")
|
161
|
+
arising from claims, lawsuits and other legal actions brought by a third
|
162
|
+
party against the Indemnified Contributor to the extent caused by the
|
163
|
+
acts or omissions of such Commercial Contributor in connection with its
|
164
|
+
distribution of the Program in a commercial product offering. The
|
165
|
+
obligations in this section do not apply to any claims or Losses
|
166
|
+
relating to any actual or alleged intellectual property infringement. In
|
167
|
+
order to qualify, an Indemnified Contributor must: a) promptly notify
|
168
|
+
the Commercial Contributor in writing of such claim, and b) allow the
|
169
|
+
Commercial Contributor to control, and cooperate with the Commercial
|
170
|
+
Contributor in, the defense and any related settlement negotiations. The
|
171
|
+
Indemnified Contributor may participate in any such claim at its own
|
172
|
+
expense.</p>
|
173
|
+
|
174
|
+
<p>For example, a Contributor might include the Program in a commercial
|
175
|
+
product offering, Product X. That Contributor is then a Commercial
|
176
|
+
Contributor. If that Commercial Contributor then makes performance
|
177
|
+
claims, or offers warranties related to Product X, those performance
|
178
|
+
claims and warranties are such Commercial Contributor's responsibility
|
179
|
+
alone. Under this section, the Commercial Contributor would have to
|
180
|
+
defend claims against the other Contributors related to those
|
181
|
+
performance claims and warranties, and if a court requires any other
|
182
|
+
Contributor to pay any damages as a result, the Commercial Contributor
|
183
|
+
must pay those damages.</p>
|
184
|
+
|
185
|
+
<p><b>5. NO WARRANTY</b></p>
|
186
|
+
|
187
|
+
<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
|
188
|
+
PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
189
|
+
OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
|
190
|
+
ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
|
191
|
+
OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
|
192
|
+
responsible for determining the appropriateness of using and
|
193
|
+
distributing the Program and assumes all risks associated with its
|
194
|
+
exercise of rights under this Agreement , including but not limited to
|
195
|
+
the risks and costs of program errors, compliance with applicable laws,
|
196
|
+
damage to or loss of data, programs or equipment, and unavailability or
|
197
|
+
interruption of operations.</p>
|
198
|
+
|
199
|
+
<p><b>6. DISCLAIMER OF LIABILITY</b></p>
|
200
|
+
|
201
|
+
<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
|
202
|
+
NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
|
203
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
|
204
|
+
WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
|
205
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
206
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
|
207
|
+
DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
|
208
|
+
HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
|
209
|
+
|
210
|
+
<p><b>7. GENERAL</b></p>
|
211
|
+
|
212
|
+
<p>If any provision of this Agreement is invalid or unenforceable under
|
213
|
+
applicable law, it shall not affect the validity or enforceability of
|
214
|
+
the remainder of the terms of this Agreement, and without further action
|
215
|
+
by the parties hereto, such provision shall be reformed to the minimum
|
216
|
+
extent necessary to make such provision valid and enforceable.</p>
|
217
|
+
|
218
|
+
<p>If Recipient institutes patent litigation against any entity
|
219
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
220
|
+
Program itself (excluding combinations of the Program with other
|
221
|
+
software or hardware) infringes such Recipient's patent(s), then such
|
222
|
+
Recipient's rights granted under Section 2(b) shall terminate as of the
|
223
|
+
date such litigation is filed.</p>
|
224
|
+
|
225
|
+
<p>All Recipient's rights under this Agreement shall terminate if it
|
226
|
+
fails to comply with any of the material terms or conditions of this
|
227
|
+
Agreement and does not cure such failure in a reasonable period of time
|
228
|
+
after becoming aware of such noncompliance. If all Recipient's rights
|
229
|
+
under this Agreement terminate, Recipient agrees to cease use and
|
230
|
+
distribution of the Program as soon as reasonably practicable. However,
|
231
|
+
Recipient's obligations under this Agreement and any licenses granted by
|
232
|
+
Recipient relating to the Program shall continue and survive.</p>
|
233
|
+
|
234
|
+
<p>Everyone is permitted to copy and distribute copies of this
|
235
|
+
Agreement, but in order to avoid inconsistency the Agreement is
|
236
|
+
copyrighted and may only be modified in the following manner. The
|
237
|
+
Agreement Steward reserves the right to publish new versions (including
|
238
|
+
revisions) of this Agreement from time to time. No one other than the
|
239
|
+
Agreement Steward has the right to modify this Agreement. The Eclipse
|
240
|
+
Foundation is the initial Agreement Steward. The Eclipse Foundation may
|
241
|
+
assign the responsibility to serve as the Agreement Steward to a
|
242
|
+
suitable separate entity. Each new version of the Agreement will be
|
243
|
+
given a distinguishing version number. The Program (including
|
244
|
+
Contributions) may always be distributed subject to the version of the
|
245
|
+
Agreement under which it was received. In addition, after a new version
|
246
|
+
of the Agreement is published, Contributor may elect to distribute the
|
247
|
+
Program (including its Contributions) under the new version. Except as
|
248
|
+
expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
|
249
|
+
rights or licenses to the intellectual property of any Contributor under
|
250
|
+
this Agreement, whether expressly, by implication, estoppel or
|
251
|
+
otherwise. All rights in the Program not expressly granted under this
|
252
|
+
Agreement are reserved.</p>
|
253
|
+
|
254
|
+
<p>This Agreement is governed by the laws of the State of New York and
|
255
|
+
the intellectual property laws of the United States of America. No party
|
256
|
+
to this Agreement will bring a legal action under this Agreement more
|
257
|
+
than one year after the cause of action arose. Each party waives its
|
258
|
+
rights to a jury trial in any resulting litigation.</p>
|
259
|
+
|
260
|
+
</body>
|
261
|
+
|
262
|
+
</html>
|