Re: colored console

2016-09-12 Thread Robert Scholte
On Mon, 12 Sep 2016 21:50:42 +0200, Hervé BOUTEMY   
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 :
> >>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  

> wrote:
> > Le 10 sept. 2016 12:57, "Hervé BOUTEMY"  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 <
> >
> > rmannibu...@gmail.com>
> >
> > > > wrote:
> > > > > 2016-09-09 7:45 GMT+02:00 Tibor Digana <
>
> tibor.dig...@googlemail.com
>
> > > > > > Romain, did you mean  
${maven.projectBasedir}/.mvn/maven.config

> >
> > [1] ?
> >
> > > > > > Some extension or maven.config.
> > > > > > [1] https://maven.apache.org/docs/3.3.1/release-notes.html
> > > > >
> > > > > Could be if all options are mapped to the command line but was
> > > > > more
> > > > > thinking to a color oriented config (globally and overridable  
by

> >
> > plugin)
> >
> > > > > In maven config it would be something like:
> > > > > --color-info=blue --color-error=red
> > > > > --color-warning=yellow-bold
> > > > >
> > > > > etc --color-surefire-test=blue
> > > > >
> > > > > Not a "syntax" I'm in love but in the home and working so  
would be

>
> ok
>
> > too
> >
> > > > > > On Fri, Sep 9, 2016 at 12:20 AM, Romain Manni-Bucau <
> > > > >
> > > > > rmannibu...@gmail.com
> > > > >
> > > > > > wrote:
> > > > > > > Color is a user thing not a build thing so belongs to .m2  
not

> > > > > > >  I think.
> > > > > > >
> > > > > > > Le 9 sept. 2016 00:18, "Gary Gregory"  


>
> a
>
> > > > > écrit :
> > > > > > > > On Thu, Sep 8, 2016 at 2:48 PM, Romain Manni-Bucau <
> > > > > > >
> > > > > > > rmannibu...@gmail.com>
> > > > > > >
> > > > > > > > wrote:
> > > > > > > > > +1 to remove the bold
> > > > > > > >
> > > > > > > > I agree fwiw.
> > > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > > > What about having the coloration configurable in
> >
> > 

Re: svn commit: r1760333 - in /maven/shared/trunk/maven-artifact-transfer: ./ src/main/java/org/apache/maven/shared/project/install/ src/main/java/org/apache/maven/shared/project/install/internal/

2016-09-12 Thread Robert Scholte
On Mon, 12 Sep 2016 20:07:37 +0200, Karl Heinz Marbaise  
 wrote:



Hi Robert,

On 12/09/16 19:42, Robert Scholte wrote:

Hi Karl Heinz,

We probably need to revisit this code. I think Aether is also capable in
generating these files...


Sure I appreciate any suggestions ..it was only my first state which  
worked ...This code should be improved of course...


I have a question conerning the repositoryManager which I currently use  
in DefaultProjectInstaller:


 private File getLocalRepoFile( ProjectBuildingRequest  
buildingRequest, ArtifactRepository artifactRepository,

Artifact artifact )
 {
 String path = repositoryManager.getPathForLocalArtifact(  
buildingRequest, artifact );

 return new File( artifactRepository.getBasedir(), path );
 }

I'm not sure if this couldn't be made simpler ?



IIRC you can pickup the localRepository from the buildingRequest, but in  
case of a different localRepository (m-invoker-p and m-dependency-p need  
this), this is the best option you have.
To ensure that the developer is aware of this, I've chosen to ask  
explicitly for the repository.


Robert


Kind regards
Karl Heinz Marbaise




Robert

On Mon, 12 Sep 2016 13:22:30 +0200,  wrote:


Author: khmarbaise
Date: Mon Sep 12 11:22:29 2016
New Revision: 1760333

URL: http://svn.apache.org/viewvc?rev=1760333=rev
Log:
[MSHARED-593] Add interface to install a Maven Project

Added:

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstallerRequest.java


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java

Modified:
maven/shared/trunk/maven-artifact-transfer/pom.xml

Modified: maven/shared/trunk/maven-artifact-transfer/pom.xml
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/pom.xml?rev=1760333=1760332=1760333=diff

==

--- maven/shared/trunk/maven-artifact-transfer/pom.xml (original)
+++ maven/shared/trunk/maven-artifact-transfer/pom.xml Mon Sep 12
11:22:29 2016
@@ -168,6 +168,17 @@
   maven-common-artifact-filters
   3.0.0
 
+
+  org.codehaus.plexus
+  plexus-utils
+  3.0.24
+
+
+
+  commons-codec
+  commons-codec
+  1.6
+

 

Added:
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java

URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java?rev=1760333=auto

==

---
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
(added)
+++
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
Mon Sep 12 11:22:29 2016
@@ -0,0 +1,49 @@
+package org.apache.maven.shared.project.install;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import
org.apache.maven.shared.artifact.install.ArtifactInstallerException;
+
+/**
+ * This defines the interface to install a single Maven Project.
+ *
+ * @author Karl Heinz Marbaise mailto:khmarba...@apache.org;>khmarba...@apache.org
+ */
+public interface ProjectInstaller
+{
+/**
+ * This will install a single project which may contain several
artifacts. 

Re: colored console

2016-09-12 Thread Hervé BOUTEMY
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

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 :
> > >>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  > 
> > wrote:
> > > Le 10 sept. 2016 12:57, "Hervé BOUTEMY"  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 <
> > > 
> > > rmannibu...@gmail.com>
> > > 
> > > > > wrote:
> > > > > > 2016-09-09 7:45 GMT+02:00 Tibor Digana <
> > 
> > tibor.dig...@googlemail.com
> > 
> > > > > > > Romain, did you mean ${maven.projectBasedir}/.mvn/maven.config
> > > 
> > > [1] ?
> > > 
> > > > > > > Some extension or maven.config.
> > > > > > > [1] https://maven.apache.org/docs/3.3.1/release-notes.html
> > > > > > 
> > > > > > Could be if all options are mapped to the command line but was
> > > > > > more
> > > > > > thinking to a color oriented config (globally and overridable by
> > > 
> > > plugin)
> > > 
> > > > > > In maven config it would be something like:
> > > > > > --color-info=blue --color-error=red
> > > > > > --color-warning=yellow-bold
> > > > > > 
> > > > > > etc --color-surefire-test=blue
> > > > > > 
> > > > > > Not a "syntax" I'm in love but in the home and working so would be
> > 
> > ok
> > 
> > > too
> > > 
> > > > > > > On Fri, Sep 9, 2016 at 12:20 AM, Romain Manni-Bucau <
> > > > > > 
> > > > > > rmannibu...@gmail.com
> > > > > > 
> > > > > > > wrote:
> > > > > > > > Color is a user thing not a build thing so belongs to .m2 not
> > > > > > > >  I think.
> > > > > > > > 
> > > > > > > > Le 9 sept. 2016 00:18, "Gary Gregory" 
> > 
> > a
> > 
> > > > > > écrit :
> > > > > > > > > On Thu, Sep 8, 2016 at 2:48 PM, Romain Manni-Bucau <
> > > > > > > > 
> > > > > > > > rmannibu...@gmail.com>
> > > > > > > > 
> > > > > > > > > wrote:
> > > > > > > > > > +1 to remove the bold
> > > > > > > > > 
> > > > > > > > > I agree fwiw.
> > > > > > > > > 
> > > > > > > > > Gary
> > > > > > > > > 
> > > > > > > > > > What about having the coloration 

Re: svn commit: r1760333 - in /maven/shared/trunk/maven-artifact-transfer: ./ src/main/java/org/apache/maven/shared/project/install/ src/main/java/org/apache/maven/shared/project/install/internal/

2016-09-12 Thread Karl Heinz Marbaise

Hi Robert,

On 12/09/16 19:42, Robert Scholte wrote:

Hi Karl Heinz,

We probably need to revisit this code. I think Aether is also capable in
generating these files...


Sure I appreciate any suggestions ..it was only my first state which 
worked ...This code should be improved of course...


I have a question conerning the repositoryManager which I currently use 
in DefaultProjectInstaller:


private File getLocalRepoFile( ProjectBuildingRequest 
buildingRequest, ArtifactRepository artifactRepository,

   Artifact artifact )
{
String path = repositoryManager.getPathForLocalArtifact( 
buildingRequest, artifact );

return new File( artifactRepository.getBasedir(), path );
}

I'm not sure if this couldn't be made simpler ?

Kind regards
Karl Heinz Marbaise




Robert

On Mon, 12 Sep 2016 13:22:30 +0200,  wrote:


Author: khmarbaise
Date: Mon Sep 12 11:22:29 2016
New Revision: 1760333

URL: http://svn.apache.org/viewvc?rev=1760333=rev
Log:
[MSHARED-593] Add interface to install a Maven Project

Added:

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstallerRequest.java


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java


maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java

Modified:
maven/shared/trunk/maven-artifact-transfer/pom.xml

Modified: maven/shared/trunk/maven-artifact-transfer/pom.xml
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/pom.xml?rev=1760333=1760332=1760333=diff

==

--- maven/shared/trunk/maven-artifact-transfer/pom.xml (original)
+++ maven/shared/trunk/maven-artifact-transfer/pom.xml Mon Sep 12
11:22:29 2016
@@ -168,6 +168,17 @@
   maven-common-artifact-filters
   3.0.0
 
+
+  org.codehaus.plexus
+  plexus-utils
+  3.0.24
+
+
+
+  commons-codec
+  commons-codec
+  1.6
+

 

Added:
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java

URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java?rev=1760333=auto

==

---
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
(added)
+++
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
Mon Sep 12 11:22:29 2016
@@ -0,0 +1,49 @@
+package org.apache.maven.shared.project.install;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import
org.apache.maven.shared.artifact.install.ArtifactInstallerException;
+
+/**
+ * This defines the interface to install a single Maven Project.
+ *
+ * @author Karl Heinz Marbaise mailto:khmarba...@apache.org;>khmarba...@apache.org
+ */
+public interface ProjectInstaller
+{
+/**
+ * This will install a single project which may contain several
artifacts. Those artifacts will be installed into
+ * the appropriate repository.
+ *
+ * @param projectBuildingRequest {@link ProjectBuildingRequest}
+ * @param projectInstallerRequest {@link ProjectInstallerRequest}
+ * @param artifactRepository {@link ArtifactRepository}
+ * @throws IOException In case of problem to install project.
+ * @throws ArtifactInstallerException In case 

Re: svn commit: r1760333 - in /maven/shared/trunk/maven-artifact-transfer: ./ src/main/java/org/apache/maven/shared/project/install/ src/main/java/org/apache/maven/shared/project/install/internal/

2016-09-12 Thread Robert Scholte

Hi Karl Heinz,

We probably need to revisit this code. I think Aether is also capable in  
generating these files...


Robert

On Mon, 12 Sep 2016 13:22:30 +0200,  wrote:


Author: khmarbaise
Date: Mon Sep 12 11:22:29 2016
New Revision: 1760333

URL: http://svn.apache.org/viewvc?rev=1760333=rev
Log:
[MSHARED-593] Add interface to install a Maven Project

Added:

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstallerRequest.java

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DefaultProjectInstaller.java

maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/internal/DualDigester.java
Modified:
maven/shared/trunk/maven-artifact-transfer/pom.xml

Modified: maven/shared/trunk/maven-artifact-transfer/pom.xml
URL:  
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/pom.xml?rev=1760333=1760332=1760333=diff

==
--- maven/shared/trunk/maven-artifact-transfer/pom.xml (original)
+++ maven/shared/trunk/maven-artifact-transfer/pom.xml Mon Sep 12  
11:22:29 2016

@@ -168,6 +168,17 @@
   maven-common-artifact-filters
   3.0.0
 
+
+  org.codehaus.plexus
+  plexus-utils
+  3.0.24
+
+
+
+  commons-codec
+  commons-codec
+  1.6
+

 

Added:  
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java
URL:  
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java?rev=1760333=auto

==
---  
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java  
(added)
+++  
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstaller.java  
Mon Sep 12 11:22:29 2016

@@ -0,0 +1,49 @@
+package org.apache.maven.shared.project.install;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import  
org.apache.maven.shared.artifact.install.ArtifactInstallerException;

+
+/**
+ * This defines the interface to install a single Maven Project.
+ *
+ * @author Karl Heinz Marbaise href="mailto:khmarba...@apache.org;>khmarba...@apache.org

+ */
+public interface ProjectInstaller
+{
+/**
+ * This will install a single project which may contain several  
artifacts. Those artifacts will be installed into

+ * the appropriate repository.
+ *
+ * @param projectBuildingRequest {@link ProjectBuildingRequest}
+ * @param projectInstallerRequest {@link ProjectInstallerRequest}
+ * @param artifactRepository {@link ArtifactRepository}
+ * @throws IOException In case of problem to install project.
+ * @throws ArtifactInstallerException In case of problems to  
install artifacts.

+ */
+void installProject( ProjectBuildingRequest projectBuildingRequest,  
ProjectInstallerRequest projectInstallerRequest,

+ ArtifactRepository artifactRepository )
+throws IOException, ArtifactInstallerException;
+
+}

Added:  
maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstallerRequest.java
URL:  
http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/install/ProjectInstallerRequest.java?rev=1760333=auto


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

2016-09-12 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78354537
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

I'll update this, but I won't get to it before Friday/Saturday. Stay tuned 
😎 


---
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-12 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78351427
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

I would not use JDK 9 for such simple comparison.
Back to `SystemUtils.JAVA_SPECIFICATION_VERSION, is( greaterThanOrEqualTo( 
version.toString() ) ) );`
It's matter of taste if you just compare strings or float numbers. 
Comparing float numbers would make me sleep better.


---
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 #118: Add basic integration test for JUnit 5

2016-09-12 Thread britter
Github user britter commented on the issue:

https://github.com/apache/maven-surefire/pull/118
  
@Tibor17 yes I need #120 to finish this PR.


---
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-12 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78336717
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

Hello @Tibor17 

> Unfortunately org.apache.commons.lang3.JavaVersion is not Comparable

Java enums are comparable by default.

> How would this work with string 1.10? [...]

I'm currently working on Commons Lang Release 3.5 which I expect to be 
ready in two weeks or so. Commons Lang 3.5 will have full Java 9 support with 
regards to version number. Furthermore it will have a better API for comparing 
the current version against a desired version:

```
if(JavaVersion.CURRENT.atLeast(JavaVersion.JAVA_1_8)) {
   // do something only possible with Java 8
}
```

I suggest to apply this for now so I can finish the junit-5 IT PR with this 
new check API. I will provide a PR for updating this again to the new API 
introduced in Commons Lang 3.5 when Lang 3.5 is ready. Makes sense?


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



Re: colored console

2016-09-12 Thread Romain Manni-Bucau
2016-09-12 9:30 GMT+02:00 Tibor Digana :

> >>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  >
> wrote:
>
> > Le 10 sept. 2016 12:57, "Hervé BOUTEMY"  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 <
> > rmannibu...@gmail.com>
> > > >
> > > > wrote:
> > > > > 2016-09-09 7:45 GMT+02:00 Tibor Digana <
> tibor.dig...@googlemail.com
> > >:
> > > > > > Romain, did you mean ${maven.projectBasedir}/.mvn/maven.config
> > [1] ?
> > > > > > Some extension or maven.config.
> > > > > > [1] https://maven.apache.org/docs/3.3.1/release-notes.html
> > > > >
> > > > > Could be if all options are mapped to the command line but was more
> > > > > thinking to a color oriented config (globally and overridable by
> > plugin)
> > > > >
> > > > > In maven config it would be something like:
> > > > > --color-info=blue --color-error=red --color-warning=yellow-bold
> > > > >
> > > > > etc --color-surefire-test=blue
> > > > >
> > > > > Not a "syntax" I'm in love but in the home and working so would be
> ok
> > too
> > > > >
> > > > > > On Fri, Sep 9, 2016 at 12:20 AM, Romain Manni-Bucau <
> > > > >
> > > > > rmannibu...@gmail.com
> > > > >
> > > > > > wrote:
> > > > > > > Color is a user thing not a build thing so belongs to .m2 not
> > > > > > >  I think.
> > > > > > >
> > > > > > > Le 9 sept. 2016 00:18, "Gary Gregory" 
> a
> > > > >
> > > > > écrit :
> > > > > > > > On Thu, Sep 8, 2016 at 2:48 PM, Romain Manni-Bucau <
> > > > > > >
> > > > > > > rmannibu...@gmail.com>
> > > > > > >
> > > > > > > > wrote:
> > > > > > > > > +1 to remove the bold
> > > > > > > >
> > > > > > > > I agree fwiw.
> > > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > > > What about having the coloration configurable in
> > settings.xml:
> > > > > > current
> > > > > >
> > > > > > > or
> > > > > > >
> > > > > > > > > no color for test result line or single color for level and
> > result
> > > > >
> > > > > or
> > > > >
> > > > > > > > only
> > > > > > > >
> > > > > > > > > start of the line?
> > > > > > > > >
> > > > > > > > > Le 8 sept. 2016 23:36, "Tibor Digana" <
> > tibordig...@apache.org>
> > a
> > > > > > >
> > > > > > > écrit :
> > > > > > > > > > sending the picture in attachment..
> > > > > > > > > >
> > > > > > > > > > On Thu, Sep 8, 2016 at 11:32 PM, Romain Manni-Bucau [via
> > Maven]
> > > > > > > > > > <
> > > > > > > > > >
> > > > > > > > > > ml-node+s40175n5880220...@n5.nabble.com> wrote:
> > > > > > > > > > > Hello Tibor,
> > > > > > > > > > >
> > > > > > > > > > > not sure that's me but I don't see the picture
> > > > > > > > > > >
> > > > > > > > > > > that said I like this kind of coloring for maven:
> > > > > > > > > > > https://raw.githubusercontent.
> > com/rmannibucau/maven-color/
> > > > > > > > > > > master/screenshot.png
> > > > > > > > > > > . Makes it easy to identify 

Re: colored console

2016-09-12 Thread Tibor Digana
>>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.

On Sat, Sep 10, 2016 at 1:29 PM, Romain Manni-Bucau 
wrote:

> Le 10 sept. 2016 12:57, "Hervé BOUTEMY"  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 <
> rmannibu...@gmail.com>
> > >
> > > wrote:
> > > > 2016-09-09 7:45 GMT+02:00 Tibor Digana  >:
> > > > > Romain, did you mean ${maven.projectBasedir}/.mvn/maven.config
> [1] ?
> > > > > Some extension or maven.config.
> > > > > [1] https://maven.apache.org/docs/3.3.1/release-notes.html
> > > >
> > > > Could be if all options are mapped to the command line but was more
> > > > thinking to a color oriented config (globally and overridable by
> plugin)
> > > >
> > > > In maven config it would be something like:
> > > > --color-info=blue --color-error=red --color-warning=yellow-bold
> > > >
> > > > etc --color-surefire-test=blue
> > > >
> > > > Not a "syntax" I'm in love but in the home and working so would be ok
> too
> > > >
> > > > > On Fri, Sep 9, 2016 at 12:20 AM, Romain Manni-Bucau <
> > > >
> > > > rmannibu...@gmail.com
> > > >
> > > > > wrote:
> > > > > > Color is a user thing not a build thing so belongs to .m2 not
> > > > > >  I think.
> > > > > >
> > > > > > Le 9 sept. 2016 00:18, "Gary Gregory"  a
> > > >
> > > > écrit :
> > > > > > > On Thu, Sep 8, 2016 at 2:48 PM, Romain Manni-Bucau <
> > > > > >
> > > > > > rmannibu...@gmail.com>
> > > > > >
> > > > > > > wrote:
> > > > > > > > +1 to remove the bold
> > > > > > >
> > > > > > > I agree fwiw.
> > > > > > >
> > > > > > > Gary
> > > > > > >
> > > > > > > > What about having the coloration configurable in
> settings.xml:
> > > > > current
> > > > >
> > > > > > or
> > > > > >
> > > > > > > > no color for test result line or single color for level and
> result
> > > >
> > > > or
> > > >
> > > > > > > only
> > > > > > >
> > > > > > > > start of the line?
> > > > > > > >
> > > > > > > > Le 8 sept. 2016 23:36, "Tibor Digana" <
> tibordig...@apache.org>
> a
> > > > > >
> > > > > > écrit :
> > > > > > > > > sending the picture in attachment..
> > > > > > > > >
> > > > > > > > > On Thu, Sep 8, 2016 at 11:32 PM, Romain Manni-Bucau [via
> Maven]
> > > > > > > > > <
> > > > > > > > >
> > > > > > > > > ml-node+s40175n5880220...@n5.nabble.com> wrote:
> > > > > > > > > > Hello Tibor,
> > > > > > > > > >
> > > > > > > > > > not sure that's me but I don't see the picture
> > > > > > > > > >
> > > > > > > > > > that said I like this kind of coloring for maven:
> > > > > > > > > > https://raw.githubusercontent.
> com/rmannibucau/maven-color/
> > > > > > > > > > master/screenshot.png
> > > > > > > > > > . Makes it easy to identify steps and warn/error (in red)
> > > > >
> > > > > visually
> > > > >
> > > > > > > > > > Romain Manni-Bucau
> > > > > > > > > > @rmannibucau  |  Blog
> > > > > > > > > >  | Old Wordpress
> Blog
> > > > > > > > > >  | Github <
> > > >
> > > > https://github.com/
> > > >
> > > > > > > > > > rmannibucau> |
> > > > > > > > > > LinkedIn  |
> > > >
> > > > Tomitriber
> > > >
> > > > > > > > > >  | JavaEE Factory
> > > >