Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Christian Stein
+1

Cheers,
Christian


Re: Parsing pom.xml

2018-12-08 Thread Laird Nelson
I forgot to mention: if you want to do this all "by hand", i.e. not rely on
JSR 330 containers, you want to look here (
https://maven.apache.org/resolver/apidocs/index.html?org/eclipse/aether/impl/DefaultServiceLocator.html)
and work backwards.

Best,
Laird
--
https://about.me/lairdnelson

On Sat, Dec 8, 2018 at 2:05 PM Laird Nelson  wrote:

> This is all near and dear to my heart.
>
> First, some terminology clearing up: the Maven internals rely on a JSR-330
> implementation (javax.inject.*), not CDI (javax.enterprise.inject.*).  CDI
> is a JSR-330 implementation, but so is Guice, HK2, etc.  I believe that the
> internals of Maven rely on Guice, but as Robert says, if you're not
> rebuilding the innards of Maven then using the facilities of JSR-330 make
> the code really simple.
>
> I did actually put parts of Maven in CDI (
> https://microbean.github.io/microbean-maven-cdi/).  You may find some of
> the implementation classes in question that you need in there.  Start here:
> https://github.com/microbean/microbean-maven-cdi/blob/c5abd2e3c321020c419442c44ef726e48952d983/src/main/java/org/microbean/maven/cdi/MavenExtension.java#L317
>
> Best,
> Laird
> --
> https://about.me/lairdnelson
>


Re: Parsing pom.xml

2018-12-08 Thread Laird Nelson
This is all near and dear to my heart.

First, some terminology clearing up: the Maven internals rely on a JSR-330
implementation (javax.inject.*), not CDI (javax.enterprise.inject.*).  CDI
is a JSR-330 implementation, but so is Guice, HK2, etc.  I believe that the
internals of Maven rely on Guice, but as Robert says, if you're not
rebuilding the innards of Maven then using the facilities of JSR-330 make
the code really simple.

I did actually put parts of Maven in CDI (
https://microbean.github.io/microbean-maven-cdi/).  You may find some of
the implementation classes in question that you need in there.  Start here:
https://github.com/microbean/microbean-maven-cdi/blob/c5abd2e3c321020c419442c44ef726e48952d983/src/main/java/org/microbean/maven/cdi/MavenExtension.java#L317

Best,
Laird
--
https://about.me/lairdnelson


Re: Parsing pom.xml

2018-12-08 Thread Robert Scholte
On Sat, 08 Dec 2018 21:52:16 +0100, Andres Almiray   
wrote:



So far so good, I can parse POM files and read data. This works fine as
long as I don't have to access a parent POM.

@Robert: I suspect your first suggestion may be needed in order to  
resolve

parent POM files as artifacts, isn't that right?


I don't know. I can always assume there's a CDI container, so that code  
looks quite simple.
I never have to use the DefaultModelBuilderFactory, I actually wasn't  
aware of this class.

I'm not sure everything works for standalone, but docs suggest it should.
If not, we'll need to have a closer look at it.

Robert



Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary,  
and

those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 7:22 PM Robert Scholte   
wrote:



Ah, you might be lucky with this solution :)

On Sat, 08 Dec 2018 19:20:59 +0100, Andres Almiray 
wrote:

> Looks like I found the answer to instantiating the ModelBuilder
>
> new DefaultModelBuilderFactory().newInstance()
>
> From the javadoc:
>
>  * A factory to create model builder instances when no dependency
> injection
> is available. Note: This class is
>  * only meant as a utility for developers that want to employ the  
model

> builder outside of the Maven build system, Maven
>  * plugins should always acquire model builder instances via  
dependency

> injection. Developers might want to subclass
>  * this factory to provide custom implementations for some of the
> components used by the model builder.
>
> Great, I think this will work :-)
>
> Best,
> Andres
>
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> http://andresalmiray.com
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand  
binary,

> and
> those who don't.
> To understand recursion, we must first understand recursion.
>
>
> On Sat, Dec 8, 2018 at 6:47 PM Andres Almiray 
wrote:
>
>> Thank you Robert!
>>
>> It looks like org.apache.maven.model.Model.DefaultModelBuilder  
provides

>> the behavior I need given this method found in its contract
>>
>>ModelBuildingResult build( ModelBuildingRequest request )
>> throws ModelBuildingException;
>>
>> ModelBuildingResult gives me access to the raw model (as read form  
the
>> pom.xml file) and the effective model. This is exactly what I need  
:-)

>>
>> Is there a special way to initialize an instance of such type?
>> Theoretically I'd like to call something like
>>
>> ModelBuildingRequest request = new DefaultModelBuildingRequest();
>> request.setPomFile(...);
>> ModelBuilder builder = ... // instantiate builder (??)
>> ModelBuldingResult result = builder.build(request);
>>
>> Thanks for your help.
>>
>> Best,
>> Andres
>>
>> ---
>> Java Champion; Groovy Enthusiast
>> JCP EC Associate Seat
>> http://andresalmiray.com
>> http://www.linkedin.com/in/aalmiray
>> --
>> What goes up, must come down. Ask any system administrator.
>> There are 10 types of people in the world: Those who understand  
binary,

>> and those who don't.
>> To understand recursion, we must first understand recursion.
>>
>>
>> On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte 
>> wrote:
>>
>>> The ModelBuilder[1] is what you are looking for, and yes it does a
LOT
>>> :)
>>>
>>> Be aware that it is using CDI, so to make use of it you'll need
>>> sisu/guice
>>> too.
>>>
>>> Robert
>>>
>>> [1] https://maven.apache.org/ref/3.6.0/maven-model-builder/
>>>
>>> On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray  

>
>>> wrote:
>>>
>>> > Of course.
>>> >
>>> > This is definitely not a plugin project. My goal is to have an
>>> in-memory
>>> > representation of the POM as defined by a source pom.xml, to later
>>> > transform/enrich it and write it back.
>>> > As a side effect this tool can calculate statics on usage patterns
>>> and
>>> > recommend some others.
>>> >
>>> > Best,
>>> > Andres
>>> >
>>> > ---
>>> > Java Champion; Groovy Enthusiast
>>> > JCP EC Associate Seat
>>> > http://andresalmiray.com
>>> > http://www.linkedin.com/in/aalmiray
>>> > --
>>> > What goes up, must come down. Ask any system administrator.
>>> > There are 10 types of people in the world: Those who understand
>>> binary,
>>> > and
>>> > those who don't.
>>> > To understand recursion, we must first understand recursion.
>>> >
>>> >
>>> > On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli  


>>> > wrote:
>>> >
>>> >> Il sab 8 dic 2018, 18:09 Andres Almiray  ha
>>> scritto:
>>> >>
>>> >> > Hello everyone,
>>> >> >

Re: Parsing pom.xml

2018-12-08 Thread Andres Almiray
So far so good, I can parse POM files and read data. This works fine as
long as I don't have to access a parent POM.

@Robert: I suspect your first suggestion may be needed in order to resolve
parent POM files as artifacts, isn't that right?

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 7:22 PM Robert Scholte  wrote:

> Ah, you might be lucky with this solution :)
>
> On Sat, 08 Dec 2018 19:20:59 +0100, Andres Almiray 
> wrote:
>
> > Looks like I found the answer to instantiating the ModelBuilder
> >
> > new DefaultModelBuilderFactory().newInstance()
> >
> > From the javadoc:
> >
> >  * A factory to create model builder instances when no dependency
> > injection
> > is available. Note: This class is
> >  * only meant as a utility for developers that want to employ the model
> > builder outside of the Maven build system, Maven
> >  * plugins should always acquire model builder instances via dependency
> > injection. Developers might want to subclass
> >  * this factory to provide custom implementations for some of the
> > components used by the model builder.
> >
> > Great, I think this will work :-)
> >
> > Best,
> > Andres
> >
> > ---
> > Java Champion; Groovy Enthusiast
> > JCP EC Associate Seat
> > http://andresalmiray.com
> > http://www.linkedin.com/in/aalmiray
> > --
> > What goes up, must come down. Ask any system administrator.
> > There are 10 types of people in the world: Those who understand binary,
> > and
> > those who don't.
> > To understand recursion, we must first understand recursion.
> >
> >
> > On Sat, Dec 8, 2018 at 6:47 PM Andres Almiray 
> wrote:
> >
> >> Thank you Robert!
> >>
> >> It looks like org.apache.maven.model.Model.DefaultModelBuilder provides
> >> the behavior I need given this method found in its contract
> >>
> >>ModelBuildingResult build( ModelBuildingRequest request )
> >> throws ModelBuildingException;
> >>
> >> ModelBuildingResult gives me access to the raw model (as read form the
> >> pom.xml file) and the effective model. This is exactly what I need :-)
> >>
> >> Is there a special way to initialize an instance of such type?
> >> Theoretically I'd like to call something like
> >>
> >> ModelBuildingRequest request = new DefaultModelBuildingRequest();
> >> request.setPomFile(...);
> >> ModelBuilder builder = ... // instantiate builder (??)
> >> ModelBuldingResult result = builder.build(request);
> >>
> >> Thanks for your help.
> >>
> >> Best,
> >> Andres
> >>
> >> ---
> >> Java Champion; Groovy Enthusiast
> >> JCP EC Associate Seat
> >> http://andresalmiray.com
> >> http://www.linkedin.com/in/aalmiray
> >> --
> >> What goes up, must come down. Ask any system administrator.
> >> There are 10 types of people in the world: Those who understand binary,
> >> and those who don't.
> >> To understand recursion, we must first understand recursion.
> >>
> >>
> >> On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte 
> >> wrote:
> >>
> >>> The ModelBuilder[1] is what you are looking for, and yes it does a
> LOT
> >>> :)
> >>>
> >>> Be aware that it is using CDI, so to make use of it you'll need
> >>> sisu/guice
> >>> too.
> >>>
> >>> Robert
> >>>
> >>> [1] https://maven.apache.org/ref/3.6.0/maven-model-builder/
> >>>
> >>> On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray  >
> >>> wrote:
> >>>
> >>> > Of course.
> >>> >
> >>> > This is definitely not a plugin project. My goal is to have an
> >>> in-memory
> >>> > representation of the POM as defined by a source pom.xml, to later
> >>> > transform/enrich it and write it back.
> >>> > As a side effect this tool can calculate statics on usage patterns
> >>> and
> >>> > recommend some others.
> >>> >
> >>> > Best,
> >>> > Andres
> >>> >
> >>> > ---
> >>> > Java Champion; Groovy Enthusiast
> >>> > JCP EC Associate Seat
> >>> > http://andresalmiray.com
> >>> > http://www.linkedin.com/in/aalmiray
> >>> > --
> >>> > What goes up, must come down. Ask any system administrator.
> >>> > There are 10 types of people in the world: Those who understand
> >>> binary,
> >>> > and
> >>> > those who don't.
> >>> > To understand recursion, we must first understand recursion.
> >>> >
> >>> >
> >>> > On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli 
> >>> > wrote:
> >>> >
> >>> >> Il sab 8 dic 2018, 18:09 Andres Almiray  ha
> >>> scritto:
> >>> >>
> >>> >> > Hello everyone,
> >>> >> >
> >>> >> > I have the need of building a model based on the data defined in a
> >>> >> pom.xml
> >>> >> > file.
> >>> >> > What would be the best way to read, 

Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Tibor Digana
Perhaps it is the issue where JVM passed ASCII 0x04 == EOT to the stream
when we called System.exit in the fork. This has corrupted the stream too.
Is there any Jira issue refering to your problem?
https://en.wikipedia.org/wiki/End-of-Transmission_character
https://en.wikipedia.org/wiki/ASCII

On Sat, Dec 8, 2018 at 8:56 PM Eric Lilja  wrote:

> Hi, Tibor, yes I saw the milestone roadmap, that's why I am excited for
> M2 (which I tested both on private projects and at work), since it
> brings us closer to M3, which introduces changes which will be
> beneficial for Pax Exam (communicating with child processes through
> sockets).
> The problems with Pax Exam and surefire (for surefire version greater
> than 2.18.1), has varied over the versions (of surefire since 2.18.1).
> Before tests would often crash, now things work better but you often get
> this 30s timeout at the end. That's why we stayed with 2.18.1 in our
> organization.
>
> Great work on M2, looking forward to see it release and even more
> excited about M3!
>
> I didn't mean to hijack the vote email thread, and this will be last
> message on this thread about this topic. I was just excited about M2
> since it brings us a lot closer to M3, which I am even more excited
> about for the reason described above, and I wanted to share that
> excitement.
>
> Great work!
>
> - Eric L
>
> On 2018-12-08 19:40, Tibor Digana wrote:
> > @Eric Lilja
> > You use Pax. I guess you are refering to the problem with standard input
> > and standard output stream. The plugin says that the stream is corrupted.
> > Am I right?
> >
> > Did you see the documentation here in this Vote? See the roadmap on the
> > front page
> >
> http://maven.apache.org/surefire-archives/surefire-LATEST/maven-surefire-plugin/index.html
> >
> > This is long standing problem but it can be changed in new major version.
> > But I still think that Pax and Felix could provide some kind of
> abstraction
> > layer of these streams in testing purposes.
> >
> > Cheers
> > Tibor
> >
> >
> >
> >
> >
> > On Sat, Dec 8, 2018 at 7:20 PM Eric Lilja  wrote:
> >
> >> +1 (non-binding)
> >>
> >> M2 is looking good on my projects, and I can't wait for the upcoming M3
> >> after M2, which I believe will solve the long-standing problems running
> >> Pax Exam tests (in the organization I work in we use 2.18.1 of surefire
> >> for Pax-Exam tests particularly, as no version of Surefire higher than
> >> that works well with it)
> >>
> >> - Eric L
> >>
> >> On 2018-12-05 23:26, Tibor Digana wrote:
> >>> Hi,
> >>>
> >>> We solved 15 issues:
> >>>
> >>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927=12344396
> >>> There are still a couple of issues left in JIRA:
> >>>
> >>
> https://issues.apache.org/jira/i#issues/?jql=project+%3D+SUREFIRE+AND+status+%3D+Open+ORDER+BY+priority+DESC
> >>> Staging repo:
> >>> https://repository.apache.org/content/repositories/maven-1472/
> >>>
> >>
> https://repository.apache.org/service/local/repositories/maven-1472/content/org/apache/maven/surefire/surefire/3.0.0-M2/surefire-3.0.0-M2-source-release.zip
> >>> Source release checksum(s):
> >>> surefire-3.0.0-M2-source-release.zip sha1:
> >>> 421f6fda2367d128007b84b213690db348a8b2c6
> >>> surefire-3.0.0-M2-source-release.zip sha512:
> >>>
> >>
> ed02ac46eec7f632180e00487f65901420908ea5afc0e507350c2fa529a6278f73f32f915bcd1dee0bcdffbf391d045b9f3cfe557003d02af9e2dc91ddb31212
> >>> Staging site:
> >>> http://maven.apache.org/surefire-archives/surefire-LATEST/
> >>>
> >>> Guide to testing staged releases:
> >>> http://maven.apache.org/guides/development/guide-testing-releases.html
> >>>
> >>> Vote open for 72 hours.
> >>>
> >>> [ ] +1
> >>> [ ] +0
> >>> [ ] -1
> >>>
> >>> BR
> >>> Tibor
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: dev-h...@maven.apache.org
> >>
> >>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Eric Lilja
Hi, Tibor, yes I saw the milestone roadmap, that's why I am excited for 
M2 (which I tested both on private projects and at work), since it 
brings us closer to M3, which introduces changes which will be 
beneficial for Pax Exam (communicating with child processes through 
sockets).
The problems with Pax Exam and surefire (for surefire version greater 
than 2.18.1), has varied over the versions (of surefire since 2.18.1). 
Before tests would often crash, now things work better but you often get 
this 30s timeout at the end. That's why we stayed with 2.18.1 in our 
organization.


Great work on M2, looking forward to see it release and even more 
excited about M3!


I didn't mean to hijack the vote email thread, and this will be last 
message on this thread about this topic. I was just excited about M2 
since it brings us a lot closer to M3, which I am even more excited 
about for the reason described above, and I wanted to share that excitement.


Great work!

- Eric L

On 2018-12-08 19:40, Tibor Digana wrote:

@Eric Lilja
You use Pax. I guess you are refering to the problem with standard input
and standard output stream. The plugin says that the stream is corrupted.
Am I right?

Did you see the documentation here in this Vote? See the roadmap on the
front page
http://maven.apache.org/surefire-archives/surefire-LATEST/maven-surefire-plugin/index.html

This is long standing problem but it can be changed in new major version.
But I still think that Pax and Felix could provide some kind of abstraction
layer of these streams in testing purposes.

Cheers
Tibor





On Sat, Dec 8, 2018 at 7:20 PM Eric Lilja  wrote:


+1 (non-binding)

M2 is looking good on my projects, and I can't wait for the upcoming M3
after M2, which I believe will solve the long-standing problems running
Pax Exam tests (in the organization I work in we use 2.18.1 of surefire
for Pax-Exam tests particularly, as no version of Surefire higher than
that works well with it)

- Eric L

On 2018-12-05 23:26, Tibor Digana wrote:

Hi,

We solved 15 issues:


https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927=12344396

There are still a couple of issues left in JIRA:


https://issues.apache.org/jira/i#issues/?jql=project+%3D+SUREFIRE+AND+status+%3D+Open+ORDER+BY+priority+DESC

Staging repo:
https://repository.apache.org/content/repositories/maven-1472/


https://repository.apache.org/service/local/repositories/maven-1472/content/org/apache/maven/surefire/surefire/3.0.0-M2/surefire-3.0.0-M2-source-release.zip

Source release checksum(s):
surefire-3.0.0-M2-source-release.zip sha1:
421f6fda2367d128007b84b213690db348a8b2c6
surefire-3.0.0-M2-source-release.zip sha512:


ed02ac46eec7f632180e00487f65901420908ea5afc0e507350c2fa529a6278f73f32f915bcd1dee0bcdffbf391d045b9f3cfe557003d02af9e2dc91ddb31212

Staging site:
http://maven.apache.org/surefire-archives/surefire-LATEST/

Guide to testing staged releases:
http://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1

BR
Tibor



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





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



Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Tibor Digana
@Eric Lilja
You use Pax. I guess you are refering to the problem with standard input
and standard output stream. The plugin says that the stream is corrupted.
Am I right?

Did you see the documentation here in this Vote? See the roadmap on the
front page
http://maven.apache.org/surefire-archives/surefire-LATEST/maven-surefire-plugin/index.html

This is long standing problem but it can be changed in new major version.
But I still think that Pax and Felix could provide some kind of abstraction
layer of these streams in testing purposes.

Cheers
Tibor





On Sat, Dec 8, 2018 at 7:20 PM Eric Lilja  wrote:

> +1 (non-binding)
>
> M2 is looking good on my projects, and I can't wait for the upcoming M3
> after M2, which I believe will solve the long-standing problems running
> Pax Exam tests (in the organization I work in we use 2.18.1 of surefire
> for Pax-Exam tests particularly, as no version of Surefire higher than
> that works well with it)
>
> - Eric L
>
> On 2018-12-05 23:26, Tibor Digana wrote:
> > Hi,
> >
> > We solved 15 issues:
> >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927=12344396
> >
> > There are still a couple of issues left in JIRA:
> >
> https://issues.apache.org/jira/i#issues/?jql=project+%3D+SUREFIRE+AND+status+%3D+Open+ORDER+BY+priority+DESC
> >
> > Staging repo:
> > https://repository.apache.org/content/repositories/maven-1472/
> >
> https://repository.apache.org/service/local/repositories/maven-1472/content/org/apache/maven/surefire/surefire/3.0.0-M2/surefire-3.0.0-M2-source-release.zip
> >
> > Source release checksum(s):
> > surefire-3.0.0-M2-source-release.zip sha1:
> > 421f6fda2367d128007b84b213690db348a8b2c6
> > surefire-3.0.0-M2-source-release.zip sha512:
> >
> ed02ac46eec7f632180e00487f65901420908ea5afc0e507350c2fa529a6278f73f32f915bcd1dee0bcdffbf391d045b9f3cfe557003d02af9e2dc91ddb31212
> >
> > Staging site:
> > http://maven.apache.org/surefire-archives/surefire-LATEST/
> >
> > Guide to testing staged releases:
> > http://maven.apache.org/guides/development/guide-testing-releases.html
> >
> > Vote open for 72 hours.
> >
> > [ ] +1
> > [ ] +0
> > [ ] -1
> >
> > BR
> > Tibor
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: Parsing pom.xml

2018-12-08 Thread Robert Scholte

Ah, you might be lucky with this solution :)

On Sat, 08 Dec 2018 19:20:59 +0100, Andres Almiray   
wrote:



Looks like I found the answer to instantiating the ModelBuilder

new DefaultModelBuilderFactory().newInstance()

From the javadoc:

 * A factory to create model builder instances when no dependency  
injection

is available. Note: This class is
 * only meant as a utility for developers that want to employ the model
builder outside of the Maven build system, Maven
 * plugins should always acquire model builder instances via dependency
injection. Developers might want to subclass
 * this factory to provide custom implementations for some of the
components used by the model builder.

Great, I think this will work :-)

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary,  
and

those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:47 PM Andres Almiray  wrote:


Thank you Robert!

It looks like org.apache.maven.model.Model.DefaultModelBuilder provides
the behavior I need given this method found in its contract

   ModelBuildingResult build( ModelBuildingRequest request )
throws ModelBuildingException;

ModelBuildingResult gives me access to the raw model (as read form the
pom.xml file) and the effective model. This is exactly what I need :-)

Is there a special way to initialize an instance of such type?
Theoretically I'd like to call something like

ModelBuildingRequest request = new DefaultModelBuildingRequest();
request.setPomFile(...);
ModelBuilder builder = ... // instantiate builder (??)
ModelBuldingResult result = builder.build(request);

Thanks for your help.

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary,
and those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte 
wrote:

The ModelBuilder[1] is what you are looking for, and yes it does a LOT  
:)


Be aware that it is using CDI, so to make use of it you'll need
sisu/guice
too.

Robert

[1] https://maven.apache.org/ref/3.6.0/maven-model-builder/

On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray 
wrote:

> Of course.
>
> This is definitely not a plugin project. My goal is to have an  
in-memory

> representation of the POM as defined by a source pom.xml, to later
> transform/enrich it and write it back.
> As a side effect this tool can calculate statics on usage patterns  
and

> recommend some others.
>
> Best,
> Andres
>
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> http://andresalmiray.com
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand
binary,
> and
> those who don't.
> To understand recursion, we must first understand recursion.
>
>
> On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli 
> wrote:
>
>> Il sab 8 dic 2018, 18:09 Andres Almiray  ha
scritto:
>>
>> > Hello everyone,
>> >
>> > I have the need of building a model based on the data defined in a
>> pom.xml
>> > file.
>> > What would be the best way to read, parse, and obtain such model
using
>> > standard Maven APIs?
>> >
>>
>> Could you given some more context?
>>
>> I guess you are not writing a plugin.
>>
>> Using the internal API may be useful depending on your case.
>>
>> Enrico
>>
>> >
>> > Best,
>> > Andres
>> >
>> > ---
>> > Java Champion; Groovy Enthusiast
>> > JCP EC Associate Seat
>> > http://andresalmiray.com
>> > http://www.linkedin.com/in/aalmiray
>> > --
>> > What goes up, must come down. Ask any system administrator.
>> > There are 10 types of people in the world: Those who understand
>> binary,
>> and
>> > those who don't.
>> > To understand recursion, we must first understand recursion.
>> >
>> --
>>
>>
>> -- Enrico Olivelli

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



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



Re: Parsing pom.xml

2018-12-08 Thread Andres Almiray
Looks like I found the answer to instantiating the ModelBuilder

new DefaultModelBuilderFactory().newInstance()

>From the javadoc:

 * A factory to create model builder instances when no dependency injection
is available. Note: This class is
 * only meant as a utility for developers that want to employ the model
builder outside of the Maven build system, Maven
 * plugins should always acquire model builder instances via dependency
injection. Developers might want to subclass
 * this factory to provide custom implementations for some of the
components used by the model builder.

Great, I think this will work :-)

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:47 PM Andres Almiray  wrote:

> Thank you Robert!
>
> It looks like org.apache.maven.model.Model.DefaultModelBuilder provides
> the behavior I need given this method found in its contract
>
>ModelBuildingResult build( ModelBuildingRequest request )
> throws ModelBuildingException;
>
> ModelBuildingResult gives me access to the raw model (as read form the
> pom.xml file) and the effective model. This is exactly what I need :-)
>
> Is there a special way to initialize an instance of such type?
> Theoretically I'd like to call something like
>
> ModelBuildingRequest request = new DefaultModelBuildingRequest();
> request.setPomFile(...);
> ModelBuilder builder = ... // instantiate builder (??)
> ModelBuldingResult result = builder.build(request);
>
> Thanks for your help.
>
> Best,
> Andres
>
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> http://andresalmiray.com
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand binary,
> and those who don't.
> To understand recursion, we must first understand recursion.
>
>
> On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte 
> wrote:
>
>> The ModelBuilder[1] is what you are looking for, and yes it does a LOT :)
>>
>> Be aware that it is using CDI, so to make use of it you'll need
>> sisu/guice
>> too.
>>
>> Robert
>>
>> [1] https://maven.apache.org/ref/3.6.0/maven-model-builder/
>>
>> On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray 
>> wrote:
>>
>> > Of course.
>> >
>> > This is definitely not a plugin project. My goal is to have an in-memory
>> > representation of the POM as defined by a source pom.xml, to later
>> > transform/enrich it and write it back.
>> > As a side effect this tool can calculate statics on usage patterns and
>> > recommend some others.
>> >
>> > Best,
>> > Andres
>> >
>> > ---
>> > Java Champion; Groovy Enthusiast
>> > JCP EC Associate Seat
>> > http://andresalmiray.com
>> > http://www.linkedin.com/in/aalmiray
>> > --
>> > What goes up, must come down. Ask any system administrator.
>> > There are 10 types of people in the world: Those who understand
>> binary,
>> > and
>> > those who don't.
>> > To understand recursion, we must first understand recursion.
>> >
>> >
>> > On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli 
>> > wrote:
>> >
>> >> Il sab 8 dic 2018, 18:09 Andres Almiray  ha
>> scritto:
>> >>
>> >> > Hello everyone,
>> >> >
>> >> > I have the need of building a model based on the data defined in a
>> >> pom.xml
>> >> > file.
>> >> > What would be the best way to read, parse, and obtain such model
>> using
>> >> > standard Maven APIs?
>> >> >
>> >>
>> >> Could you given some more context?
>> >>
>> >> I guess you are not writing a plugin.
>> >>
>> >> Using the internal API may be useful depending on your case.
>> >>
>> >> Enrico
>> >>
>> >> >
>> >> > Best,
>> >> > Andres
>> >> >
>> >> > ---
>> >> > Java Champion; Groovy Enthusiast
>> >> > JCP EC Associate Seat
>> >> > http://andresalmiray.com
>> >> > http://www.linkedin.com/in/aalmiray
>> >> > --
>> >> > What goes up, must come down. Ask any system administrator.
>> >> > There are 10 types of people in the world: Those who understand
>> >> binary,
>> >> and
>> >> > those who don't.
>> >> > To understand recursion, we must first understand recursion.
>> >> >
>> >> --
>> >>
>> >>
>> >> -- Enrico Olivelli
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
>>


Re: Parsing pom.xml

2018-12-08 Thread Robert Scholte

Hi Andres,

this is what you need to do:

@Inject
private ModelBuilder builder;

(or with @Requiment when using only plexus annotations)

This means you need your code to run in a CDI container. If you use  
Sisu[1] you can mix Plexus and JSR330 annotations.


Maven & JSR-330[2] Should explain most details and get you started. It has  
chapters for plugins and extensions, since these are the main areas where  
to use it. Standalone should be possible. The Sisu page[1] is a good  
start, and ensure to include org.eclipse.sisu.inject and  
org.eclipse.sisu.plexus.
(I could point you to how Maven initializes the container, but it does  
much, much more due to the need for isolated classloaders, etc.)


thanks
Robert

[1] https://www.eclipse.org/sisu/docs/tutorials/index.html
[2] https://maven.apache.org/maven-jsr330.html


On Sat, 08 Dec 2018 18:47:21 +0100, Andres Almiray   
wrote:



Thank you Robert!

It looks like org.apache.maven.model.Model.DefaultModelBuilder provides  
the

behavior I need given this method found in its contract

   ModelBuildingResult build( ModelBuildingRequest request )
throws ModelBuildingException;

ModelBuildingResult gives me access to the raw model (as read form the
pom.xml file) and the effective model. This is exactly what I need :-)

Is there a special way to initialize an instance of such type?
Theoretically I'd like to call something like

ModelBuildingRequest request = new DefaultModelBuildingRequest();
request.setPomFile(...);
ModelBuilder builder = ... // instantiate builder (??)
ModelBuldingResult result = builder.build(request);

Thanks for your help.

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary,  
and

those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte   
wrote:


The ModelBuilder[1] is what you are looking for, and yes it does a LOT  
:)


Be aware that it is using CDI, so to make use of it you'll need
sisu/guice
too.

Robert

[1] https://maven.apache.org/ref/3.6.0/maven-model-builder/

On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray 
wrote:

> Of course.
>
> This is definitely not a plugin project. My goal is to have an  
in-memory

> representation of the POM as defined by a source pom.xml, to later
> transform/enrich it and write it back.
> As a side effect this tool can calculate statics on usage patterns and
> recommend some others.
>
> Best,
> Andres
>
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> http://andresalmiray.com
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand  
binary,

> and
> those who don't.
> To understand recursion, we must first understand recursion.
>
>
> On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli 
> wrote:
>
>> Il sab 8 dic 2018, 18:09 Andres Almiray  ha
scritto:
>>
>> > Hello everyone,
>> >
>> > I have the need of building a model based on the data defined in a
>> pom.xml
>> > file.
>> > What would be the best way to read, parse, and obtain such model  
using

>> > standard Maven APIs?
>> >
>>
>> Could you given some more context?
>>
>> I guess you are not writing a plugin.
>>
>> Using the internal API may be useful depending on your case.
>>
>> Enrico
>>
>> >
>> > Best,
>> > Andres
>> >
>> > ---
>> > Java Champion; Groovy Enthusiast
>> > JCP EC Associate Seat
>> > http://andresalmiray.com
>> > http://www.linkedin.com/in/aalmiray
>> > --
>> > What goes up, must come down. Ask any system administrator.
>> > There are 10 types of people in the world: Those who understand
>> binary,
>> and
>> > those who don't.
>> > To understand recursion, we must first understand recursion.
>> >
>> --
>>
>>
>> -- Enrico Olivelli

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



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



Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Eric Lilja

+1 (non-binding)

M2 is looking good on my projects, and I can't wait for the upcoming M3 
after M2, which I believe will solve the long-standing problems running 
Pax Exam tests (in the organization I work in we use 2.18.1 of surefire 
for Pax-Exam tests particularly, as no version of Surefire higher than 
that works well with it)


- Eric L

On 2018-12-05 23:26, Tibor Digana wrote:

Hi,

We solved 15 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927=12344396

There are still a couple of issues left in JIRA:
https://issues.apache.org/jira/i#issues/?jql=project+%3D+SUREFIRE+AND+status+%3D+Open+ORDER+BY+priority+DESC

Staging repo:
https://repository.apache.org/content/repositories/maven-1472/
https://repository.apache.org/service/local/repositories/maven-1472/content/org/apache/maven/surefire/surefire/3.0.0-M2/surefire-3.0.0-M2-source-release.zip

Source release checksum(s):
surefire-3.0.0-M2-source-release.zip sha1:
421f6fda2367d128007b84b213690db348a8b2c6
surefire-3.0.0-M2-source-release.zip sha512:
ed02ac46eec7f632180e00487f65901420908ea5afc0e507350c2fa529a6278f73f32f915bcd1dee0bcdffbf391d045b9f3cfe557003d02af9e2dc91ddb31212

Staging site:
http://maven.apache.org/surefire-archives/surefire-LATEST/

Guide to testing staged releases:
http://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1

BR
Tibor




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



Re: Parsing pom.xml

2018-12-08 Thread Andres Almiray
HI Oliver,

Nice! However that approach may require mapping all possible elements,
including plugins and more. The ModelBuilder should take care of that,
isn't it?

Cheers,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:58 PM Oliver Drotbohm  wrote:

> If it's about pure XML parsing and tweaking the information and building
> the model is not required, XmlBeam [0] is a lightweight alternative to map
> the entire file to a Java object. We use that in the Spring Data release
> automation. Declare an interface containing accessors backed by XPath
> expressions, use the API to create instances and read and write data from
> and to the XML file.
>
> Here [1] is the interface we use to access the parts of the POM relevant
> to our use case.
>
> Cheers,
> Ollie
>
> [0] https://xmlbeam.org/
> [1]
> https://github.com/spring-projects/spring-data-dev-tools/blob/82252be5d7c11a137a68c7fe985b53e04d91cb18/release-tools/src/main/java/org/springframework/data/release/build/Pom.java
>
> > Am 08.12.2018 um 18:47 schrieb Andres Almiray :
> >
> > Thank you Robert!
> >
> > It looks like org.apache.maven.model.Model.DefaultModelBuilder provides
> the
> > behavior I need given this method found in its contract
> >
> >   ModelBuildingResult build( ModelBuildingRequest request )
> >throws ModelBuildingException;
> >
> > ModelBuildingResult gives me access to the raw model (as read form the
> > pom.xml file) and the effective model. This is exactly what I need :-)
> >
> > Is there a special way to initialize an instance of such type?
> > Theoretically I'd like to call something like
> >
> >ModelBuildingRequest request = new DefaultModelBuildingRequest();
> >request.setPomFile(...);
> >ModelBuilder builder = ... // instantiate builder (??)
> >ModelBuldingResult result = builder.build(request);
> >
> > Thanks for your help.
> >
> > Best,
> > Andres
> >
> > ---
> > Java Champion; Groovy Enthusiast
> > JCP EC Associate Seat
> >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__andresalmiray.com=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=pWrsdUJpQnH-DJXIDk-VNgy7wfo1-h6nGxVaeazNdJI=
> >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linkedin.com_in_aalmiray=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=UGKJpSnO9O4VH5cvMfn7ZTk5m9sFXqHsplwnlS1nbpk=
> > --
> > What goes up, must come down. Ask any system administrator.
> > There are 10 types of people in the world: Those who understand binary,
> and
> > those who don't.
> > To understand recursion, we must first understand recursion.
> >
> >
> > On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte 
> wrote:
> >
> >> The ModelBuilder[1] is what you are looking for, and yes it does a LOT
> :)
> >>
> >> Be aware that it is using CDI, so to make use of it you'll need
> >> sisu/guice
> >> too.
> >>
> >> Robert
> >>
> >> [1]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__maven.apache.org_ref_3.6.0_maven-2Dmodel-2Dbuilder_=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=nOkaCJH3dSvCiihbxfBQKXKE-I2GunCrdaIK9gjbVJs=
> >>
> >> On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray 
> >> wrote:
> >>
> >>> Of course.
> >>>
> >>> This is definitely not a plugin project. My goal is to have an
> in-memory
> >>> representation of the POM as defined by a source pom.xml, to later
> >>> transform/enrich it and write it back.
> >>> As a side effect this tool can calculate statics on usage patterns and
> >>> recommend some others.
> >>>
> >>> Best,
> >>> Andres
> >>>
> >>> ---
> >>> Java Champion; Groovy Enthusiast
> >>> JCP EC Associate Seat
> >>>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__andresalmiray.com=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=pWrsdUJpQnH-DJXIDk-VNgy7wfo1-h6nGxVaeazNdJI=
> >>>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linkedin.com_in_aalmiray=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=UGKJpSnO9O4VH5cvMfn7ZTk5m9sFXqHsplwnlS1nbpk=
> >>> --
> >>> What goes up, must come down. Ask any system administrator.
> >>> There are 10 types of people in the world: Those who understand binary,
> >>> and
> >>> those who don't.
> >>> To 

Re: Parsing pom.xml

2018-12-08 Thread Oliver Drotbohm
If it's about pure XML parsing and tweaking the information and building the 
model is not required, XmlBeam [0] is a lightweight alternative to map the 
entire file to a Java object. We use that in the Spring Data release 
automation. Declare an interface containing accessors backed by XPath 
expressions, use the API to create instances and read and write data from and 
to the XML file.

Here [1] is the interface we use to access the parts of the POM relevant to our 
use case.

Cheers,
Ollie

[0] https://xmlbeam.org/
[1] 
https://github.com/spring-projects/spring-data-dev-tools/blob/82252be5d7c11a137a68c7fe985b53e04d91cb18/release-tools/src/main/java/org/springframework/data/release/build/Pom.java

> Am 08.12.2018 um 18:47 schrieb Andres Almiray :
> 
> Thank you Robert!
> 
> It looks like org.apache.maven.model.Model.DefaultModelBuilder provides the
> behavior I need given this method found in its contract
> 
>   ModelBuildingResult build( ModelBuildingRequest request )
>throws ModelBuildingException;
> 
> ModelBuildingResult gives me access to the raw model (as read form the
> pom.xml file) and the effective model. This is exactly what I need :-)
> 
> Is there a special way to initialize an instance of such type?
> Theoretically I'd like to call something like
> 
>ModelBuildingRequest request = new DefaultModelBuildingRequest();
>request.setPomFile(...);
>ModelBuilder builder = ... // instantiate builder (??)
>ModelBuldingResult result = builder.build(request);
> 
> Thanks for your help.
> 
> Best,
> Andres
> 
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> https://urldefense.proofpoint.com/v2/url?u=http-3A__andresalmiray.com=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=pWrsdUJpQnH-DJXIDk-VNgy7wfo1-h6nGxVaeazNdJI=
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linkedin.com_in_aalmiray=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=UGKJpSnO9O4VH5cvMfn7ZTk5m9sFXqHsplwnlS1nbpk=
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand binary, and
> those who don't.
> To understand recursion, we must first understand recursion.
> 
> 
> On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte  wrote:
> 
>> The ModelBuilder[1] is what you are looking for, and yes it does a LOT :)
>> 
>> Be aware that it is using CDI, so to make use of it you'll need
>> sisu/guice
>> too.
>> 
>> Robert
>> 
>> [1] 
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__maven.apache.org_ref_3.6.0_maven-2Dmodel-2Dbuilder_=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=nOkaCJH3dSvCiihbxfBQKXKE-I2GunCrdaIK9gjbVJs=
>> 
>> On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray 
>> wrote:
>> 
>>> Of course.
>>> 
>>> This is definitely not a plugin project. My goal is to have an in-memory
>>> representation of the POM as defined by a source pom.xml, to later
>>> transform/enrich it and write it back.
>>> As a side effect this tool can calculate statics on usage patterns and
>>> recommend some others.
>>> 
>>> Best,
>>> Andres
>>> 
>>> ---
>>> Java Champion; Groovy Enthusiast
>>> JCP EC Associate Seat
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__andresalmiray.com=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=pWrsdUJpQnH-DJXIDk-VNgy7wfo1-h6nGxVaeazNdJI=
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linkedin.com_in_aalmiray=DwIBaQ=lnl9vOaLMzsy2niBC8-h_K-7QJuNJEsFrzdndhuJ3Sw=7iLfhC17FN-CWhuzo2HX1g0LRD1P0huXh9Zkd3m6MZ0=IxYdo3ScIXOSlnfw8tbvEDuE1wDPwLfKRtL_lYOz0zs=UGKJpSnO9O4VH5cvMfn7ZTk5m9sFXqHsplwnlS1nbpk=
>>> --
>>> What goes up, must come down. Ask any system administrator.
>>> There are 10 types of people in the world: Those who understand binary,
>>> and
>>> those who don't.
>>> To understand recursion, we must first understand recursion.
>>> 
>>> 
>>> On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli 
>>> wrote:
>>> 
 Il sab 8 dic 2018, 18:09 Andres Almiray  ha
>> scritto:
 
> Hello everyone,
> 
> I have the need of building a model based on the data defined in a
 pom.xml
> file.
> What would be the best way to read, parse, and obtain such model using
> standard Maven APIs?
> 
 
 Could you given some more context?
 
 I guess you are not writing a plugin.
 
 Using the internal API may be useful depending on your case.
 
 Enrico
 
> 
> Best,
> Andres
> 
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat

Re: Parsing pom.xml

2018-12-08 Thread Andres Almiray
Thank you Robert!

It looks like org.apache.maven.model.Model.DefaultModelBuilder provides the
behavior I need given this method found in its contract

   ModelBuildingResult build( ModelBuildingRequest request )
throws ModelBuildingException;

ModelBuildingResult gives me access to the raw model (as read form the
pom.xml file) and the effective model. This is exactly what I need :-)

Is there a special way to initialize an instance of such type?
Theoretically I'd like to call something like

ModelBuildingRequest request = new DefaultModelBuildingRequest();
request.setPomFile(...);
ModelBuilder builder = ... // instantiate builder (??)
ModelBuldingResult result = builder.build(request);

Thanks for your help.

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:33 PM Robert Scholte  wrote:

> The ModelBuilder[1] is what you are looking for, and yes it does a LOT :)
>
> Be aware that it is using CDI, so to make use of it you'll need
> sisu/guice
> too.
>
> Robert
>
> [1] https://maven.apache.org/ref/3.6.0/maven-model-builder/
>
> On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray 
> wrote:
>
> > Of course.
> >
> > This is definitely not a plugin project. My goal is to have an in-memory
> > representation of the POM as defined by a source pom.xml, to later
> > transform/enrich it and write it back.
> > As a side effect this tool can calculate statics on usage patterns and
> > recommend some others.
> >
> > Best,
> > Andres
> >
> > ---
> > Java Champion; Groovy Enthusiast
> > JCP EC Associate Seat
> > http://andresalmiray.com
> > http://www.linkedin.com/in/aalmiray
> > --
> > What goes up, must come down. Ask any system administrator.
> > There are 10 types of people in the world: Those who understand binary,
> > and
> > those who don't.
> > To understand recursion, we must first understand recursion.
> >
> >
> > On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli 
> > wrote:
> >
> >> Il sab 8 dic 2018, 18:09 Andres Almiray  ha
> scritto:
> >>
> >> > Hello everyone,
> >> >
> >> > I have the need of building a model based on the data defined in a
> >> pom.xml
> >> > file.
> >> > What would be the best way to read, parse, and obtain such model using
> >> > standard Maven APIs?
> >> >
> >>
> >> Could you given some more context?
> >>
> >> I guess you are not writing a plugin.
> >>
> >> Using the internal API may be useful depending on your case.
> >>
> >> Enrico
> >>
> >> >
> >> > Best,
> >> > Andres
> >> >
> >> > ---
> >> > Java Champion; Groovy Enthusiast
> >> > JCP EC Associate Seat
> >> > http://andresalmiray.com
> >> > http://www.linkedin.com/in/aalmiray
> >> > --
> >> > What goes up, must come down. Ask any system administrator.
> >> > There are 10 types of people in the world: Those who understand
> >> binary,
> >> and
> >> > those who don't.
> >> > To understand recursion, we must first understand recursion.
> >> >
> >> --
> >>
> >>
> >> -- Enrico Olivelli
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: Parsing pom.xml

2018-12-08 Thread Robert Scholte

The ModelBuilder[1] is what you are looking for, and yes it does a LOT :)

Be aware that it is using CDI, so to make use of it you'll need sisu/guice  
too.


Robert

[1] https://maven.apache.org/ref/3.6.0/maven-model-builder/

On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray   
wrote:



Of course.

This is definitely not a plugin project. My goal is to have an in-memory
representation of the POM as defined by a source pom.xml, to later
transform/enrich it and write it back.
As a side effect this tool can calculate statics on usage patterns and
recommend some others.

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary,  
and

those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli   
wrote:



Il sab 8 dic 2018, 18:09 Andres Almiray  ha scritto:

> Hello everyone,
>
> I have the need of building a model based on the data defined in a
pom.xml
> file.
> What would be the best way to read, parse, and obtain such model using
> standard Maven APIs?
>

Could you given some more context?

I guess you are not writing a plugin.

Using the internal API may be useful depending on your case.

Enrico

>
> Best,
> Andres
>
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> http://andresalmiray.com
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand  
binary,

and
> those who don't.
> To understand recursion, we must first understand recursion.
>
--


-- Enrico Olivelli


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



Re: Parsing pom.xml

2018-12-08 Thread Andres Almiray
Of course.

This is definitely not a plugin project. My goal is to have an in-memory
representation of the POM as defined by a source pom.xml, to later
transform/enrich it and write it back.
As a side effect this tool can calculate statics on usage patterns and
recommend some others.

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.


On Sat, Dec 8, 2018 at 6:17 PM Enrico Olivelli  wrote:

> Il sab 8 dic 2018, 18:09 Andres Almiray  ha scritto:
>
> > Hello everyone,
> >
> > I have the need of building a model based on the data defined in a
> pom.xml
> > file.
> > What would be the best way to read, parse, and obtain such model using
> > standard Maven APIs?
> >
>
> Could you given some more context?
>
> I guess you are not writing a plugin.
>
> Using the internal API may be useful depending on your case.
>
> Enrico
>
> >
> > Best,
> > Andres
> >
> > ---
> > Java Champion; Groovy Enthusiast
> > JCP EC Associate Seat
> > http://andresalmiray.com
> > http://www.linkedin.com/in/aalmiray
> > --
> > What goes up, must come down. Ask any system administrator.
> > There are 10 types of people in the world: Those who understand binary,
> and
> > those who don't.
> > To understand recursion, we must first understand recursion.
> >
> --
>
>
> -- Enrico Olivelli
>


Re: Parsing pom.xml

2018-12-08 Thread Enrico Olivelli
Il sab 8 dic 2018, 18:09 Andres Almiray  ha scritto:

> Hello everyone,
>
> I have the need of building a model based on the data defined in a pom.xml
> file.
> What would be the best way to read, parse, and obtain such model using
> standard Maven APIs?
>

Could you given some more context?

I guess you are not writing a plugin.

Using the internal API may be useful depending on your case.

Enrico

>
> Best,
> Andres
>
> ---
> Java Champion; Groovy Enthusiast
> JCP EC Associate Seat
> http://andresalmiray.com
> http://www.linkedin.com/in/aalmiray
> --
> What goes up, must come down. Ask any system administrator.
> There are 10 types of people in the world: Those who understand binary, and
> those who don't.
> To understand recursion, we must first understand recursion.
>
-- 


-- Enrico Olivelli


Parsing pom.xml

2018-12-08 Thread Andres Almiray
Hello everyone,

I have the need of building a model based on the data defined in a pom.xml
file.
What would be the best way to read, parse, and obtain such model using
standard Maven APIs?

Best,
Andres

---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmiray.com
http://www.linkedin.com/in/aalmiray
--
What goes up, must come down. Ask any system administrator.
There are 10 types of people in the world: Those who understand binary, and
those who don't.
To understand recursion, we must first understand recursion.


Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Francois Papon
+1 (non-binding)

Thanks!

regards,

François Papon
fpa...@apache.org

Le 06/12/2018 à 02:26, Tibor Digana a écrit :
> Hi,
>
> We solved 15 issues:
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927=12344396
>
> There are still a couple of issues left in JIRA:
> https://issues.apache.org/jira/i#issues/?jql=project+%3D+SUREFIRE+AND+status+%3D+Open+ORDER+BY+priority+DESC
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1472/
> https://repository.apache.org/service/local/repositories/maven-1472/content/org/apache/maven/surefire/surefire/3.0.0-M2/surefire-3.0.0-M2-source-release.zip
>
> Source release checksum(s):
> surefire-3.0.0-M2-source-release.zip sha1:
> 421f6fda2367d128007b84b213690db348a8b2c6
> surefire-3.0.0-M2-source-release.zip sha512:
> ed02ac46eec7f632180e00487f65901420908ea5afc0e507350c2fa529a6278f73f32f915bcd1dee0bcdffbf391d045b9f3cfe557003d02af9e2dc91ddb31212
>
> Staging site:
> http://maven.apache.org/surefire-archives/surefire-LATEST/
>
> Guide to testing staged releases:
> http://maven.apache.org/guides/development/guide-testing-releases.html
>
> Vote open for 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>
> BR
> Tibor
>


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



Re: How much m2e test suites cover of Maven ?

2018-12-08 Thread Mickael Istria
On Saturday, December 8, 2018, Robert Scholte  wrote:

> Hi,


Hi Robert,


> how can we verify that Maven changes are still compatible with IDEs?
> [...] Hence we are still looking for a way to verify these changes and
> their effects on IDEs.


I think https://bugs.eclipse.org/bugs/show_bug.cgi?id=542555 can be a
solution for m2e. I'll keep you in touch when this is done.

>

-- 
Mickael Istria
Eclipse IDE 
developer, for Red Hat Developers 


Re: [VOTE] Release Apache Maven Shared Component: Maven Dependency Analyzer 1.11.0

2018-12-08 Thread Mark Raynsford
+1 (non-binding)

-- 
Mark Raynsford | http://www.io7m.com



pgp3rVLfVx5Vr.pgp
Description: OpenPGP digital signature


[VOTE] Release Apache Maven Shared Component: Maven Dependency Analyzer 1.11.0

2018-12-08 Thread Karl Heinz Marbaise

Hi,

We solved 4 issues:
https://issues.apache.org/jira/projects/MSHARED/versions/12344434

There are still a couple of issues left in JIRA:
https://issues.apache.org/jira/issues/?jql=project%20%3D%20XX%20AND%20status%20%3D%20Open%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC

Staging repo:
https://repository.apache.org/content/repositories/maven-1475/

https://repository.apache.org/content/repositories/maven-1475/org/apache/maven/shared/maven-dependency-analyzer/1.11.0/maven-dependency-analyzer-1.11.0-source-release.zip

Source release checksum(s):
maven-dependency-analyzer-1.11.0-source-release.zip sha1: 
b60b75d2950f7dbf7716a0adbf0bc4ea482933f9
maven-dependency-analyzer-1.11.0-source-release.zip sha512: 
82c26f2279e0fb3fa99315c2236e777beaf880d7f57c9641a99d89327eef7f152991423488a6de01affd393ee6c370edeea4626df4f58eca59e54b32e25fc8c1


Staging site:
https://maven.apache.org/shared-archives/maven-dependency-analyzer-LATEST/

Guide to testing staged releases:
https://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for at least 72 hours.

[ ] +1
[ ] +0
[ ] -1

Kind regards
Karl Heinz Marbaise

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



[VOTE] Release Apache Maven Help Plugin version 3.1.1

2018-12-08 Thread Karl Heinz Marbaise

Hi,

We solved 6 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317522=12343422=text

There are still a couple of issues left in JIRA:
https://issues.apache.org/jira/issues/?jql=project%20%3D%20MPH%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC

Staging repo:
https://repository.apache.org/content/repositories/maven-1474
https://repository.apache.org/content/repositories/maven-1474/org/apache/maven/plugins/maven-help-plugin/3.1.1/maven-help-plugin-3.1.1-source-release.zip

Source release checksum(s):
maven-help-plugin-3.1.1-source-release.zip sha1: 
634d625cef141bd6f79477d1d8f41226ec96c4a6


maven-help-plugin-3.1.1-source-release.zip sha512: 
286a81f0c86078fc7233f8eaf46bed9de7aa2358a4a8752b5926564c1adde6c73f5fd29ab8198441cae02ddd5e0862090a06c25482c089744b2f1af7a107f396


Staging site:
https://maven.apache.org/plugins-archives/maven-help-plugin-LATEST/

Guide to testing staged releases:
https://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for at least 72 hours.

[ ] +1
[ ] +0
[ ] -1

Kind regards
Karl Heinz Marbaise

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



Re: parallelise not overlapping tasks

2018-12-08 Thread Romain Manni-Bucau
Using the scm is not enough or it is for single module projects.

You have to have a graph of dependencies (inputs/outputs) and save each
task state in target to have incremental support

But please note incremental build is != parallel build at mojo level.

This last one is easy to do and a quick win IMHO

Le sam. 8 déc. 2018 00:50, Tibor Digana  a écrit :

> In my projects, the most plugins use single execution.
> External projects also have this kind of principle.
> Thus we should have a look in those possibilities where the most plugins
> can gain the performance.
> Usually the compiler and tests take long.
> I know that maven-compiler-plugin:3.8.1 will be incremental which is good
> of course but we should perhaps continue with gaining the build
> performance.
> If somebody has an idea on how to develop a compiler which partially
> compiles a module depending on SCM changes, feel free to bring it to our
> mailing list. The same with tests where the set of tests is changed
> depending on SCM changes.
>
> Cheers
> Tibor
>
>
> On Fri, Jan 19, 2018 at 2:21 PM Romain Manni-Bucau 
> wrote:
>
> > Hi guys,
> >
> > there is no way to parallelize not conflicting tasks for a same phase at
> > the moment right? Any way it gets under the radar?
> >
> > A common example is to run all code analyzis concurrently (findbugs, pmd,
> > checkstyle, ...) at the same time without waiting for one then the other
> > etc since all can be very long.
> >
> > It could be nice an fancy to define part of the reactor parallelisablity
> in
> > the pom, like:
> >
> > 
> > 
> > process-sources
> > 
> > 
> >   ...
> >   ...
> >   ...
> >   ...
> > 
> > 
> >   ...
> >   ...
> >   ...
> >   ...
> > 
> > 
> > 
> > 
> >
> > anything to enhance it?
> >
> > Romain Manni-Bucau
> > @rmannibucau  |  Blog
> >  | Old Blog
> >  | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn 
> >
>


[VOTE] Release Apache Maven JAR Plugin version 3.1.1

2018-12-08 Thread Karl Heinz Marbaise

Hi,

We solved 7 issues:
https://issues.apache.org/jira/issues/?jql=project%20%3D%2012317526%20AND%20fixVersion%20%3D%2012343046%20ORDER%20BY%20priority%20DESC%2C%20key%20ASC

There are still a couple of issues left in JIRA:
https://issues.apache.org/jira/issues/?jql=project%20%3D%20MJAR%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC

Staging repo:
https://repository.apache.org/content/repositories/maven-1473

https://repository.apache.org/content/repositories/maven-1473/org/apache/maven/plugins/maven-jar-plugin/3.1.1/maven-jar-plugin-3.1.1-source-release.zip

Source release checksum(s):
maven-jar-plugin-3.1.1-source-release.zip sha1: 
391b98c141182f79a0577d94ddaa2cef8a33d0ba


maven-jar-plugin-3.1.1-source-release.zip sha512: 
92eedaee200c747c6a533562ae6b0bae03b6a39d47bee8e13c96149280b6fd728021c218b37433f3a6a321210575b5e50cb2fd871a7aa9a427f2a5120fbdf36a


Staging site:
http://maven.apache.org/plugins-archives/maven-jar-plugin-LATEST/

Guide to testing staged releases:
https://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for at least 72 hours.

[ ] +1
[ ] +0
[ ] -1

Kind regards
Karl Heinz Marbaise

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



Re: plugin:descriptor fails with java.util.NoSuchElementException

2018-12-08 Thread Enrico Olivelli
+1 for Tibor's explanation.
Enrico

Il sab 8 dic 2018, 12:29 Tibor Digana  ha scritto:

> PluginDescriptorGenerator.writeDescriptor does not use Threads so it must
> be the problem that the number of calls "endElement" is greater than calls
> "startElement".
>
> https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
>
>
> On Sat, Dec 8, 2018 at 11:46 AM Tibor Digana 
> wrote:
>
> > I do not think it can be such JVM issue with string concatenations,
> > otherwise
> > all the world has the same problem.
> > This type of issue is usually caused by multiple writes from multiple
> > threads.
> > Try to log every method with Thread id and we should see multiple ids.
> > The java.io is supposed to be synchronized and thread safe. Therefore
> > PrintWriter is a wrapper of thread safe implementations.
> > We should use ConcurrentLinkedList and identify large functionality. If
> > large methods changes status at multiple lines, then this is a critical
> > section and the class must be synchronized.
> >
> > Cheers
> > Tibor
> >
> >
> >
> >
> > --
> > Sent from:
> http://maven.40175.n5.nabble.com/Maven-Developers-f142166.html
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >
>
-- 


-- Enrico Olivelli


Re: [VOTE] Release Apache Maven Surefire Plugin version 3.0.0-M2

2018-12-08 Thread Karl Heinz Marbaise

Hi,

+1 from me.

Kind regards
Karl Heinz Marbaise
On 05/12/18 23:26, Tibor Digana wrote:

Hi,

We solved 15 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317927=12344396

There are still a couple of issues left in JIRA:
https://issues.apache.org/jira/i#issues/?jql=project+%3D+SUREFIRE+AND+status+%3D+Open+ORDER+BY+priority+DESC

Staging repo:
https://repository.apache.org/content/repositories/maven-1472/
https://repository.apache.org/service/local/repositories/maven-1472/content/org/apache/maven/surefire/surefire/3.0.0-M2/surefire-3.0.0-M2-source-release.zip

Source release checksum(s):
surefire-3.0.0-M2-source-release.zip sha1:
421f6fda2367d128007b84b213690db348a8b2c6
surefire-3.0.0-M2-source-release.zip sha512:
ed02ac46eec7f632180e00487f65901420908ea5afc0e507350c2fa529a6278f73f32f915bcd1dee0bcdffbf391d045b9f3cfe557003d02af9e2dc91ddb31212

Staging site:
http://maven.apache.org/surefire-archives/surefire-LATEST/

Guide to testing staged releases:
http://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1

BR
Tibor


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



Re: plugin:descriptor fails with java.util.NoSuchElementException

2018-12-08 Thread Tibor Digana
PluginDescriptorGenerator.writeDescriptor does not use Threads so it must
be the problem that the number of calls "endElement" is greater than calls
"startElement".
https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java


On Sat, Dec 8, 2018 at 11:46 AM Tibor Digana  wrote:

> I do not think it can be such JVM issue with string concatenations,
> otherwise
> all the world has the same problem.
> This type of issue is usually caused by multiple writes from multiple
> threads.
> Try to log every method with Thread id and we should see multiple ids.
> The java.io is supposed to be synchronized and thread safe. Therefore
> PrintWriter is a wrapper of thread safe implementations.
> We should use ConcurrentLinkedList and identify large functionality. If
> large methods changes status at multiple lines, then this is a critical
> section and the class must be synchronized.
>
> Cheers
> Tibor
>
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Developers-f142166.html
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: plugin:descriptor fails with java.util.NoSuchElementException

2018-12-08 Thread Tibor Digana
I do not think it can be such JVM issue with string concatenations, otherwise
all the world has the same problem.
This type of issue is usually caused by multiple writes from multiple
threads.
Try to log every method with Thread id and we should see multiple ids.
The java.io is supposed to be synchronized and thread safe. Therefore
PrintWriter is a wrapper of thread safe implementations.
We should use ConcurrentLinkedList and identify large functionality. If
large methods changes status at multiple lines, then this is a critical
section and the class must be synchronized.

Cheers
Tibor




--
Sent from: http://maven.40175.n5.nabble.com/Maven-Developers-f142166.html

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



Re: How much m2e test suites cover of Maven ?

2018-12-08 Thread Robert Scholte

Hi,

during the vote for 3.6.0 we were made aware of issues with different  
IDEs, which did indeed raise the question: how can we verify that Maven  
changes are still compatible with IDEs? [1]
Even though I consider the IDE as a wrapper around a tool like Maven (and  
IDEs should follow the tool), IDEs are nowadays way to important to  
ignore. Hence we are still looking for a way to verify these changes and  
their effects on IDEs.


thanks,
Robert

[1]  
https://lists.apache.org/thread.html/01a0ec5aa5ba9f48aba800150bc4fb5e6babbe80640bd2f515132c32@%3Cdev.maven.apache.org%3E


On Fri, 07 Dec 2018 11:40:23 +0100, Mickael Istria   
wrote:



Hi all,

In my intent to improve m2e, I realize that one key criteria of
sustainability for m2e project is the ability to interact well with Maven
project (interacting more with the community, trying snapshots,  
identifying

breaking or major issues, consolidating the non-CLI usage of Maven as
APIs...). And, also, the other way round: Maven needs more feedback from
downstream integrations like IDE or CI engines provide to make sure it
remains easy to write tools or other bricks for it.

I've set up m2e code coverage for that locally (and submitting related
patches to Gerrit and GitHub to the m2e project), and have included in  
the
coverage report the plain Maven packages to measure how much m2e test  
suite

covers Maven.
I build the HTML reports with Ant:
https://github.com/mickaelistria/m2e-covering-maven/blob/master/coverage-report-build.xml
against the version of Maven that's used by m2e (currently 3.5.3).
And here is the output:  
https://mickaelistria.github.io/m2e-covering-maven/


We can see that m2e tests roughly covers ~35% of Maven, and in a  
different

story as the CLI.
I think this results are interesting for both m2e and Maven and I let you
all have a look. In the future, I'd like to see those produced more
frequently by m2e and -if it makes sense- aggregated with plain Maven  
test

coverage data when m2e tries a snapshot or staging; with the goal of
identifying parts of the code that are less reliable or critical.

Cheers,


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



Re: MNG-6533 and MNG-6529

2018-12-08 Thread Robert Scholte

These PRs look fine, I'll run them on our CI servers.

thanks,
Robert

On Thu, 06 Dec 2018 10:41:58 +0100, Mickael Istria   
wrote:



Hi all,

As part of a major performance improvement in m2e, we'd like to use the
ProjectBuilder.build(list_of_poms, ...) which drastically reduce CPU and
RAM consumption compared to iterating on ProjectBuilder.build(single_pom,
...).
We identified 2 relatively small limitations blocking m2e from adoption
ProjectBuilder.build(list_of_poms,...) that seems to just be missing
features compared to ProjectBuilder.build(single_pom...) because no-one
needed them to so far. We're covered these 2 issues in MNG-6529 and
MNG-6533; and there are pull requests open for both.
We'd appreciate if those can be targeted for review (and if everything is
fine, merge) as part of next release.

Thanks in advance.


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