You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/09/30 11:37:02 UTC
[GitHub] [maven-release] Captain-P-Goldfish opened a new pull request, #154: Respect line separator also on release:prepare
Captain-P-Goldfish opened a new pull request, #154:
URL: https://github.com/apache/maven-release/pull/154
The line separator config should also be used on `mvn release:prepare` and not just on `mvn release:prepare-with-pom`
--
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
[GitHub] [maven-release] Captain-P-Goldfish commented on a diff in pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
Captain-P-Goldfish commented on code in PR #154:
URL: https://github.com/apache/maven-release/pull/154#discussion_r985069185
##########
maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java:
##########
@@ -455,7 +454,12 @@ private String getLineSeparatorFromPom()
{
char current;
String lineSeparator = "";
- try ( InputStream is = new FileInputStream( this.project.getFile() ) )
+ File releasePom = this.project.getFile();
+ if (releasePom == null)
Review Comment:
not during prepare but it was null within some tests.
--
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
[GitHub] [maven-release] Captain-P-Goldfish commented on pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
Captain-P-Goldfish commented on PR #154:
URL: https://github.com/apache/maven-release/pull/154#issuecomment-1263498672
Issue is opened: https://issues.apache.org/jira/browse/MRELEASE-1107
... and I experienced it when using release:prepare. The configured linefeeds were not respected. And after looking at the source code, the problem was clear.
--
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
[GitHub] [maven-release] Captain-P-Goldfish commented on pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
Captain-P-Goldfish commented on PR #154:
URL: https://github.com/apache/maven-release/pull/154#issuecomment-1264326708
Alright I fixed the code. I simply tried to repair the unit tests that were broken with my changes instead of fixing it within the maincode which was indeed bad style. Sorry for that.
--
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
[GitHub] [maven-release] michael-o commented on a diff in pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-release/pull/154#discussion_r984612318
##########
maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java:
##########
@@ -455,7 +454,12 @@ private String getLineSeparatorFromPom()
{
char current;
String lineSeparator = "";
- try ( InputStream is = new FileInputStream( this.project.getFile() ) )
+ File releasePom = this.project.getFile();
+ if (releasePom == null)
Review Comment:
Can this file be `null` during prepare? How?
##########
maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java:
##########
@@ -443,7 +441,8 @@ private String resolveLineSeparator() throws MojoExecutionException
case "system":
return System.lineSeparator();
case "source":
- return getLineSeparatorFromPom();
+ final String sourceLineSeparator = getLineSeparatorFromPom();
+ return sourceLineSeparator == null ? System.lineSeparator() : sourceLineSeparator;
Review Comment:
If that is correct you missed line 430
--
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
[GitHub] [maven-release] Captain-P-Goldfish commented on a diff in pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
Captain-P-Goldfish commented on code in PR #154:
URL: https://github.com/apache/maven-release/pull/154#discussion_r990935954
##########
maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java:
##########
@@ -455,7 +453,8 @@ private String getLineSeparatorFromPom()
{
char current;
String lineSeparator = "";
- try ( InputStream is = new FileInputStream( this.project.getFile() ) )
+ File releasePom = this.project.getFile();
+ try ( InputStream is = new FileInputStream( releasePom ) )
Review Comment:
this was a relic from one of the previous commits. I squashed them now and returned this part to its original state.
--
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
[GitHub] [maven-release] michael-o commented on pull request #154: Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
michael-o commented on PR #154:
URL: https://github.com/apache/maven-release/pull/154#issuecomment-1263469047
Can you please create a JIRA issue for this? Can you also describe when you experienced this?
--
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
[GitHub] [maven-release] asfgit closed pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
URL: https://github.com/apache/maven-release/pull/154
--
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
[GitHub] [maven-release] michael-o commented on a diff in pull request #154: [MRELEASE-1107] Respect line separator also on release:prepare
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-release/pull/154#discussion_r990611236
##########
maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java:
##########
@@ -455,7 +453,8 @@ private String getLineSeparatorFromPom()
{
char current;
String lineSeparator = "";
- try ( InputStream is = new FileInputStream( this.project.getFile() ) )
+ File releasePom = this.project.getFile();
+ try ( InputStream is = new FileInputStream( releasePom ) )
Review Comment:
Why this change if you don't check for the existance? I don't see a benefit...
--
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