You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2018/06/07 06:34:00 UTC

[jira] [Commented] (MPH-152) Enhance console output of "evaluate" goal to indicate result

    [ https://issues.apache.org/jira/browse/MPH-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504300#comment-16504300 ] 

Karl Heinz Marbaise commented on MPH-152:
-----------------------------------------

The usage of evaluate related to output without creating a file is done in MPH-144 which is part of the next release which is currently under VOTING on dev list...
But about your point the evaluation status should be taken into account...which sounds like a good idea...

> Enhance console output of "evaluate" goal to indicate result
> ------------------------------------------------------------
>
>                 Key: MPH-152
>                 URL: https://issues.apache.org/jira/browse/MPH-152
>             Project: Maven Help Plugin
>          Issue Type: Improvement
>          Components: evaluate
>    Affects Versions: 3.0.1
>            Reporter: Paul Benedict
>            Priority: Minor
>
> I have two requirements for consideration:
>  # Scripts should be able to easily get the resolution status.
>  # Scripts should be able to easily get the resolved expression value.
> When evaluating an expression, the output does not have a good marker to help scripts identity the resolution. Current plugin behavior prints the value (practically buried among Maven's logging) or "null object or invalid expression" message.
> The {{-o}} option could be used, of course, but file creation is more overhead than necessary. But what is good about the {{-o}} option is that it prints a clear marker:
> {code:none}
> > mvn help:evaluate -Dexpression=settings.localRepository -Doutput=out.txt
> [INFO] Scanning for projects...
> . . .
> [INFO] Result of evaluation written to: c:\proj\out.txt{code}
> Can you consider something similar for the console?
> Example possible solutions:
> {code:none}
> > mvn help:evaluate -Dexpression=settings.localRepository
> [INFO] Scanning for projects...
> . . .
> [INFO] Result of evaluation: /home/joeuser/.m2/repository{code}
> And again:
> {code:none}
> > mvn help:evaluate -Dexpression=zzz
> [INFO] Scanning for projects...
> . . .
> [INFO] Result of evaluation: null{code}
> PS: If you think current behavior should be preserved, a new plugin option can be introduced. However, as [shown by this link|https://stackoverflow.com/questions/5916157/how-to-get-the-maven-local-repo-location], I think people have a difficult time clobbering together an answer to parse reliably. There are other examples on that site if you're interested. So I don't think any effort should be taken with introducing a new option. Just my 2 cents. Since the fragility already exists, just provide an "official" solution to remediate it. 
> Thank you.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)