This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch maven-deploy-plugin-4.x
in repository https://gitbox.apache.org/repos/asf/maven-deploy-plugin.git

commit 62b1232b73ab27acb9ef212113e281cc565a54a8
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 21 21:00:21 2026 +0100

    Report a malformed pom.properties like an unreadable JAR entry
---
 src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java 
b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
index cccba58..688a853 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
@@ -275,7 +275,12 @@ public class DeployFileMojo extends AbstractDeployMojo {
                         if (propertiesEntry != null) {
                             try (InputStream propertiesInputStream = 
jarFile.getInputStream(propertiesEntry)) {
                                 Properties properties = new Properties();
-                                properties.load(propertiesInputStream);
+                                try {
+                                    properties.load(propertiesInputStream);
+                                } catch (IllegalArgumentException e) {
+                                    // a malformed unicode escape; report it 
like any other unreadable entry
+                                    throw new IOException("malformed " + 
propertiesEntry.getName(), e);
+                                }
                                 processPomProperties(properties);
                             }
                         }

Reply via email to