File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
src/main/java/io/github/fvarrui/javapackager/packagers Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -205,26 +205,23 @@ public void resolveResources() throws Exception {
205205 * @param resources List of files and folders to be copied
206206 * @param destination Destination folder. All specified resources will be copied
207207 * here
208+ * @throws Exception
208209 */
209- protected void copyAdditionalResources (List <File > resources , File destination ) {
210+ protected void copyAdditionalResources (List <File > resources , File destination ) throws Exception {
210211
211212 Logger .infoIndent ("Copying additional resources" );
212213
213- resources . stream (). forEach ( r -> {
214+ for ( File r : resources ) {
214215 if (!r .exists ()) {
215216 Logger .warn ("Additional resource " + r + " doesn't exist" );
216217 return ;
217218 }
218- try {
219- if (r .isDirectory ()) {
220- FileUtils .copyFolderToFolder (r , destination );
221- } else if (r .isFile ()) {
222- FileUtils .copyFileToFolder (r , destination );
223- }
224- } catch (Exception e ) {
225- Logger .error (e .getMessage (), e );
219+ if (r .isDirectory ()) {
220+ FileUtils .copyFolderToFolder (r , destination );
221+ } else if (r .isFile ()) {
222+ FileUtils .copyFileToFolder (r , destination );
226223 }
227- });
224+ }
228225
229226 // copy bootstrap script
230227 if (FileUtils .exists (getScripts ().getBootstrap ())) {
You can’t perform that action at this time.
0 commit comments