Skip to content

Formatter #217

@xenoterracide

Description

@xenoterracide

So, I'm looking at Maven's Version Spec and if it's written and I'm understanding it correctly. Build Information has to be -<build> instead of +<build>. I know this doesn't match the semver spec. It might be nice to be able to specify some kind of Formatter class to allow getVersion to print something else. For example

new Semver(...).withType(Type.MAVEN)

given build information it could use - instead, and maybe this could be used in some cases to detect whether a SNAPSHOT should be added (although maybe that's too error prone).

note: In my case I've just decided to create a subclass of Semver overriding getVersion super.getVersion().replace("+", "-")

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions