[ 
https://issues.apache.org/jira/browse/MNG-6087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15474447#comment-15474447
 ] 

John Chesshir commented on MNG-6087:
------------------------------------

Karl,
First, thank you for looking at this.

>  cause in Maven and in a repository releases have to be immutable...if this 
> is not the case the whole contract will fail...

Perhaps that is so technically, but I think I can safely say this is not 
practical.  Disk space on internal repositories must be closely monitored, and 
releases that are beyond a support window must be identified and removed.  
(Perhaps you could argue that SNAPSHOTS should be used more to prevent this, 
which would be a valid point, but I'm not sure I can sell that to every 
employer I know.)

I don't see why the whole contract should be contingent on the MINIMUM version 
being available when another version exists within the range.  I think the 
ability to use dependency (or even Parent) version ranges to keep the contract 
valid would be of great value.  After all, they are used to automatically bring 
on an upgrade within a specific range.  Why should that fail to work just 
because a previous version either doesn't or perhaps never did exist?

For example, why can't one use (2.0.5,] when the first version within that 
range that was EVER released was 2.0.5-56?

> Version ranges stop build if minimum version is not available
> -------------------------------------------------------------
>
>                 Key: MNG-6087
>                 URL: https://issues.apache.org/jira/browse/MNG-6087
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.5
>            Reporter: John Chesshir
>
> When I run for example 'mvn package', there's a dependency that cannot be 
> resolved during Maven's pom.xml evaluation faze; This is a mockup of the part 
> of the pom that causes the problem:
> {code:xml}
> <dependency>
>   <groupId>com.project</groupId>
>   <artifactId>artifact</artifactId>
>   <version>[2.1.3-270,)</version>
> </dependency>
> {code}
> This results in the following error issued by Maven:
> Failed to execute goal on project MyProject: Could not resolve dependencies 
> for project com.myproject:mymodule:jar:1.3.9-240: Could not find artifact 
> com.project:artifact:jar:2.1.3-270 in myRepo 
> (http://myrepo.local:7392/artifactory/repo)
> If I browse the Artifactory repository 
> http://myrepo.local:7392/artifactory/repo, there are several versions of 
> com.myproject:mymodule jars present. However, the owners of that artifact 
> have set up their CI to only keep a rolling snapshot, and version 2.1.3-270 
> is no longer available.
> We are using Maven 3.2.5. It seems that Maven should not require any of the 
> named versions in a version range to actually be present before it can see 
> whether any versions exist that do fit in the range. We only want to have to 
> update our minimum version when there is a breaking change that we have to 
> address, not just when the publishers decide to remove the minimum version 
> from availability.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to