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/10/21 08:28:59 UTC

[GitHub] [maven-mvnd] gzm55 opened a new pull request, #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

gzm55 opened a new pull request, #726:
URL: https://github.com/apache/maven-mvnd/pull/726

   With the new property set to `true`, the prefix `[INFO] [stdout] ` is removed in the client terminal output. Then without `--raw-stream`, we can still get the same behavior with original maven.


-- 
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-mvnd] ppalaga commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by GitBox <gi...@apache.org>.
ppalaga commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1380028652

   Could you please explain what are the possible motivations for this change? In which situations does it help? Why would user want to have 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-mvnd] gnodet commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1400133570

   > > Note that I have the following:
   > > ```
   > > > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  -l >(sed 's/^/in log: /') 2>/dev/null
   > > 1.0.0-SNAPSHOT
   > > > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  1> >(sed 's/^/in log: /') 2>/dev/null
   > > in log: 1.0.0-SNAPSHOT
   > > ```
   > 
   > The problem is that mvnd implements the `-l` switch in a different way than maven. When a `-l` switch is specified, maven sets the `System.out` and `System.err` streams to the file redirection. This option is not passed to maven by mvnd, and instead, it redirects the project output to the file, but does not touch the system out and err streams. Fixing that will lead to a behaviour which will be closer to the maven one.
   
   #779 is an attempt to fix the above problem.  It now gives the correct result (apart the added terminal newline)


-- 
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-mvnd] ppalaga commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by GitBox <gi...@apache.org>.
ppalaga commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1380084656

   I must say I have hard time figuring out how this combines with `--raw-streams`. It sounds like you need some additional fine tuning of how the system streams are set up and which is currently not possible with `--raw-streams`. Would it not be better to deprecate `--raw-streams` and introduce a new param with more possibilities? 
   
   I am also a bit lost how we handle the system streams in the daemon. @gnodet why do we cal `System.setOut()` and `System.setErr()` on so many places?


-- 
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-mvnd] gnodet commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1399970334

   > Note that I have the following:
   > 
   > ```
   > > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  -l >(sed 's/^/in log: /') 2>/dev/null
   > 1.0.0-SNAPSHOT
   > > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  1> >(sed 's/^/in log: /') 2>/dev/null
   > in log: 1.0.0-SNAPSHOT
   > ```
   
   So I think the problem is that mvnd implements the `-l` switch in a different way than maven.  I think fixing that will lead to a behaviour which will be closer to the maven one.


-- 
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-mvnd] gnodet commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1399958213

   Note that I have the following:
   ```
   > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  -l >(sed 's/^/in log: /') 2>/dev/null
   1.0.0-SNAPSHOT
   > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  1> >(sed 's/^/in log: /') 2>/dev/null
   in log: 1.0.0-SNAPSHOT
   ```


-- 
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-mvnd] gnodet closed pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream
URL: https://github.com/apache/maven-mvnd/pull/726


-- 
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-mvnd] gzm55 commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by "gzm55 (via GitHub)" <gi...@apache.org>.
gzm55 commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1400650464

   > > > Note that I have the following:
   > > > ```
   > > > > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  -l >(sed 's/^/in log: /') 2>/dev/null
   > > > 1.0.0-SNAPSHOT
   > > > > mvnd -q -DforceStdout help:evaluate -Dexpression=project.version --raw-streams  1> >(sed 's/^/in log: /') 2>/dev/null
   > > > in log: 1.0.0-SNAPSHOT
   > > > ```
   > > 
   > > 
   > > The problem is that mvnd implements the `-l` switch in a different way than maven. When a `-l` switch is specified, maven sets the `System.out` and `System.err` streams to the file redirection. This option is not passed to maven by mvnd, and instead, it redirects the project output to the file, but does not touch the system out and err streams. Fixing that will lead to a behaviour which will be closer to the maven one.
   > 
   > #779 is an attempt to fix the above problem. It now gives the correct result (apart the added terminal newline)
   
   @gnodet the nearly same behavior of `-l` option in #779 should be better than this pr.


-- 
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-mvnd] gzm55 commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by GitBox <gi...@apache.org>.
gzm55 commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1379712196

   @gnodet @ppalaga what about this pr?


-- 
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-mvnd] gzm55 commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by GitBox <gi...@apache.org>.
gzm55 commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1380434752

   @ppalaga this option is used to keep the logging behavior the same as the original maven:
   
   Expected from maven (no new-line char at the end):
   ```bash
   $ mvn -DforceStdout -q help:evaluate -Dexpression=project.version -l >(sed 's/^/in log: /')
   in log: 1.0.0
   ```
   
   `mvnd` default:
   ```bash
   $ mvnd -DforceStdout -q help:evaluate -Dexpression=project.version -l >(sed 's/^/in log: /')
   in log: [INFO] [stdout] 1.0.0
   ```
   
   `mvnd` with `--raw-streams`:
   ```bash
   $ mvnd -DforceStdout -q help:evaluate -Dexpression=project.version -l >(sed 's/^/in log: /') --raw-streams
   1.0.0
   ```
   
   `mvnd` with new option `-Dmvnd.preserveProjectLog` (with new-line char at the end):
   ```bash
   $ mvnd -DforceStdout -q help:evaluate -Dexpression=project.version -l >(sed 's/^/in log: /') -Dmvnd.preserveProjectLog
   in log: 1.0.0
   ```


-- 
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-mvnd] gnodet commented on pull request #726: Add property 'mvnd.preserveProjectLog' to not decorate the stdout/stderr stream

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #726:
URL: https://github.com/apache/maven-mvnd/pull/726#issuecomment-1400829641

   Superseded by #779


-- 
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