forked from mojohaus/license-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mojohaus#423 Don't log warning for unused overrides in remote ove…
…rride file.
- Loading branch information
1 parent
4736bf6
commit 05b4564
Showing
6 changed files
with
119 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
invoker.goals=clean install license:add-third-party | ||
invoker.failureBehavior=fail-fast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
#%L | ||
License Maven Plugin | ||
%% | ||
Copyright (C) 2008 - 2011 CodeLutin, Codehaus, Tony Chemit | ||
%% | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Lesser Public License for more details. | ||
You should have received a copy of the GNU General Lesser Public | ||
License along with this program. If not, see | ||
<http://www.gnu.org/licenses/lgpl-3.0.html>. | ||
#L% | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.codehaus.mojo.license.test</groupId> | ||
<artifactId>issue-423</artifactId> | ||
<version>@pom.version@</version> | ||
|
||
<name>License Test :: ISSUE-423</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<license.verbose>true</license.verbose> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.8.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* #%L | ||
* License Maven Plugin | ||
* %% | ||
* Copyright (C) 2008 - 2011 CodeLutin, Codehaus, Tony Chemit | ||
* %% | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Lesser Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Lesser Public | ||
* License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/lgpl-3.0.html>. | ||
* #L% | ||
*/ | ||
|
||
file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY.txt') | ||
assert file.exists() | ||
content = file.text | ||
// Check that the non-overridden dependency is present. | ||
assert content.contains('(Apache License, Version 2.0) Apache Commons Lang (org.apache.commons:commons-lang3:3.8.1 - http://commons.apache.org/proper/commons-lang/)') | ||
// Check that the license name for a dependency can be overridden. | ||
assert content.contains('(Apache-2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)') | ||
// Check that the unused override does not end up in the report. | ||
assert !content.contains('antlr') | ||
|
||
// Check that the log contains a warning for the unused override. | ||
log = new File(basedir, 'build.log') | ||
assert log.exists() | ||
assert log.text.contains('dependency [org.antlr--antlr--3.5.2] does not exist in project.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
commons-logging--commons-logging--1.1.1=Apache-2.0 | ||
org.antlr--antlr--3.5.2=BSD-3-Clause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters