Giter Site home page Giter Site logo

Comments (4)

jmesnil avatar jmesnil commented on August 28, 2024

I think the code is correct but the Javadoc needs to be updated.

When a channel requires multiple channels that defines different version of the same artifact, it is correct to use the latest one.

Your required-channel-1 defines org.foo:bar:1.2.0.Final and your required-channel-2 defines org.foo:bar:2.0.0.Final.
If you ends up using 1.2.0.Final, you are breaking the code that needs 2.0.0.Final.

We should change the doc to:

The channels will be searched for a stream that matches the groupId/artifactId of the artifact.

Channels are searched in their listed orders.
If a channel directly defines a stream that matches the groupId/artifactId of the artifact, the version will be resolved from this stream.
If a channel requires other channels, the latest version from its required channels will be used.

wdyt?

from wildfly-channel.

vsalbaba avatar vsalbaba commented on August 28, 2024

I think that when we are using the latest, we do not have to specify in which order the requried channels will be searched. They can be searched in any order and it should not change the result.

I propose

The channel will be searched for a stream that matches the `groupId`/`artifactId` of the artifact.

If the channel directly defines a stream that matches the groupId/artifactId of the artifact, the version will be resolved from this stream.

If the channel does not directly define a stream, required channels will be searched and the latest version of the stream found will be used.

What I'm trying to say, that the main channel always overrides the required channels.

from wildfly-channel.

vsalbaba avatar vsalbaba commented on August 28, 2024

I've updated the #80 MR

from wildfly-channel.

jmesnil avatar jmesnil commented on August 28, 2024

Channels are searched in their listed orders.

This sentence must stay. It's not about "required channels" order, it's about "channels" order (because you can multiple channels).

The order of the channels is significant (when you specify multiple channels).
The order of required channels inside a channel is not significant (we will take the latest version).

In order to find the stream corresponding to the Maven artifact, the channels are searched starting
with the first channel in the list and into their respective required channels.
If the channel directly defines a stream that matches the groupId/artifactId, the version will be resolved from this stream.
If the channel does not directly define a stream, required channels will be searched and the latest version of the stream found will be used.

from wildfly-channel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.