youngledo opened a new pull request, #652:
URL: https://github.com/apache/maven-deploy-plugin/pull/652
Following this checklist to help us incorporate your
contribution quickly and easily:
- [x] Your pull request should address just one issue, without pulling in
other changes.
- [x] Write a pull request description that is detailed enough to understand
what the pull request does, how, and why.
- [x] Each commit in the pull request should have a meaningful subject line
and body.
Note that commits might be squashed by a maintainer on merge.
- [x] Write unit tests that match behavioral changes, where the tests fail
if the changes to the runtime are not applied.
This may not always be possible but is a best-practice.
- [x] Run `mvn verify` to make sure basic checks pass.
A more thorough check will be performed on your pull request automatically.
- [x] You have run the integration tests successfully (`mvn -Prun-its
verify`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January
2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [x] I hereby declare this contribution to be licenced under the [Apache
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [x] In any other case, please file an [Apache Individual Contributor
License Agreement](https://www.apache.org/licenses/icla.pdf).
---
Improve Error Message Readability with Line Breaks
Purpose
This pull request enhances the readability of error messages produced by
the Maven Deploy Plugin by adding strategic line breaks to long error
messages. The changes make it easier for developers to quickly understand
deployment failures and their solutions.
Motivation
Long error messages in the Maven Deploy Plugin were previously displayed
as continuous text that wrapped at awkward positions, making it difficult
to:
- Quickly identify the root cause of deployment failures
- Distinguish between error descriptions and usage instructions
- Parse status codes and repository URLs in transfer errors
Before (hard to read):
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:3.1.3-SNAPSHOT:deploy
(default-deploy) on project devcloudsdks: Invalid
legacy syntax and layout for alternative repository:
"releases::default111::https://nexus.mingyuanyun.com/repository/maven-releases".
Use
"releases::https://nexus.mingyuanyun.com/repository/maven-releases"
instead, and only default layout is supported.
<img width="1341" height="285" alt="Image"
src="https://github.com/user-attachments/assets/26e4fc2b-2437-48fb-8686-b7fbb393fd3c"
/>
<img width="1609" height="801" alt="Image"
src="https://github.com/user-attachments/assets/7bfde612-84f6-4f06-8c53-b43d4250f096"
/>
After (clear structure):
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:3.1.3-SNAPSHOT:deploy
(default-deploy) on project devcloudsdks:
[ERROR] Invalid legacy syntax and layout for alternative repository:
"releases::default111::https://nexus.mingyuanyun.com/repository/maven-releases".
[ERROR] Use
"releases::https://nexus.mingyuanyun.com/repository/maven-releases" instead,
and only default layout is supported.
<img width="1316" height="360" alt="Image"
src="https://github.com/user-attachments/assets/9f10bc72-05ca-4244-982f-c924696ff37a"
/>
or
<img width="1313" height="361" alt="Image"
src="https://github.com/user-attachments/assets/d42f1ac5-bf2a-4f8f-9c05-8cbc52b30ea6"
/>
Testing
The changes have been tested with the following scenarios:
- Invalid legacy syntax errors (altDeploymentRepository with wrong format)
- Deployment transfer failures
- Missing repository configuration errors
Compatibility
- Backward Compatible: Yes - only changes message formatting, no API
changes
- Maven Versions: Works with both Maven 3.x and Maven 4.x
- Branches:
- master branch (Maven 4, version 4.0.0-beta-3-SNAPSHOT)
- maven-deploy-plugin-3.x branch (Maven 3, version 3.1.3-SNAPSHOT)
Benefits
1. Faster debugging: Developers can quickly scan error messages
2. Better IDE integration: Line breaks align with Maven's error output
format
3. Consistent formatting: All error messages follow the same pattern
4. Maintainable: Centralized formatting logic makes future changes easy
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]