You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Thiebaud, Christophe" <ch...@sap.com> on 2016/08/03 15:36:19 UTC

project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Hi All,



The title says it all.



Any suggestions how to overcome this issue ?



Explanation below. Let the projects be:



‘parent’ : the parent pom of the ‘lib’ library just below

‘lib’ : the library

‘app’ : the application dependent on ‘lib’ through a version range.



(all three minimalistic sample projects here: https://github.com/iroif)



[cid:image001.png@01D1EDA2.91747B70]



Here is what happens during time, when versions are bumped and projects are deployed to remote repo:



day 0



‘parent’ 0.0.1-SNAPSHOT is deployed to remote repo

‘lib’    0.0.1-SNAPSHOT is deployed to remote repo

‘app’ builds OK



day 1



‘parent’ 0.0.1-SNAPSHOT is still on remote repo

‘parent’ 0.0.2-SNAPSHOT is deployed to remote repo

‘lib’    0.0.1-SNAPSHOT is still on remote repo

‘app’ builds OK



day 2



‘parent’ 0.0.1-SNAPSHOT is still on remote repo

‘parent’ 0.0.2-SNAPSHOT is still on remote repo

‘lib’    0.0.1-SNAPSHOT is still on remote repo

‘lib’    0.0.2-SNAPSHOT is deployed to remote repo

‘app’ builds OK



day 3



‘parent’ 0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule

‘parent’ 0.0.2-SNAPSHOT is still on remote repo

‘lib’    0.0.1-SNAPSHOT is still on remote repo

‘lib’    0.0.2-SNAPSHOT is still on remote repo

‘app’ build FAILS



this is because maven tries to build the pom for ‘lib’ 0.0.1-SNAPSHOT and fails as ‘parent’ 0.0.1-SNAPSHOT is not available anymore.



However, IMHO, the build of ‘app’ should not fail as there is another valid dependency resolution : ‘lib’ 0.0.2-SNAPSHOT with ‘parent’ 0.0.2-SNAPSHOT.



In fact, when the relationship between parent and lib is a dependency (and not a parent-child relationship), the build of ‘app’ succeeds, even when transitive dependency to ‘parent’ 0.0.1-SNAPSHOT cannot be resolved.



Note that ‘app’ build is successful again, when on day 4, ‘lib’ 0.0.1-SNAPSHOT is in turn evicted:



day 4



‘parent’ 0.0.2-SNAPSHOT is still on remote repo

‘lib’    0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule

‘lib’    0.0.2-SNAPSHOT is still on remote repo

‘app’ build resumes OK



Any suggestions how to overcome this issue ?



We have builds failing every other day in our build farm for this reason.



Thanks!

Christophe

PS. The content of this mail is duplicated here : https://github.com/iroif/iroif-parent



Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Christian Schulte <cs...@schulte.it>.
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 ?

I am a bit confused about the different error message right now. When it
comes to version ranges, Aether reads all POMs of all versions it finds.
If a parent has disappeared, it will fail building that model. Is there
a way for you to purge the repository in a way not leaving broken
projects around? I think that is the real issue. You would need some
kind of index for this so that you can purge snapshots in a consistent
way. Regarding the 'DependencySelector'. There currently is no way to
change that. It's only used during initialization and I think that would
be the wrong way of doing it
<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java;h=877c27777bb4b102434aec64f4983932bcb64b5e;hb=HEAD#l104>.

Regards,
-- 
Christian


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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Fred Cooke <fr...@gmail.com>.
Got it! Thanks. The dependency without [] needs to exist, but may not end
up being used due to conflicts. Fair enough. :-)

On Sat, Aug 6, 2016 at 3:24 PM, Christian Schulte <cs...@schulte.it> wrote:

> Am 08/06/16 um 05:15 schrieb Christian Schulte:
> > It just takes the highest version the version range resolver returns and
> uses that or fails if nothing like that is available.
>
> If using version range syntax.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Christian Schulte <cs...@schulte.it>.
Am 08/06/16 um 05:15 schrieb Christian Schulte:
> It just takes the highest version the version range resolver returns and uses that or fails if nothing like that is available.

If using version range syntax.


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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Christian Schulte <cs...@schulte.it>.
Am 08/06/16 um 02:04 schrieb Fred Cooke:
> A parent, I thought, used to be equivalent to [], ie, hard requirement. A
> dependency without [] is NOT a hard requirement, simply advisory. So yeah,
> they're different, or were. I wonder what semantics the ranged parents
> behaviour has for a simple backward compatible (or not) plain version?

There shouldn't be a difference. There is no conflict resolution or
anything like that when it comes to parents. It just takes the highest
version the version range resolver returns and uses that or fails if
nothing like that is available.

Regards,
-- 
Christian


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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Fred Cooke <fr...@gmail.com>.
A parent, I thought, used to be equivalent to [], ie, hard requirement. A
dependency without [] is NOT a hard requirement, simply advisory. So yeah,
they're different, or were. I wonder what semantics the ranged parents
behaviour has for a simple backward compatible (or not) plain version?
Implicitly converted to []? In any case, you solved your issue with
something that makes sense, good.

On Sat, Aug 6, 2016 at 10:02 AM, Thiebaud, Christophe <
christophe.thiebaud@sap.com> wrote:

> Sorry, I strongly disagree, dependency is not optional.
>
> If there were not a valid, higher resolution path, the build would fail as
> well.
>
> Regards,
> Christophe
>
> -----Original Message-----
> From: Christian Schulte [mailto:cs@schulte.it]
> Sent: Freitag, 5. August 2016 16:33
> To: Maven Developers List <de...@maven.apache.org>
> Subject: Re: project having a dependency with a version range fails
> building when parent pom of dependency is evicted from remote repo
>
> Am 08/05/16 um 16:10 schrieb Thiebaud, Christophe:
> > ... oh ... I was 200% sure that parent did not allow a version range ...
>
> Introduced in Maven 3.2.2. Broken since a few releases. Fixed in
> 3.4.0-SNAPSHOT.
>
> >
> > 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 ?
>
> Issue is the repository being in an inconsistent state. It would not
> have been possible to deploy lib-1.0-SNAPSHOT without its parent being
> available in the repository.
>
> > 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.
>
> What exactly do you mean with "failing as well"? There is a difference
> between not finding a dependency and not finding a parent. The first is
> comparable to an "optional file not found" whereas the parent is nothing
> optional.
>
> Regards,
> --
> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

RE: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
Sorry, I strongly disagree, dependency is not optional. 

If there were not a valid, higher resolution path, the build would fail as well.

Regards,
Christophe

-----Original Message-----
From: Christian Schulte [mailto:cs@schulte.it] 
Sent: Freitag, 5. August 2016 16:33
To: Maven Developers List <de...@maven.apache.org>
Subject: Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Am 08/05/16 um 16:10 schrieb Thiebaud, Christophe:
> ... oh ... I was 200% sure that parent did not allow a version range ...

Introduced in Maven 3.2.2. Broken since a few releases. Fixed in
3.4.0-SNAPSHOT.

> 
> 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 ?

Issue is the repository being in an inconsistent state. It would not
have been possible to deploy lib-1.0-SNAPSHOT without its parent being
available in the repository.

> 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.

What exactly do you mean with "failing as well"? There is a difference
between not finding a dependency and not finding a parent. The first is
comparable to an "optional file not found" whereas the parent is nothing
optional.

Regards,
-- 
Christian


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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Christian Schulte <cs...@schulte.it>.
Am 08/05/16 um 16:10 schrieb Thiebaud, Christophe:
> ... oh ... I was 200% sure that parent did not allow a version range ...

Introduced in Maven 3.2.2. Broken since a few releases. Fixed in
3.4.0-SNAPSHOT.

> 
> 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 ?

Issue is the repository being in an inconsistent state. It would not
have been possible to deploy lib-1.0-SNAPSHOT without its parent being
available in the repository.

> 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.

What exactly do you mean with "failing as well"? There is a difference
between not finding a dependency and not finding a parent. The first is
comparable to an "optional file not found" whereas the parent is nothing
optional.

Regards,
-- 
Christian


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


RE: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
... 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:cs@schulte.it] 
Sent: Freitag, 5. August 2016 14:32
To: Maven Developers List <de...@maven.apache.org>
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:christophe.thiebaud@sap.com] 
> Sent: Donnerstag, 4. August 2016 16:03
> To: Maven Developers List <de...@maven.apache.org>
> Cc: Schmoigl, Dominic <do...@sap.com>; Holl, Marcus <ma...@sap.com>
> 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:cs@schulte.it] 
> Sent: Donnerstag, 4. August 2016 13:00
> To: Maven Developers List <de...@maven.apache.org>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Christian Schulte <cs...@schulte.it>.
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:christophe.thiebaud@sap.com] 
> Sent: Donnerstag, 4. August 2016 16:03
> To: Maven Developers List <de...@maven.apache.org>
> Cc: Schmoigl, Dominic <do...@sap.com>; Holl, Marcus <ma...@sap.com>
> 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:cs@schulte.it] 
> Sent: Donnerstag, 4. August 2016 13:00
> To: Maven Developers List <de...@maven.apache.org>
> 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 \u2018app\u2019 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
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:christophe.thiebaud@sap.com] 
Sent: Donnerstag, 4. August 2016 16:03
To: Maven Developers List <de...@maven.apache.org>
Cc: Schmoigl, Dominic <do...@sap.com>; Holl, Marcus <ma...@sap.com>
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:cs@schulte.it] 
Sent: Donnerstag, 4. August 2016 13:00
To: Maven Developers List <de...@maven.apache.org>
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,
-- 
Christian


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

B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�]�][��X��ܚX�PX]�[��\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�]�Z[X]�[��\X�K�ܙ�B�

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


RE: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
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:cs@schulte.it] 
Sent: Donnerstag, 4. August 2016 13:00
To: Maven Developers List <de...@maven.apache.org>
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,
-- 
Christian


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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Christian Schulte <cs...@schulte.it>.
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 \u2018app\u2019 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,
-- 
Christian


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


RE: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
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.

Christophe

-----Original Message-----
From: Fred Cooke [mailto:fred.cooke@gmail.com] 
Sent: Donnerstag, 4. August 2016 01:09
To: Maven Developers List <de...@maven.apache.org>
Subject: Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

I'm surprised the transitive dependency to that parent succeeds, unless
it's ranged.

For the others, in order to determine the dependency tree, and thus any
transitive dependencies, and so on, the entire pom needs to be present. A
parent is part of that. If the parent is of a fixed version (all that's
currently supported IIRC) and not present, then it should fail otherwise
it's going to produce something potentially quite different to what the
developer intended (or accidentally indicated that they intended).

I'm wondering what SNAPSHOTs are doing in a remote, but I know some people
operate that way. I wouldn't/don't.

Another thing I wouldn't do is stick dependencies in a parent, period. Or
use a snapshot parent, ever.

Interested to read what the gurus come back with, though :-)

Regards,

Fred.

On Thu, Aug 4, 2016 at 3:36 AM, Thiebaud, Christophe <
christophe.thiebaud@sap.com> wrote:

> Hi All,
>
>
>
> The title says it all.
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> Explanation below. Let the projects be:
>
>
>
> ‘parent’ : the parent pom of the ‘lib’ library just below
>
> ‘lib’ : the library
>
> ‘app’ : the application dependent on ‘lib’ through a version range.
>
>
>
> (all three minimalistic sample projects here: https://github.com/iroif)
>
>
>
>
>
> Here is what happens during time, when versions are bumped and projects
> are deployed to remote repo:
>
>
>
> day 0
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is deployed to remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is deployed to remote repo
>
> ‘app’ builds OK
>
>
>
> day 1
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is still on remote repo
>
> ‘parent’ 0.0.2-SNAPSHOT is deployed to remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘app’ builds OK
>
>
>
> day 2
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is still on remote repo
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.2-SNAPSHOT is deployed to remote repo
>
> ‘app’ builds OK
>
>
>
> day 3
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is automatically evicted from remote repo by some
> rule
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.2-SNAPSHOT is still on remote repo
>
> *‘app’ build FAILS*
>
>
>
> this is because maven tries to build the pom for ‘lib’ 0.0.1-SNAPSHOT and
> fails as ‘parent’ 0.0.1-SNAPSHOT is not available anymore.
>
>
>
> However, IMHO, the build of ‘app’ should not fail as there is another
> valid dependency resolution : ‘lib’ 0.0.2-SNAPSHOT with ‘parent’
> 0.0.2-SNAPSHOT.
>
>
>
> In fact, when the relationship between parent and lib is a dependency (and
> not a parent-child relationship), the build of ‘app’ succeeds, even when
> transitive dependency to ‘parent’ 0.0.1-SNAPSHOT cannot be resolved.
>
>
>
> Note that ‘app’ build is successful again, when on day 4, ‘lib’
> 0.0.1-SNAPSHOT is in turn evicted:
>
>
>
> day 4
>
>
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is automatically evicted from remote repo by some
> rule
>
> ‘lib’    0.0.2-SNAPSHOT is still on remote repo
>
> *‘app’ build resumes OK*
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> We have builds failing every other day in our build farm for this reason.
>
>
>
> Thanks!
>
> Christophe
>
> PS. The content of this mail is duplicated here :
> https://github.com/iroif/iroif-parent
>
>
>

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


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Fred Cooke <fr...@gmail.com>.
I'm surprised the transitive dependency to that parent succeeds, unless
it's ranged.

For the others, in order to determine the dependency tree, and thus any
transitive dependencies, and so on, the entire pom needs to be present. A
parent is part of that. If the parent is of a fixed version (all that's
currently supported IIRC) and not present, then it should fail otherwise
it's going to produce something potentially quite different to what the
developer intended (or accidentally indicated that they intended).

I'm wondering what SNAPSHOTs are doing in a remote, but I know some people
operate that way. I wouldn't/don't.

Another thing I wouldn't do is stick dependencies in a parent, period. Or
use a snapshot parent, ever.

Interested to read what the gurus come back with, though :-)

Regards,

Fred.

On Thu, Aug 4, 2016 at 3:36 AM, Thiebaud, Christophe <
christophe.thiebaud@sap.com> wrote:

> Hi All,
>
>
>
> The title says it all.
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> Explanation below. Let the projects be:
>
>
>
> ‘parent’ : the parent pom of the ‘lib’ library just below
>
> ‘lib’ : the library
>
> ‘app’ : the application dependent on ‘lib’ through a version range.
>
>
>
> (all three minimalistic sample projects here: https://github.com/iroif)
>
>
>
>
>
> Here is what happens during time, when versions are bumped and projects
> are deployed to remote repo:
>
>
>
> day 0
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is deployed to remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is deployed to remote repo
>
> ‘app’ builds OK
>
>
>
> day 1
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is still on remote repo
>
> ‘parent’ 0.0.2-SNAPSHOT is deployed to remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘app’ builds OK
>
>
>
> day 2
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is still on remote repo
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.2-SNAPSHOT is deployed to remote repo
>
> ‘app’ builds OK
>
>
>
> day 3
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is automatically evicted from remote repo by some
> rule
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.2-SNAPSHOT is still on remote repo
>
> *‘app’ build FAILS*
>
>
>
> this is because maven tries to build the pom for ‘lib’ 0.0.1-SNAPSHOT and
> fails as ‘parent’ 0.0.1-SNAPSHOT is not available anymore.
>
>
>
> However, IMHO, the build of ‘app’ should not fail as there is another
> valid dependency resolution : ‘lib’ 0.0.2-SNAPSHOT with ‘parent’
> 0.0.2-SNAPSHOT.
>
>
>
> In fact, when the relationship between parent and lib is a dependency (and
> not a parent-child relationship), the build of ‘app’ succeeds, even when
> transitive dependency to ‘parent’ 0.0.1-SNAPSHOT cannot be resolved.
>
>
>
> Note that ‘app’ build is successful again, when on day 4, ‘lib’
> 0.0.1-SNAPSHOT is in turn evicted:
>
>
>
> day 4
>
>
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is automatically evicted from remote repo by some
> rule
>
> ‘lib’    0.0.2-SNAPSHOT is still on remote repo
>
> *‘app’ build resumes OK*
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> We have builds failing every other day in our build farm for this reason.
>
>
>
> Thanks!
>
> Christophe
>
> PS. The content of this mail is duplicated here :
> https://github.com/iroif/iroif-parent
>
>
>

RE: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
Hi Karl, 

Thanks for the quick answer.

Our build farm uses maven 3.0.4, but the issue is reproducible with maven 3.3.9

The projects are three independent projects, no multi-module build. There are three teams, each responsible for one project, with independent release cycles.

'parent' -> infrastructure team
'lib' -> common utilities used by many apps
'app' -> a dedicated application

To reproduce the issue, git clone all three mini projects from https://github.com/iroif
git clone https://github.com/iroif/iroif-parent.git 
git clone https://github.com/iroif/iroif-lib.git 
git clone https://github.com/iroif/iroif-app.git 

the remote repo used in these samples is a basic local installation of nexus (2.11.4-01) at http://localhost:1082/nexus
(see https://github.com/iroif/iroif-parent/blob/master/settings.xml  and https://github.com/iroif/iroif-parent/blob/master/pom.xml )

day 0

pushd iroif-parent
git checkout 86fd6835
mvn clean deploy -s settings.xml -Dmaven.repo.local=/c/tmp/iroif-parent
popd 
pushd iroif-lib
git checkout 99d25e0a
mvn clean deploy -s ../iroif-parent/settings.xml -Dmaven.repo.local=/c/tmp/iroif-lib
popd
pushd iroif-app
git checkout bda76f8a
mvn clean install -s ../iroif-parent/settings.xml -Dmaven.repo.local=/c/tmp/iroif-app
-> [INFO] BUILD SUCCESS
popd

day 1
pushd iroif-parent
git checkout cb15c025
mvn clean deploy -s settings.xml -Dmaven.repo.local=/c/tmp/iroif-parent
popd
(all other builds OK)

day 2
pushd iroif-lib
git checkout 3fde3a44
mvn clean deploy -s ../iroif-parent/settings.xml -Dmaven.repo.local=/c/tmp/iroif-lib
popd

at this day, iroif-app dependency to iroif-lib [0.0.1-SNAPSHOT,) version range is resolved to 0.0.2-SNAPSHOT :
pushd iroif-parent
mvn dependency:tree -s ../iroif-parent/settings.xml  -Dmaven.repo.local=/c/tmp/iroif-app
returns
[INFO] net.aequologica.iroif:iroif-app:jar:0.1.0-SNAPSHOT
[INFO] \- net.aequologica.iroif:iroif-lib:jar:0.0.2-SNAPSHOT:compile

day 3

iroif-parent 0.0.1-SNAPSHOT is deleted from Snapshots repo in nexus, + 'Expire Cache' + 'Rebuild Metadata' + 'Update Index'

then (starting with a brand new local repo, iroif-app-2)

pushd iroif-app
git checkout bda76f8a
mvn clean install -s ../iroif-parent/settings.xml -Dmaven.repo.local=/c/tmp/iroif-app-2

BUILD FAILURE

[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/)

mvn dependency:tree fails as well, of course

day 4

iroif-lib 0.0.1-SNAPSHOT is deleted from Snapshots repo in nexus, + 'Expire Cache' + 'Rebuild Metadata' + 'Update Index'

then (starting with a brand new local repo, iroif-app-3)

pushd iroif-app
git checkout bda76f8a
mvn clean install -s ../iroif-parent/settings.xml -Dmaven.repo.local=/c/tmp/iroif-app-3

BUILD SUCCESS

Sorry for the load of details, hope that helps.

Thanks
Christophe

-----Original Message-----
From: Karl Heinz Marbaise [mailto:khmarbaise@gmx.de] 
Sent: Mittwoch, 3. August 2016 20:17
To: Maven Users List <us...@maven.apache.org>
Subject: Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Hi,

how are you calling Maven? And which version of Maven do you use?

Furthermore I've got the impressions that those modules belong together ?

Kind regards
Karl Heinz

On 8/3/16 8:10 PM, Thiebaud, Christophe wrote:
> Hi All,
>
>
>
> The title says it all.
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> Explanation below. Let the projects be:
>
>
>
> ‘parent’ : the parent pom of the ‘lib’ library just below
>
> ‘lib’ : the library
>
> ‘app’ : the application dependent on ‘lib’ through a version range.
>
>
>
> (all three minimalistic sample projects here: https://github.com/iroif)
>
>
>
> [cid:image001.png@01D1EDA2.91747B70]
>
>
>
> Here is what happens during time, when versions are bumped and projects are deployed to remote repo:
>
>
>
> day 0
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is deployed to remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is deployed to remote repo
>
> ‘app’ builds OK
>
>
>
> day 1
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is still on remote repo
>
> ‘parent’ 0.0.2-SNAPSHOT is deployed to remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘app’ builds OK
>
>
>
> day 2
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is still on remote repo
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.2-SNAPSHOT is deployed to remote repo
>
> ‘app’ builds OK
>
>
>
> day 3
>
>
>
> ‘parent’ 0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.2-SNAPSHOT is still on remote repo
>
> ‘app’ build FAILS
>
>
>
> this is because maven tries to build the pom for ‘lib’ 0.0.1-SNAPSHOT and fails as ‘parent’ 0.0.1-SNAPSHOT is not available anymore.
>
>
>
> However, IMHO, the build of ‘app’ should not fail as there is another valid dependency resolution : ‘lib’ 0.0.2-SNAPSHOT with ‘parent’ 0.0.2-SNAPSHOT.
>
>
>
> In fact, when the relationship between parent and lib is a dependency (and not a parent-child relationship), the build of ‘app’ succeeds, even when transitive dependency to ‘parent’ 0.0.1-SNAPSHOT cannot be resolved.
>
>
>
> Note that ‘app’ build is successful again, when on day 4, ‘lib’ 0.0.1-SNAPSHOT is in turn evicted:
>
>
>
> day 4
>
>
>
> ‘parent’ 0.0.2-SNAPSHOT is still on remote repo
>
> ‘lib’    0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule
>
> ‘lib’    0.0.2-SNAPSHOT is still on remote repo
>
> ‘app’ build resumes OK
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> We have builds failing every other day in our build farm for this reason.
>
>
>
> Thanks!
>
> Christophe
>
> PS. The content of this mail is duplicated here : https://github.com/iroif/iroif-parent
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

how are you calling Maven? And which version of Maven do you use?

Furthermore I've got the impressions that those modules belong together ?

Kind regards
Karl Heinz

On 8/3/16 8:10 PM, Thiebaud, Christophe wrote:
> Hi All,
>
>
>
> The title says it all.
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> Explanation below. Let the projects be:
>
>
>
> \u2018parent\u2019 : the parent pom of the \u2018lib\u2019 library just below
>
> \u2018lib\u2019 : the library
>
> \u2018app\u2019 : the application dependent on \u2018lib\u2019 through a version range.
>
>
>
> (all three minimalistic sample projects here: https://github.com/iroif)
>
>
>
> [cid:image001.png@01D1EDA2.91747B70]
>
>
>
> Here is what happens during time, when versions are bumped and projects are deployed to remote repo:
>
>
>
> day 0
>
>
>
> \u2018parent\u2019 0.0.1-SNAPSHOT is deployed to remote repo
>
> \u2018lib\u2019    0.0.1-SNAPSHOT is deployed to remote repo
>
> \u2018app\u2019 builds OK
>
>
>
> day 1
>
>
>
> \u2018parent\u2019 0.0.1-SNAPSHOT is still on remote repo
>
> \u2018parent\u2019 0.0.2-SNAPSHOT is deployed to remote repo
>
> \u2018lib\u2019    0.0.1-SNAPSHOT is still on remote repo
>
> \u2018app\u2019 builds OK
>
>
>
> day 2
>
>
>
> \u2018parent\u2019 0.0.1-SNAPSHOT is still on remote repo
>
> \u2018parent\u2019 0.0.2-SNAPSHOT is still on remote repo
>
> \u2018lib\u2019    0.0.1-SNAPSHOT is still on remote repo
>
> \u2018lib\u2019    0.0.2-SNAPSHOT is deployed to remote repo
>
> \u2018app\u2019 builds OK
>
>
>
> day 3
>
>
>
> \u2018parent\u2019 0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule
>
> \u2018parent\u2019 0.0.2-SNAPSHOT is still on remote repo
>
> \u2018lib\u2019    0.0.1-SNAPSHOT is still on remote repo
>
> \u2018lib\u2019    0.0.2-SNAPSHOT is still on remote repo
>
> \u2018app\u2019 build FAILS
>
>
>
> this is because maven tries to build the pom for \u2018lib\u2019 0.0.1-SNAPSHOT and fails as \u2018parent\u2019 0.0.1-SNAPSHOT is not available anymore.
>
>
>
> However, IMHO, the build of \u2018app\u2019 should not fail as there is another valid dependency resolution : \u2018lib\u2019 0.0.2-SNAPSHOT with \u2018parent\u2019 0.0.2-SNAPSHOT.
>
>
>
> In fact, when the relationship between parent and lib is a dependency (and not a parent-child relationship), the build of \u2018app\u2019 succeeds, even when transitive dependency to \u2018parent\u2019 0.0.1-SNAPSHOT cannot be resolved.
>
>
>
> Note that \u2018app\u2019 build is successful again, when on day 4, \u2018lib\u2019 0.0.1-SNAPSHOT is in turn evicted:
>
>
>
> day 4
>
>
>
> \u2018parent\u2019 0.0.2-SNAPSHOT is still on remote repo
>
> \u2018lib\u2019    0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule
>
> \u2018lib\u2019    0.0.2-SNAPSHOT is still on remote repo
>
> \u2018app\u2019 build resumes OK
>
>
>
> Any suggestions how to overcome this issue ?
>
>
>
> We have builds failing every other day in our build farm for this reason.
>
>
>
> Thanks!
>
> Christophe
>
> PS. The content of this mail is duplicated here : https://github.com/iroif/iroif-parent
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


project having a dependency with a version range fails building when parent pom of dependency is evicted from remote repo

Posted by "Thiebaud, Christophe" <ch...@sap.com>.
Hi All,



The title says it all.



Any suggestions how to overcome this issue ?



Explanation below. Let the projects be:



‘parent’ : the parent pom of the ‘lib’ library just below

‘lib’ : the library

‘app’ : the application dependent on ‘lib’ through a version range.



(all three minimalistic sample projects here: https://github.com/iroif)



[cid:image001.png@01D1EDA2.91747B70]



Here is what happens during time, when versions are bumped and projects are deployed to remote repo:



day 0



‘parent’ 0.0.1-SNAPSHOT is deployed to remote repo

‘lib’    0.0.1-SNAPSHOT is deployed to remote repo

‘app’ builds OK



day 1



‘parent’ 0.0.1-SNAPSHOT is still on remote repo

‘parent’ 0.0.2-SNAPSHOT is deployed to remote repo

‘lib’    0.0.1-SNAPSHOT is still on remote repo

‘app’ builds OK



day 2



‘parent’ 0.0.1-SNAPSHOT is still on remote repo

‘parent’ 0.0.2-SNAPSHOT is still on remote repo

‘lib’    0.0.1-SNAPSHOT is still on remote repo

‘lib’    0.0.2-SNAPSHOT is deployed to remote repo

‘app’ builds OK



day 3



‘parent’ 0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule

‘parent’ 0.0.2-SNAPSHOT is still on remote repo

‘lib’    0.0.1-SNAPSHOT is still on remote repo

‘lib’    0.0.2-SNAPSHOT is still on remote repo

‘app’ build FAILS



this is because maven tries to build the pom for ‘lib’ 0.0.1-SNAPSHOT and fails as ‘parent’ 0.0.1-SNAPSHOT is not available anymore.



However, IMHO, the build of ‘app’ should not fail as there is another valid dependency resolution : ‘lib’ 0.0.2-SNAPSHOT with ‘parent’ 0.0.2-SNAPSHOT.



In fact, when the relationship between parent and lib is a dependency (and not a parent-child relationship), the build of ‘app’ succeeds, even when transitive dependency to ‘parent’ 0.0.1-SNAPSHOT cannot be resolved.



Note that ‘app’ build is successful again, when on day 4, ‘lib’ 0.0.1-SNAPSHOT is in turn evicted:



day 4



‘parent’ 0.0.2-SNAPSHOT is still on remote repo

‘lib’    0.0.1-SNAPSHOT is automatically evicted from remote repo by some rule

‘lib’    0.0.2-SNAPSHOT is still on remote repo

‘app’ build resumes OK



Any suggestions how to overcome this issue ?



We have builds failing every other day in our build farm for this reason.



Thanks!

Christophe

PS. The content of this mail is duplicated here : https://github.com/iroif/iroif-parent