[MNG-5816] Empy maven.config cause Maven to exit with failure

Avoid adding non empty configuration argument that causes exception.

Signed-off-by: Karl Heinz Marbaise <khmarbaise@apache.org>
This commit is contained in:
tssp 2015-04-29 10:22:38 +02:00 committed by Karl Heinz Marbaise
parent f104ef8850
commit 193778ec0e
1 changed files with 4 additions and 1 deletions

View File

@ -377,7 +377,10 @@ public class MavenCli
{
for ( String arg : Files.toString( configFile, Charsets.UTF_8 ).split( "\\s+" ) )
{
args.add( arg );
if ( !arg.isEmpty() )
{
args.add( arg );
}
}
CommandLine config = cliManager.parse( args.toArray( new String[args.size()] ) );