Carlos Sanchez wrote:
On 12/19/06, Kenney Westerhof <[EMAIL PROTECTED]> wrote:
> Whatever parser/validation code you write will need to be used in all
> tooling, like any IDE pom editor, pom converters,... you may say
> that's fine but think that tools could also be implemented in other
> languages.
I don't see why that's necessary - ArtifactVersion implementations are
only used to resolve
version conflicts, limit ranges, and other stuff only necessary when
running Maven.
You can mix and match any version strings you want using any IDE or
pom editing tool. I don't
validate any version, I just parse it and that always works. It has
some rules as to how
to interpret version components in order to be able to compare them,
but again, that's just
needed for version conflict resolution within maven itself.
If you want maven to be able to tell you wheter some version is newer
or older or equal to another
version, you have a few limitations on what version schemes you can use:
1) elements more to the left are more important than elements more to
the right
2) some qualifiers have special meanings w.r.t. ordering
Other than that there are no limitations, unlike the current
implementation.
imagine in the IDE you want to present an ordered list of available
artifacts, that will run outside of maven
Not our problem. ;)
It can use maven-artifact's version implementation to sort the versions,
or get the source and port it to ruby or whatever language the IDE is written
in,
and use that.
There's only 1 class here, which has 2 methods: the string constructor to parse
the version,
and a compareTo interface (implementation of comparable). That's not a lot of
code to
use in tooling.
-- Kenney
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]