repaint-io / maven-tiles

Injecting maven configurations by composition rather than inheritance
154 stars 32 forks source link

Support using a range for tile version #82

Closed udalrich closed 5 years ago

udalrich commented 6 years ago

I would like to be able to specify a range of versions for a tile, so that as the tile is improved, everything that uses it gets the updated version rather than having to find the uses and update them. This would look like

            <configuration>
                <tiles>
                    <tile>me.tile:mySuperTile:[1.0.0,2.0.0)</tile>
                </tiles>
            </configuration>

using the standard maven version range rules

rvowles commented 6 years ago

Yes? I do this all the time.

talios commented 5 years ago

On 16 Oct 2018, at 8:42, udalrich wrote:

<tile>me.tile:mySuperTile:[1.0.0,2.0.0)</tile>

That's supported out of the box - are you seeing behaviour that shows otherwise?

"The ease with which a change can be implemented has no relevance at all to whether it is the right change for the (Java) Platform for all time." — Mark Reinhold.

Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt

rbygrave commented 5 years ago
    <tile>me.tile:mySuperTile:[1.0.0,2.0.0)</tile>

Hmmm, the above range has versions that end in 0 ... (e.g. the 1.0.0 above) so this range could include SNAPSHOT's so perhaps that is the confusion in this case? If that is the confusion then an approach is to never use 1.0 or 1.0.0 or any version that ends in 0 with version ranges.

udalrich commented 5 years ago

I was certain that I tried this and it didn't work. I just tried again and it did. Maybe I did [1.0.0-2.0.0) instead, which makes some sense but is wrong.