summaryrefslogtreecommitdiff
path: root/lib/license
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-20 15:55:59 -0600
committermo khan <mo.khan@gmail.com>2020-07-21 16:46:02 -0600
commitb3faccb3e3007ddfd41ef251ad8a925542fe2500 (patch)
treec2389439b9d41193079daf29a7bb82b6127e1e88 /lib/license
parente1bb260b43763a36536b7d3fa4d73108ffb604d4 (diff)
Update maven/gradle offline tests
* Let maven figure out the version of the license plugin that it is compatible with * Print the error when the setup fails * Add tests for multiple versions of maven and java * Install packages into a project specific directory to prevent cross test pollution * Specify the list of supported Maven versions * Update CHANGELOG and bump the version
Diffstat (limited to 'lib/license')
-rw-r--r--lib/license/finder/ext/maven.rb2
-rw-r--r--lib/license/management/shell.rb13
-rw-r--r--lib/license/management/version.rb2
3 files changed, 8 insertions, 9 deletions
diff --git a/lib/license/finder/ext/maven.rb b/lib/license/finder/ext/maven.rb
index 1a3dea8..6c95b1d 100644
--- a/lib/license/finder/ext/maven.rb
+++ b/lib/license/finder/ext/maven.rb
@@ -25,7 +25,7 @@ module LicenseFinder
[
package_management_command,
"-e",
- "org.codehaus.mojo:license-maven-plugin:2.0.0:aggregate-download-licenses",
+ "org.codehaus.mojo:license-maven-plugin:aggregate-download-licenses",
"-Dlicense.excludedScopes=#{@ignored_groups.to_a.join(',')}",
"-Dorg.slf4j.simpleLogger.log.org.codehaus.mojo.license=debug",
ENV.fetch('MAVEN_CLI_OPTS', '-DskipTests')
diff --git a/lib/license/management/shell.rb b/lib/license/management/shell.rb
index 408c760..47639df 100644
--- a/lib/license/management/shell.rb
+++ b/lib/license/management/shell.rb
@@ -79,14 +79,13 @@ module License
end
def record(stdout, stderr, status)
- logger.debug(stdout) if present?(stdout)
- return unless present?(stderr)
+ severity = status.success? ? Logger::DEBUG : Logger::ERROR
+ flush(stdout, severity)
+ flush(stderr, severity)
+ end
- if status.success?
- logger.debug(stderr)
- else
- logger.error(stderr)
- end
+ def flush(message, severity)
+ logger.add(severity, message) if present?(message)
end
def collapsible_section(header)
diff --git a/lib/license/management/version.rb b/lib/license/management/version.rb
index 72c1491..5402857 100644
--- a/lib/license/management/version.rb
+++ b/lib/license/management/version.rb
@@ -2,6 +2,6 @@
module License
module Management
- VERSION = '3.19.0'
+ VERSION = '3.19.1'
end
end