Re: maven git commit: [FIXES MNG-5840] if the pom.xml at relativePath is the same groupId:artifactId but different version fall back to the repository for parent resolution

2015-06-05 Thread Jason van Zyl
If this is the behaviour we all agree to, and I think we do, you need to write 
an IT as well. If you have great, if you haven’t please do so. Otherwise it’s 
just potentially going to regress again.

 On Jun 5, 2015, at 6:26 AM, steph...@apache.org wrote:
 
 Repository: maven
 Updated Branches:
  refs/heads/master 5c6024219 - 40d5087b6
 
 
 [FIXES MNG-5840] if the pom.xml at relativePath is the same 
 groupId:artifactId but different version fall back to the repository for 
 parent resolution
 
 
 Project: http://git-wip-us.apache.org/repos/asf/maven/repo
 Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/40d5087b
 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/40d5087b
 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/40d5087b
 
 Branch: refs/heads/master
 Commit: 40d5087b6b134842e2b61a567dbb4bfbcfab7ae6
 Parents: 5c60242
 Author: Stephen Connolly stephen.alan.conno...@gmail.com
 Authored: Fri Jun 5 11:26:13 2015 +0100
 Committer: Stephen Connolly stephen.alan.conno...@gmail.com
 Committed: Fri Jun 5 11:26:13 2015 +0100
 
 --
 .../org/apache/maven/model/building/DefaultModelBuilder.java| 5 +
 1 file changed, 5 insertions(+)
 --
 
 
 http://git-wip-us.apache.org/repos/asf/maven/blob/40d5087b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
 --
 diff --git 
 a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
  
 b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
 index 52b3c9c..f76072e 100644
 --- 
 a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
 +++ 
 b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
 @@ -919,6 +919,11 @@ public class DefaultModelBuilder
 .setMessage( buffer.toString() ).setLocation( 
 parent.getLocation(  ) ) );
 return null;
 }
 +if ( version != null  parent.getVersion() != null  
 !version.equals( parent.getVersion() ) )
 +{
 +// version skew drop back to resolution from the repository
 +return null;
 +}
 
 //
 // Here we just need to know that a version is fine to use but this 
 validation we can do in our workspace
 

Thanks,

Jason

--
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
-

A master in the art of living draws no sharp distinction between his work and 
his play; his labor and his leisure; his mind and his body; his education and 
his recreation. He hardly knows which is which. He simply pursues his vision of 
excellence through whatever he is doing, and leaves others to determine whether 
he is working or playing. To himself, he always appears to be doing both. 

  -- François-René de Chateaubriand












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



Re: maven git commit: [FIXES MNG-5840] if the pom.xml at relativePath is the same groupId:artifactId but different version fall back to the repository for parent resolution

2015-06-05 Thread Stephen Connolly
I'll see if I can create an integration test from my test case

On 5 June 2015 at 14:27, Jason van Zyl ja...@takari.io wrote:

 If this is the behaviour we all agree to, and I think we do, you need to
 write an IT as well. If you have great, if you haven’t please do so.
 Otherwise it’s just potentially going to regress again.

  On Jun 5, 2015, at 6:26 AM, steph...@apache.org wrote:
 
  Repository: maven
  Updated Branches:
   refs/heads/master 5c6024219 - 40d5087b6
 
 
  [FIXES MNG-5840] if the pom.xml at relativePath is the same
 groupId:artifactId but different version fall back to the repository for
 parent resolution
 
 
  Project: http://git-wip-us.apache.org/repos/asf/maven/repo
  Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/40d5087b
  Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/40d5087b
  Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/40d5087b
 
  Branch: refs/heads/master
  Commit: 40d5087b6b134842e2b61a567dbb4bfbcfab7ae6
  Parents: 5c60242
  Author: Stephen Connolly stephen.alan.conno...@gmail.com
  Authored: Fri Jun 5 11:26:13 2015 +0100
  Committer: Stephen Connolly stephen.alan.conno...@gmail.com
  Committed: Fri Jun 5 11:26:13 2015 +0100
 
  --
  .../org/apache/maven/model/building/DefaultModelBuilder.java| 5 +
  1 file changed, 5 insertions(+)
  --
 
 
 
 http://git-wip-us.apache.org/repos/asf/maven/blob/40d5087b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
  --
  diff --git
 a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
 b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
  index 52b3c9c..f76072e 100644
  ---
 a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
  +++
 b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
  @@ -919,6 +919,11 @@ public class DefaultModelBuilder
  .setMessage( buffer.toString() ).setLocation(
 parent.getLocation(  ) ) );
  return null;
  }
  +if ( version != null  parent.getVersion() != null 
 !version.equals( parent.getVersion() ) )
  +{
  +// version skew drop back to resolution from the repository
  +return null;
  +}
 
  //
  // Here we just need to know that a version is fine to use but
 this validation we can do in our workspace
 

 Thanks,

 Jason

 --
 Jason van Zyl
 Founder, Takari and Apache Maven
 http://twitter.com/jvanzyl
 http://twitter.com/takari_io
 -

 A master in the art of living draws no sharp distinction between his work
 and his play; his labor and his leisure; his mind and his body; his
 education and his recreation. He hardly knows which is which. He simply
 pursues his vision of excellence through whatever he is doing, and leaves
 others to determine whether he is working or playing. To himself, he always
 appears to be doing both.

   -- François-René de Chateaubriand












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