Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-09 Thread Jörg Hohwiller
Am 09.03.2014 21:32, schrieb Robert Scholte: Cool, will you pick this up? Done. consumer-maven-plugin -> flatten-maven-plugin consumer-pom.xml -> flattened-pom.xml Consumer*.java -> Flatten*.java etc. Hope that I catched up everything but I was very careful. Everything is committed and ITs are

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-09 Thread Robert Scholte
Cool, will you pick this up? Robert Op Sun, 09 Mar 2014 21:30:10 +0100 schreef Jörg Hohwiller : Am 08.03.2014 12:35, schrieb Robert Scholte: Hi Jörg, Hi Robert, After rescanning the code, I wasn't convinced of embedding/moving the dependencies from profiles activated by properties of fi

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-09 Thread Jörg Hohwiller
Am 08.03.2014 12:35, schrieb Robert Scholte: Hi Jörg, Hi Robert, After rescanning the code, I wasn't convinced of embedding/moving the dependencies from profiles activated by properties of files, because the result would be different if the original pom.xml was deployed and Maven would then

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-08 Thread Robert Scholte
Hi Jörg, After rescanning the code, I wasn't convinced of embedding/moving the dependencies from profiles activated by properties of files, because the result would be different if the original pom.xml was deployed and Maven would then resolve the dependencies. So I've added the property em

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-07 Thread Jörg Hohwiller
Hi Robert, interesting point with Dependencies vs. List. However, these JIRA issues are not the cause IMHO. The problem is that Dependency does not override equals and hashCode. Therefore equals checks for object identity (==). Now if we have a List and do contains(profileDependency) it wont wo

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-07 Thread Jörg Hohwiller
Hi there, as suggested by Robert, I removed these options in the POM generated by the plugin: > - name > - description > - url > - inceptionyear > - scm Is there anything else to do? Who can have a look and decide whether we can keep the name and follow the same ideas or if we have to rename

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-07 Thread Robert Scholte
There are enough comments in JIRA http://jira.codehaus.org/browse/MNG-1388?jql=project%20%3D%20MNG%20AND%20text%20~%20%22profile%20dependencies%22 Op Fri, 07 Mar 2014 17:37:50 +0100 schreef Robert Scholte : Hi Jörg, I think I've found another interesting case. I wanted to change the follow

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-07 Thread Robert Scholte
Hi Jörg, I think I've found another interesting case. I wanted to change the following method: protected List createConsumerDependencies( Model effectiveModel ) { List consumerDependencies = new ArrayList(); for ( Dependency dependency : effectiveModel.getDependenci

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-06 Thread Robert Scholte
Yes, removing this helps. There are probably more which can now be simplfied. The plugin was actually hitting http://jira.codehaus.org/browse/MNG-5552 which is a bug IMO, but some plugins seem to depend on this bug, so it couldn't be fix yet. Robert Op Thu, 06 Mar 2014 23:04:12 +0100 schre

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-06 Thread Robert Scholte
Hi Jörg, this was still based on the previous solution. I think it can be removed, the modelBuilder should already solve this. Robert Op Thu, 06 Mar 2014 23:00:35 +0100 schreef Jörg Hohwiller : Hi Robert, I found an "unexpected exception feature" ;) I have tested consumer on a GWT pro

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-06 Thread Jörg Hohwiller
Hi Robert, I found an "unexpected exception feature" ;) I have tested consumer on a GWT project and get this exception: > Caused by: java.lang.IllegalStateException: Duplicate dependency! Original: net.sf.m-m-m:mmm-util-core:jar:sources:sources duplicate: net.sf.m-m-m:mmm-util-core:jar:sources

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-05 Thread Robert Scholte
Hi Jörg, ITs are fixed. Although this approach may seem complicated, it will be as close as possible to what Maven does. Complicated shouldn't be the issue, however correctness does. "However your changes introduced various bugs": the expected behavior wasn't covered with a test, so IMO

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-05 Thread Jörg Hohwiller
Hi Robert, I had a look at your changes. Maybe this is the right way to go by using DefaultModelBuilder. However your changes introduced various bugs: This is wrong as it copies ALL profiles to the "flattened" POM. > model.setProfiles( effectiveModel.getProfiles() ); > Activation activation = p

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-03 Thread Robert Scholte
Based on my interpretation of http://markmail.org/message/mvorlh6cg6yi3zbg I would say that Jörg wants the consumer-pom 4.0.0. The discussion about this pom started as the "effective pom". However, such pom also contains all build information, so I didn't accept this proposal. If the Apache t

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-03 Thread Stephen Connolly
The idea of the consumer/builder pom split is that the GAV coordinates remain the same. The consumer pom will actually be two poms. One modelVersion 4.0.0 for the old consumers One modelVersion 5.0.0+ for the new consumers They will both be generated from the builder pom. The builder pom will

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-03 Thread Jörg Hohwiller
Hi Robert, thanks for all your hints and ideas. I very much appreciate your support :) So I will dive further this week... Best Regards Jörg Am 01.03.2014 21:16, schrieb Robert Scholte: Hi Jörg, it seems like the DefaultProfileInjector is the class which blocks our solutions. After some d

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-03 Thread Jörg Hohwiller
Hi Stephen, Am 28.02.2014 23:59, schrieb Stephen Connolly: On 28 February 2014 22:48, Jörg Hohwiller > wrote: Am 27.02.2014 22:12, schrieb Robert Scholte: Hi Jörg, Hi Robert, I think I found the solution without the Interpolator.

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-03-01 Thread Robert Scholte
Hi Jörg, it seems like the DefaultProfileInjector is the class which blocks our solutions. After some digging I found that by tuning the ModelBuilder we get the resolution as done by Maven AND have to correct interpolation. Current code is still a bit dirty, but should show they way to go.

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-28 Thread Robert Scholte
Hi Jörg, let's both keep searching for those edge cases to see if the Interpolator is the correct solution if in fact the MavenProject does contain all the required information (maybe a bit deeper then expected probably). I'll add IT's for the groupId and artifactId with expressions. About

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-28 Thread Stephen Connolly
On 28 February 2014 22:48, Jörg Hohwiller wrote: > Am 27.02.2014 22:12, schrieb Robert Scholte: > >> Hi Jörg, >> > Hi Robert, > >> >> I think I found the solution without the Interpolator. >> I've written several IT's to confirm this. >> If there's a case which isn't coeverd, let me know. >> > Th

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-28 Thread Jörg Hohwiller
Am 27.02.2014 22:12, schrieb Robert Scholte: Hi Jörg, Hi Robert, I think I found the solution without the Interpolator. I've written several IT's to confirm this. If there's a case which isn't coeverd, let me know. There are cases where your approach does not work. You can also use variables

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-27 Thread Robert Scholte
Hi Jörg, I think I found the solution without the Interpolator. I've written several IT's to confirm this. If there's a case which isn't coeverd, let me know. First svn needs to be up again before I can commit. Robert Op Thu, 27 Feb 2014 20:44:40 +0100 schreef Jörg Hohwiller : Hi Robert,

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-27 Thread Jörg Hohwiller
Hi, I found the problem myself. I had the wrong version of "maven-project" and the method I used has actually been removed. Also Interpolator has moved to plexus-interpolation. With that I was now able to resolve the issues and ITs are now running. However, I can not commit anymore since today:

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-27 Thread Jörg Hohwiller
Hi Robert, Am 27.02.2014 18:54, schrieb Robert Scholte: "But I had to do this because otherwise I would also get the profile triggered dependencies and can not figure out their origin to filter them." Which method were you using? Initially MavenProject.getDependencies() then MavenProject.get

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-27 Thread Robert Scholte
"But I had to do this because otherwise I would also get the profile triggered dependencies and can not figure out their origin to filter them." Which method were you using? I'll add an IT for this and see if it is really required. It shouldn't be required to use the ModelInterpolator. Robert

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-26 Thread Jörg Hohwiller
Hi there, I need help from a real maven expert - see below... Am 26.02.2014 23:51, schrieb Jörg Hohwiller: Am 26.02.2014 21:08, schrieb Robert Scholte: [...] The resolve-properties now exposes a small issue: the property is not resolved. I hope you can fix that. Sure. That is coming from the

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-26 Thread Jörg Hohwiller
Am 26.02.2014 21:08, schrieb Robert Scholte: Hi Jörg, Hi Robert, I did some small modifications. I had a quick look. Awesome. Some time passed since I wrote my last MOJO and this code was a little old-fashioned. Nicer with annotations... Thanks. Most important: introduce the mock repositor

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-26 Thread Jörg Hohwiller
Am 26.02.2014 20:15, schrieb Vincent Latombe: Hi Jörg, Hi Vincent, thanks for writing this; I think it solves in a nice way the "consumer" pom issue. thanks for your feedback. Some initial remarks : - instead of consumerPomFile, I would use the generic outputDirectory to specify the dire

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-26 Thread Robert Scholte
Hi Jörg, I did some small modifications. Most important: introduce the mock repository manager. With 'mvn verify' it'll run some integration tests with a mock repo. This should help you to write fast and small tests. I've already added 2 ITs under /src/it/projects The resolve-properties now expos

Re: [mojo-dev] consumer-maven-plugin added to sandbox

2014-02-26 Thread Vincent Latombe
Hi Jörg, thanks for writing this; I think it solves in a nice way the "consumer" pom issue. Some initial remarks : - instead of consumerPomFile, I would use the generic outputDirectory to specify the directory itself, and consumerPomName to actually define the file name in this directory. I belie