Re: colored console

2016-09-18 Thread Tibor Digana
Thanks to all who has contributed in this thread.

Here is the final result, see attached picture.
Now there are colors but the entire line of test result is not one
color/green which was previously shining to you eyes in every line.
If the Users group requires customizing the outcome, we can still continue
in Jira, and we can implement proposed solution
defining *.properties file with formatter using placeholders like "Tests
run: {0}, ", using native colors etc.
I still think Surefire can have config parameter and configured via system
property globally in ".mvn/jvm.config" and we do not need to do anything in
Maven as a kind of generic solution for every Maven plugin would not be
realistic only because of requirements from Surefire.


On Mon, Sep 12, 2016 at 10:57 PM, Robert Scholte-6 [via Maven] <
ml-node+s40175n5880539...@n5.nabble.com> wrote:

> On Mon, 12 Sep 2016 21:50:42 +0200, Hervé BOUTEMY <[hidden email]
> >
> wrote:
>
> > I really doubt plugins will be documented to give anybody any chance to
>
> > learn
> > how to configure such details. And even with documentation, I doubt
> > anybody
> > will take time to configure his Maven install
> >
> > But if you really want to do this, you should improve the MessageBuilder
>
> > API
> > [1] to add styles in text patterns: something like replacing "%failure%"
>
> > with
> > failure style, and choosing a pattern for resetting color
> >
> >
> > But once again, I doubt such deep configuration really makes sense: so
> > few
> > people will know how to use it
>
> +1, fully agree. *IF* this should be done, which I really doubt, it should
>
> be at Maven level, not at plugin level.
>
> Robert
>
> >
> > Regards,
> >
> > Hervé
> >
> >
> > [1]
> > https://maven.apache.org/shared-archives/maven-shared-
> utils-LATEST/apidocs/org/apache/maven/shared/utils/
> logging/MessageBuilder.html
> >
> >
> > Le lundi 12 septembre 2016 09:37:50 Romain Manni-Bucau a écrit :
> >> 2016-09-12 9:30 GMT+02:00 Tibor Digana <[hidden email]
> >:
> >> > >>If you compare maven to dome
> >> >
> >> > Although we do not have DOM this inspires me to define *.properties
> >> with
> >> > formatter using placeholders
> >> > success = [m32 Tests run: %1, Failure: %2, Errors: %3, Skipped: %4;
> >> > etc.
> >> > In this case we do not need to use JAnsi library in Surefire's code
> >> and
> >> > text including colors can be customized.
> >> > I doubt Maven core would provide Surefire with such interface, why
> >> only
> >> > this plugin and not the other as well.
> >>
> >> +1, nice to have is some aliases for colors instead of unix
> >> \[\033[01;34m\]
> >> etc.
> >>
> >> This needs a default global config based on level I think customizable
>
> >> per
> >> plugin (=overridable for some lines, maybe through a MDC to give the
> >> key to
> >> read?).
> >>
> >> > On Sat, Sep 10, 2016 at 1:29 PM, Romain Manni-Bucau
> >> <[hidden email] 
> >> >
> >> > wrote:
> >> > > Le 10 sept. 2016 12:57, "Hervé BOUTEMY" <[hidden email]
> > a
> >> écrit
> >> > >
> >> > > > Le vendredi 9 septembre 2016 10:49:54 Tibor Digana a écrit :
> >> > > > > @Herve What do you think about Romain's concept:
> >> --color-info=blue
> >> > > > > --color-error=red --color-warning=yellow-bold
> >> > > > > @Romain In MVN 3.4 you can override the colors via system
> >> > > > > properties,
> >> > >
> >> > > e.g.
> >> > >
> >> > > > > -Dstyle.info=bold,blue
> >> > > >
> >> > > > see
> >> > >
> >> > > http://maven.apache.org/shared/maven-shared-utils/
> >> > > apidocs/org/apache/maven/shared/utils/logging/package-summary.html
> >> > >
> >> > > > > @Romain, if we had "--color-surefire-test=blue" in CLI then all
> >> >
> >> > plugins
> >> >
> >> > > > > would require to have the same principle.
> >> > > > > What if some users want to cover only some part of the text
> with
> >> >
> >> > colors
> >> >
> >> > > and
> >> > >
> >> > > > > combine with multiple colors?
> >> > > >
> >> > > > making styles rendering configurable per plugin seems really too
>
> >> much,
> >> > >
> >> > > IMHO
> >> > >
> >> > >
> >> > > If you compare maven to dome other build tools you have more data
> >> you
> >> > > can
> >> > > desire to control *as a user*: level, message, subpart of a message
>
> >> etc.
> >> > > Control per line or data etc...
> >> > >
> >> > > This induce the need of more config by nature otherwise colors are
> a
> >> > > less
> >> > > useful feature than it should be cause instead of helping the user
> >> > > making
> >> > > outputs more readable you decrease the readability. That is my
> >> feedback
> >> > > with current colors and why i forked the binder ATM.
> >> > >
> >> > > > Regards,
> >> > > >
> >> > > > Hervé
> >> > > >
> >> > > > > On Fri, Sep 9, 2016 at 10:06 AM, Romain Manni-Bucau <
> >> > >
> >> > > [hidden email]
> 

[GitHub] maven-surefire issue #120: Add convinient method to check for the currently ...

2016-09-18 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/120
  
@britter 
Thank you for contributing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #121: Fix for issue SUREFIRE-1278

2016-09-18 Thread khospodarysko
Github user khospodarysko commented on the issue:

https://github.com/apache/maven-surefire/pull/121
  
@Tibor17 No, I haven't. This is my first such patch. I'm happy it added 
more quality to the product!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #120: Add convinient method to check for the currently ...

2016-09-18 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/120
  
@britter 
I have created Jira issue for this Task
https://issues.apache.org/jira/browse/SUREFIRE-1282



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-18 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r79314476
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -172,7 +173,7 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 
 public static void assumeJavaVersion( JavaVersion version )
 {
-assumeThat( "java.specification.version: ",
-JAVA_SPECIFICATION_VERSION, is( greaterThanOrEqualTo( 
version.toString() ) ) );
+assumeTrue( "java.specification.version: " + 
JAVA_SPECIFICATION_VERSION,
+SystemUtils.isJavaVersionAtLeast( version ) );
--- End diff --

I am running the build _mvn install -Prun-its_, let's wait for the result.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #121: Fix for issue SUREFIRE-1278

2016-09-18 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/121
  
@khospodarysko CI build was successful. This should be normally closed 
automatically and sometimes it takes a day but you can close it as well.
Thank you for contributing.
Have you contributed to Maven in more previous pull-requests?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Further questions to "Add modulepath support" SUREFIRE-1262

2016-09-18 Thread Tibor Digana
I have executed examples from
http://openjdk.java.net/projects/jigsaw/quick-start
Now I have handson exps but still something is not clear.

Did Jigsaw broke backwards compatibility?
Running Main-Class from Manifest would not work like this?
java -jar surefire.jar

The problem is that it makes sense to me to use "*--patch-module*" along
with
building sources to Java 9 module using *module-info.java*.
So it is strange to me that somebody is going to compile *src/test/java* to
Jigsaw module e,g, "*test.base*" and it is strange that Manifest Main-Class
cannot be executed in Java 9.

So I compiled sources a little bit different way but the principle like
this:


*javac -d target/test-classes/test.base
\src/test/java/test.base/module-info.java
\src/test/java/test.base/pkg/Test.java*

The module appears in *target/test-classes/test.base* using
module-info.class.
Now I am going to provide patched class-path to *mypatches/test.base*
without having *module-info.class*.

This means we are going to suppress regular module in target and use
another class path
from location *mypatches/test.base* yet having sub-directory *test.base* as
module name (does not have module-info.class).

This executes console application in pkg.Test.java - not from Manifest.


*java --patch-module test.base=mypatches/test.base \--module-path
target/test-classes \--module test.base/pkg.Test*

The main problem here is that we are going to replace two class paths as
another workaround of old command "*java -jar surefire.jar*" which would
not work with Manifest anymore in JDK9, AFAIK.
Is it truth?
If it is truth, then it is broken backwards compatibility in Java.

Pls correct me if I am wrong and clarify more what is intended with Jigsaw
in Surefire.

Cheers
Tibor


[GitHub] maven-surefire issue #121: Fix for issue SUREFIRE-1278

2016-09-18 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/121
  
LGTM.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #121: Fix for issue SUREFIRE-1278

2016-09-18 Thread khospodarysko
Github user khospodarysko commented on the issue:

https://github.com/apache/maven-surefire/pull/121
  
Followed the analogy and added 
org.apache.maven.surefire.its.jiras.Surefire1278GroupNameEndingIT to 
src/test/java folder.
Please let me know if something else is wrong and I'll try to fix it asap.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #121: Fix for issue SUREFIRE-1278

2016-09-18 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/121
  
@khospodarysko  Do you have it in *.bak file or in bytecode in 
/target/classes?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #121: Fix for issue SUREFIRE-1278

2016-09-18 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/121
  
@khospodarysko Something wrong happened. The IT class is missing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-18 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r79310840
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -172,7 +173,7 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 
 public static void assumeJavaVersion( JavaVersion version )
 {
-assumeThat( "java.specification.version: ",
-JAVA_SPECIFICATION_VERSION, is( greaterThanOrEqualTo( 
version.toString() ) ) );
+assumeTrue( "java.specification.version: " + 
JAVA_SPECIFICATION_VERSION,
+SystemUtils.isJavaVersionAtLeast( version ) );
--- End diff --

Yes this is cool. Thx.
I will come back to your PRs soon.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org