10
10
import java .nio .file .Path ;
11
11
import java .nio .file .Paths ;
12
12
import java .util .ArrayList ;
13
+ import java .util .Arrays ;
14
+ import java .util .Collections ;
13
15
import java .util .LinkedList ;
14
16
import java .util .List ;
15
17
import java .util .Properties ;
@@ -351,9 +353,7 @@ protected List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException
351
353
String wdtArchiveFilename = wdtArchivePath .getFileName ().toString ();
352
354
Files .copy (wdtArchivePath , Paths .get (tmpDir , wdtArchiveFilename ));
353
355
//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 ));
357
357
}
358
358
dockerfileOptions .setDomainHome (wdtDomainHome );
359
359
@@ -362,9 +362,8 @@ protected List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException
362
362
if (wdtVariablesPath != null && Files .isRegularFile (wdtVariablesPath )) {
363
363
String wdtVariableFilename = wdtVariablesPath .getFileName ().toString ();
364
364
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 ));
368
367
}
369
368
}
370
369
logger .exiting ();
0 commit comments