5858public abstract class AbstractBootOperation <T extends AbstractBootOperation <T >>
5959 extends AbstractOperation <AbstractBootOperation <T >> {
6060
61- protected final Logger logger = Logger .getLogger (getClass ().getName ());
6261 private static final String INF_LIBS = "infLibs" ;
6362 private static final String LAUNCHER_LIBS = "launcherLibs" ;
6463 private static final String SOURCE_DIRECTORIES = "sourceDirectories" ;
64+ protected final Logger logger = Logger .getLogger (getClass ().getName ());
6565 private final List <File > infLibs_ = new ArrayList <>();
6666 private final List <File > launcherLibs_ = new ArrayList <>();
6767 private final Map <String , String > manifestAttributes_ = new HashMap <>();
@@ -580,7 +580,7 @@ protected void executeCopyBootLoader(File stagingDirectory) throws FileUtilsErro
580580 */
581581 protected void executeCopyInfClassesFiles (File stagingInfDirectory ) throws IOException {
582582 var infClassesDir = new File (stagingInfDirectory , "classes" );
583- BootUtils . mkDirs (infClassesDir );
583+ IOTools . createDirs (infClassesDir );
584584
585585 for (var dir : sourceDirectories_ ) {
586586 if (dir .exists ()) {
@@ -599,7 +599,7 @@ protected void executeCopyInfClassesFiles(File stagingInfDirectory) throws IOExc
599599 */
600600 protected void executeCopyInfLibs (File stagingInfDirectory ) throws IOException {
601601 var infLibDir = stagingInfDirectory .toPath ().resolve ("lib" );
602- BootUtils . mkDirs (infLibDir .toFile ());
602+ IOTools . createDirs (infLibDir .toFile ());
603603
604604 for (var jar : infLibs_ ) {
605605 if (jar .exists ()) {
@@ -674,7 +674,7 @@ protected File executeCreateArchive(File stagingDirectory) throws IOException {
674674 */
675675 protected void executeCreateManifest (File stagingDirectory ) throws IOException {
676676 var metaInfDir = stagingDirectory .toPath ().resolve ("META-INF" );
677- BootUtils . mkDirs (metaInfDir .toFile ());
677+ IOTools . createDirs (metaInfDir .toFile ());
678678
679679 var manifestFile = metaInfDir .resolve ("MANIFEST.MF" );
680680
@@ -722,10 +722,11 @@ protected T mainClass(String className) {
722722 * {@link #launcherLibs() launcherLibs}) required to create the archive have been provided, throws an
723723 * {@link IllegalArgumentException} otherwise.
724724 *
725+ * @throws IOException if the {@link #destinationDirectory() destination directory} could not be created
725726 * @throws IllegalArgumentException if a required element is missing or invalid
726727 */
727- @ SuppressFBWarnings ({ "DRE_DECLARED_RUNTIME_EXCEPTION" , "EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS" } )
728- protected void verifyExecute () throws IllegalArgumentException {
728+ @ SuppressFBWarnings ("DRE_DECLARED_RUNTIME_EXCEPTION" )
729+ protected void verifyExecute () throws IllegalArgumentException , IOException {
729730 if (TextTools .isBlank (mainClass_ )) {
730731 throw new IllegalArgumentException ("Project mainClass required." );
731732 } else if (TextTools .isBlank (launcherClass_ )) {
@@ -737,10 +738,9 @@ protected void verifyExecute() throws IllegalArgumentException {
737738 throw new IllegalArgumentException ("Destination directory required." );
738739 }
739740 try {
740- BootUtils . mkDirs (destinationDirectory_ );
741+ IOTools . createDirs (destinationDirectory_ );
741742 } catch (IOException e ) {
742- throw new IllegalArgumentException (
743- MessageFormat .format ("Cannot create directory {0}." , destinationDirectory_ ), e );
743+ throw new IOException ("Cannot create destination directory: " + destinationDirectory_ , e );
744744 }
745745 }
746746 for (var jar : launcherLibs_ ) {
0 commit comments