You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/03 14:00:47 UTC

[I] IOException silently swallowed in ApplicationXmlWriter.write() [maven-ear-plugin]

elharo opened a new issue, #510:
URL: https://github.com/apache/maven-ear-plugin/issues/510

   ## Description
   
   In `ApplicationXmlWriter.java:111-113`, any `IOException` during XML writing is silently swallowed:
   
   ```java
   } catch (IOException ex) {
       // ignore
   }
   ```
   
   If the disk is full, a permission error occurs, or any other IO failure happens while writing `application.xml`, the exception is completely ignored. The EAR build will succeed with a truncated or missing `application.xml` deployment descriptor. The try-with-resources will close the Writer, but the partial/corrupt output goes undetected.
   
   ## Expected behavior
   
   The exception should be re-thrown wrapped in `EarPluginException` so the build fails on IO errors:
   
   ```java
   } catch (IOException ex) {
       throw new EarPluginException("Failed to write application.xml", ex);
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] IOException silently swallowed in ApplicationXmlWriter.write() [maven-ear-plugin]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo closed issue #510: IOException silently swallowed in ApplicationXmlWriter.write()
URL: https://github.com/apache/maven-ear-plugin/issues/510


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org