Commit fc8a1dc
committed
Improve Maven extracted_license storage and detection
We were only storing the list of attributes but the now "license" top
level elements. Because of this a maven tag with only name: mit would
not be detected properly as there is no rule for this and this would
yield too many false positive. Now we have a structure that is a list
of license as {license: {name: mit, url: foo: comments: bar}}
This ensures a more accurate detection. With this also regenerate all
Maven related tests, and also ensure we filter early empty and unused
license attributes (such as the "distribution")
Also add new tests and apply mild refactoring for maven license
detection for clarity.
Remove redundant tests and simplify some other tests for clarity.
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>1 parent 5b6998d commit fc8a1dc
279 files changed
Lines changed: 3144 additions & 26945 deletions
File tree
- src/packagedcode
- tests
- formattedcode/data/common
- packagedcode
- data
- m2
- aopalliance/aopalliance/1.0
- aspectj/aspectjrt/1.5.3
- biz/aQute/bndlib
- 0.0.203
- 0.0.238
- bytebuddy
- c3p0/c3p0/0.9.0.4
- codec/commons-codec/1.3
- collections/commons-collections/3.2
- com
- jcraft/jsch
- 0.1.23
- 0.1.27
- thoughtworks/xstream/xstream-parent/1.2.2
- depman
- digester/commons-digester/1.8
- el/commons-el/1.0
- hsqldb/hsqldb/1.8.0.7
- httpunit/httpunit/1.6.2
- io/commons-io/1.3.1
- javassist/javassist/3.4.GA
- javax/persistence/persistence-api/1.0
- jboss
- javassist/3.3.ga
- jboss-archive-browsing/5.0.0alpha-200607201-119
- jtidy/jtidy/4aug2000r7-dev
- junit/junit
- 3.8.1
- 3.8.2
- 4.4
- lang/commons-lang
- 2.1
- 2.3
- log4j/log4j/1.2.15
- logging/commons-logging
- 1.0.4
- 1.1
- mysql/mysql-connector-java/5.0.4
- net/sf
- ehcache/ehcache/1.2.3
- kxml/kxml2/2.2.2
- org
- acegisecurity/acegi-security-parent
- 1.0.5
- 1.0.7
- ajax4jsf/master/1.1.1
- apache
- apache
- 1
- 3
- 4
- commons/commons-jaxrs/1.22
- geronimo/genesis/config/project-config/1.1
- maven
- maven
- 2.0.1
- 2.0.2
- 2.0.4
- 2.0
- plugins/maven-dependency-plugin/2.0
- wagon
- wagon-file/1.0-alpha-5
- wagon-http-lightweight/1.0-alpha-5
- wagon-provider-api/1.0-alpha-5
- wagon-ssh/1.0-alpha-5
- wagon/1.0-alpha-6
- mina/build/1.1.1
- myfaces/maven/myfaces-master/1.0.5
- velocity/velocity/1.5
- aspectj
- aspectjrt
- 1.5.4
- 1.6.0
- aspectjtools
- 1.5.4
- 1.6.0
- aspectjweaver
- 1.5.4
- 1.6.0
- codehaus
- mojo
- aspectj-maven-plugin/1.0
- build-helper-maven-plugin/1.2-SNAPSHOT
- cobertura-maven-plugin/2.2
- findbugs-maven-plugin/1.1.1
- maven-buildnumber-plugin/0.9.6
- plexus/plexus/1.0.11
- easymock
- easymockclassextension/2.3
- easymock/2.3
- hibernate
- hibernate-annotations
- 3.2.1.ga
- 3.3.1.GA
- hibernate-commons-annotations/3.0.0.ga
- hibernate-entitymanager
- 3.2.1.ga
- 3.3.2.GA
- hibernate
- 3.2.1.ga
- 3.2.6.ga
- mortbay/jetty
- jetty-parent/7
- project/6.1.5
- servlet-api-2.5/6.1.5
- springframework
- spring-aop/2.5.3
- spring-aspects
- 2.5.3
- 2.5.4
- spring-beans/2.5.3
- spring-context-support/2.5.3
- spring-context/2.5.3
- spring-core/2.5.3
- spring-jdbc/2.5.3
- spring-orm/2.5.3
- spring-test
- 2.5.3
- 2.5.4
- spring-tx/2.5.3
- spring-webmvc
- 2.5.3
- 2.5.4
- spring-web/2.5.3
- spring/2.5.4
- testng/testng
- 5.7
- 5.8
- p6spy/p6spy/1.3
- parsing_issues
- parse_error
- was_empty
- validator/commons-validator
- 1.2.0
- 1.3.1
- velocity/velocity/1.4
- xml-apis/xml-apis/1.0.b2
- xmlpull/xmlpull/1.1.3.1
- maven2
- aopalliance-1.0
- commons-validator-1.2.0
- findbugs-maven-plugin-1.1.1
- foo-pom
- jrecordbind-2.3.4
- log4j
- logback-access
- pom-licenses
- spring-2.5.4
- spring-orm-2.5.3
- spring-webmvc-2.5.3
- maven_misc
- assemble
- plugin
- maven
- summarycode/data
- classify
- score
- tallies/packages
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
776 | 777 | | |
777 | 778 | | |
778 | 779 | | |
| |||
1254 | 1255 | | |
1255 | 1256 | | |
1256 | 1257 | | |
1257 | | - | |
| 1258 | + | |
1258 | 1259 | | |
1259 | 1260 | | |
1260 | 1261 | | |
| |||
1325 | 1326 | | |
1326 | 1327 | | |
1327 | 1328 | | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
1328 | 1354 | | |
1329 | 1355 | | |
1330 | 1356 | | |
1331 | | - | |
| 1357 | + | |
| 1358 | + | |
1332 | 1359 | | |
1333 | 1360 | | |
1334 | 1361 | | |
1335 | 1362 | | |
1336 | 1363 | | |
1337 | 1364 | | |
| 1365 | + | |
| 1366 | + | |
1338 | 1367 | | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
| 1368 | + | |
1353 | 1369 | | |
1354 | 1370 | | |
1355 | 1371 | | |
1356 | 1372 | | |
1357 | 1373 | | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
1358 | 1381 | | |
1359 | | - | |
1360 | | - | |
| 1382 | + | |
1361 | 1383 | | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | 1384 | | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1372 | 1412 | | |
1373 | | - | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1374 | 1444 | | |
1375 | 1445 | | |
1376 | 1446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
1145 | | - | |
| 1145 | + | |
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
| 1154 | + | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | | - | |
| 1191 | + | |
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
1200 | | - | |
| 1200 | + | |
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
818 | 819 | | |
819 | 820 | | |
820 | 821 | | |
821 | | - | |
822 | | - | |
| 822 | + | |
| 823 | + | |
823 | 824 | | |
824 | 825 | | |
825 | 826 | | |
| |||
2006 | 2007 | | |
2007 | 2008 | | |
2008 | 2009 | | |
2009 | | - | |
2010 | | - | |
| 2010 | + | |
| 2011 | + | |
2011 | 2012 | | |
2012 | 2013 | | |
2013 | 2014 | | |
2014 | 2015 | | |
2015 | 2016 | | |
2016 | | - | |
2017 | | - | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
2018 | 2020 | | |
2019 | 2021 | | |
2020 | 2022 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments