1010import java .nio .file .Path ;
1111import java .nio .file .Paths ;
1212import java .util .ArrayList ;
13+ import java .util .Arrays ;
14+ import java .util .Collections ;
1315import java .util .LinkedList ;
1416import java .util .List ;
1517import java .util .Properties ;
@@ -351,9 +353,7 @@ protected List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException
351353 String wdtArchiveFilename = wdtArchivePath .getFileName ().toString ();
352354 Files .copy (wdtArchivePath , Paths .get (tmpDir , wdtArchiveFilename ));
353355 //Until WDT supports multiple archives, take single file argument from CLI and convert to list
354- List <String > archives = new ArrayList <>();
355- archives .add (wdtArchiveFilename );
356- dockerfileOptions .setWdtArchives (archives );
356+ dockerfileOptions .setWdtArchives (Collections .singletonList (wdtArchiveFilename ));
357357 }
358358 dockerfileOptions .setDomainHome (wdtDomainHome );
359359
@@ -362,9 +362,8 @@ protected List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException
362362 if (wdtVariablesPath != null && Files .isRegularFile (wdtVariablesPath )) {
363363 String wdtVariableFilename = wdtVariablesPath .getFileName ().toString ();
364364 Files .copy (wdtVariablesPath , Paths .get (tmpDir , wdtVariableFilename ));
365- retVal .add (Constants .BUILD_ARG );
366- retVal .add ("WDT_VARIABLE=" + wdtVariableFilename );
367- retVal .addAll (getWdtRequiredBuildArgs (wdtVariablesPath ));
365+ //Until WDT supports multiple variable files, take single file argument from CLI and convert to list
366+ dockerfileOptions .setWdtVariables (Collections .singletonList (wdtVariableFilename ));
368367 }
369368 }
370369 logger .exiting ();
0 commit comments