Hi Dale,

cool thing if you have a problem in the back of your mind … you tend to come up 
with solutions when you don’t expect them ;-)
Guess the problems we were having was due to the order in which maven 
initializes things. In this case I think inheritance is done before overriding. 
So, if the property is not defined in the pom itself, the overriding doesn’t 
seem to have an effect. I therefore pulled the version definition for all 
Edgent libs up to the parent and removed the version specifications from the 
children. Now all seems to be working nicely. Please check out my pull request.

Chris

Am 22.11.17, 23:31 schrieb "Dale LaBossiere" <dml.apa...@gmail.com>:

    Lower priority than resuming/pushing out the release IMO :-)
    The workaround is tolerable if it ends up as is.
    
    > On Nov 22, 2017, at 12:38 PM, Christofer Dutz <christofer.d...@c-ware.de> 
wrote:
    > 
    > Hi Dale,
    > 
    > I’ll look into this problem … there must be something else wrong cause 
that’s the exact same way it should work … but I’ll only manage to do that 
tomorrow.
    > 
    > Chris
    > 
    > 
    > 
    > Am 22.11.17, 18:31 schrieb "Dale LaBossiere" <dml.apa...@gmail.com>:
    > 
    >    I can’t “explain" the mvn behavior :-)  But you can observe the result 
yourself:
    > 
    >    - get the latest sample repo code on the develop branch
    >    - ./mvnw clean package   # expect to fail because the pom is trying to 
use runtime version 1.2.0
    >    - ./mvnw clean package -Dedgent.runtime.version=1.2.0-SNAPSHOT
    >           sample utils builds fine (using runtime 1.2.0-SNAPSHOT versions)
    >           samples apps then fails due to dependency confusion caused by 
property override behavior (trying to use 1.2.0):
    > 
    >    ...
    >    [ERROR]   Path to dependency:
    >    [ERROR]         1) 
org.apache.edgent:edgent-samples-apps:jar:1.2.0-SNAPSHOT
    >    [ERROR]         2) 
org.apache.edgent:edgent-samples-utils:jar:1.2.0-SNAPSHOT
    >    [ERROR]         3) org.apache.edgent:edgent-utils-metrics:jar:1.2.0    
  <=== say what?
    > 
    >    All works fine if instead the edgent.runtime.version property in the 
top-level pom is edited to specify 1.2.0-SNAPSHOT
    > 
    >> On Nov 22, 2017, at 12:21 PM, Christofer Dutz 
<christofer.d...@c-ware.de> wrote:
    >> 
    >> Hi Dale,
    >> 
    >> Öhm … could you explain why? Usually –D property values have the highest 
priority.
    >> 
    >> Chris
    >> 
    >> Am 22.11.17, 18:04 schrieb "Dale LaBossiere" <dml.apa...@gmail.com>:
    >> 
    >> 
    >>> On Nov 21, 2017, at 5:10 PM, Dale LaBossiere <dml.apa...@gmail.com> 
wrote:
    >>> Prior to that time, when building the samples, one can do
    >>>   ./mvnw clean package -Dedgent.runtime.version=1.2.0-SNAPSHOT  # 
assuming you’ve done an “install” of that runtime version
    >> 
    >>   arrg… due to maven-isms, overriding via -D doesn’t work.  You must 
edit the value in the sample’s top-level pom.
    >>   I’ve updated the samples doc accordingly.
    >> 
    >>   — Dale
    >> 
    >> 
    >> 
    > 
    > 
    > 
    
    

Reply via email to