-
Notifications
You must be signed in to change notification settings - Fork 11
Description
AntHelper.java seems to use outputstreams in such a way that the outputs might get mixed up with outputs from other running tasks.
This becomes a problem when trying to run the plugin as part of a multithreaded Maven build. It might fail to:
[2019-04-25T10:16:52.515Z] [ERROR] Failed to execute goal org.sonatype.install4j:install4j-maven-plugin:1.0.8:compile (compile-installers)
on project install4j: Unable to parse version from input: Picked up JAVA_TOOL_OPTIONS:
-Dmaven.ext.class.path="pipeline-maven-spy.jar"
-Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="withMavene6640721"
install4j version 6.1.2 (build 6275), built on 2016-06-21 -> [Help 1]
The Exception is thrown here: https://github.com/sonatype/install4j-support/blob/master/install4j-maven-plugin/src/main/java/org/sonatype/install4j/maven/VersionHelper.java#L87
and if I understand correctly, the root of the problem is AntHelper
https://github.com/sonatype/install4j-support/blob/master/install4j-maven-plugin/src/main/java/org/sonatype/install4j/maven/AntHelper.java#L64
It seems to me that MavenAntLoggerAdapter is used and the output of calls is redirected to standard output where it mingles with other texts failing the version parsing.
Maybe the output could be redirected to a temporary file and read from there or fixed in some other way?