... oh ... I was 200% sure that parent did not allow a version range ...

I tried, -> BUILD SUCCESS.

Hourah, and thanks.

Let see now if this option is ok with our developers.

In any case, don't you think there is some valid reason to fill a jira entry ?

I mean, iterating over a set of possible resolutions should not fail if one of 
the set fails, but if no acceptable resolution is found at the end, no ?

In fact, this is what happen when the (failing) parent relationship is replaced 
with a (failing as well) dependency relationship.

I understand that the root cause is that failing to build the pom is considered 
an error that stops the whole process, 
whereas failing to resolve a transitive dependency just marks this particular 
resolution path as unacceptable, and continue the search.

IMHO, the behavior should not depend on the type of relationship (parent vs.  
dependency).
behavior should be the same in both cases, and I vote for continuing the 
version range resolution until the end.

Thanks!
Christophe


-----Original Message-----
From: Christian Schulte [mailto:[email protected]] 
Sent: Freitag, 5. August 2016 14:32
To: Maven Developers List <[email protected]>
Subject: Re: project having a dependency with a version range fails building 
when parent pom of dependency is evicted from remote repo

You maybe also could overcome this by using parent version ranges.

Am 08/05/16 um 13:27 schrieb Thiebaud, Christophe:
> Reading Aether documentation : 
> 
> https://wiki.eclipse.org/Aether/Transitive_Dependency_Resolution
> 
> looks that aether has been thought to manage this kind of issue:
> 
> « For each direct dependency, a dependency selector is given a chance to 
> exclude the dependency from the graph »
> 
> Any hint if and how it is possible to configure aether to ignore 'lib' 
> 0.0.1-SNAPSHOT when resolving the version range ?
> 
> Thanks
> Christophe
> 
> -----Original Message-----
> From: Thiebaud, Christophe [mailto:[email protected]] 
> Sent: Donnerstag, 4. August 2016 16:03
> To: Maven Developers List <[email protected]>
> Cc: Schmoigl, Dominic <[email protected]>; Holl, Marcus 
> <[email protected]>
> Subject: RE: project having a dependency with a version range fails building 
> when parent pom of dependency is evicted from remote repo
> 
> Hi Christian,
> 
> Thanks for the hint to try  maven 3.4.0-SNAPSHOT
> 
> I tried, and the result is again BUILD FAILURE - but with a nice colored 
> system out, and - more seriously - a different, and IMHO misleading, error 
> message.
> 
> (Cf. full reproducible commands at 
> https://github.com/iroif/iroif-parent/blob/master/README.md  , starting below 
> " To reproduce the issue")
> 
> ---------------------------
> maven 3.4.0-SNAPSHOT
> 
> $ mvn clean install -s ../iroif-parent/settings.xml 
> -Dmaven.repo.local=/c/tmp/iroif-app-xxx
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 2.075 s
> [INFO] Finished at: 2016-08-04T15:37:25+02:00
> [INFO] Final Memory: 26M/456M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project iroif-app: Could not resolve 
> dependencies for project net.aequologica.iroif:iroif-app:jar:0.1.0-SNAPSHOT: 
> Could not find artifact net.aequologica.iroif:iroif-lib:jar:0.0.2-SNAPSHOT -> 
> [Help 1]
> [ERROR]
> 
> -----------------
> maven 3.3.9
> 
> $ mvn clean install -s ../iroif-parent/settings.xml 
> -Dmaven.repo.local=/c/tmp/iroif-app-yyy
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 1.810 s
> [INFO] Finished at: 2016-08-04T16:01:14+02:00
> [INFO] Final Memory: 21M/289M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project iroif-app: Could not resolve 
> dependencies for project net.aequologica.iroif:iroif-app:jar:0.1.0-SNAPSHOT: 
> Failed to collect dependencies at 
> net.aequologica.iroif:iroif-lib:jar:0.0.1-SNAPSHOT: Failed to read artifact 
> descriptor for net.aequologica.iroif:iroif-lib:jar:0.0.1-SNAPSHOT: Could not 
> find artifact net.aequologica.iroif:iroif-parent:pom:0.0.1-SNAPSHOT in 
> local_nexus (http://localhost:1082/nexus/content/groups/public/) -> [Help 1]
> [ERROR]
> 
> Also, the -U (--update snapshots) parameter makes no difference, as a new, 
> fresh local repo is created for each command of the scripts to reproduce the 
> issue.
> 
> Thanks
> Christophe
> 
> -----Original Message-----
> From: Christian Schulte [mailto:[email protected]] 
> Sent: Donnerstag, 4. August 2016 13:00
> To: Maven Developers List <[email protected]>
> Subject: Re: project having a dependency with a version range fails building 
> when parent pom of dependency is evicted from remote repo
> 
> Am 08/04/16 um 12:36 schrieb Thiebaud, Christophe:
>> I understand that pom file of lib 0.0.1-SNAPSHOT dependency cannot be built 
>> because of missing (evicted) parent 0.0.1-SNAPSHOT.
>>
>> The point is that failing to build lib 0.0.1-SNAPSHOT pom file should not 
>> result in a app failed build, as there exists another valid lib 
>> 0.0.2-SNAPSHOT (having parent 0.0.2-SNAPSHOT) that abides to the app-to-lib 
>> version range.
>>
>> Note that when the relationship between parent and lib is a dependency 
>> relationship (instead of a parent relationship, as in the failing case), the 
>> build of ‘app’ correctly succeeds, as there exists another valid lib 
>> 0.0.2-SNAPSHOT (dependent on parent 0.0.2-SNAPSHOT) in the version range.
> 
> Does the issue go away using a current Maven snapshot (3.4.0-SNAPSHOT)?
> Already tried if '-U,--update-snapshots' changes the situation?
> 
> <https://builds.apache.org/view/All/job/maven-3.x/>
> 
> Regards,
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to