[MAGNOLIA-6177] Version number cannot contain 2 hyphens Created: 28/Mar/15 Updated: 19/May/22 Resolved: 19/May/22 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Liang Shi | Assignee: | Magnolia International |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Not relevant |
||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
Hi, we are finishing a magnolia based project recently, but there is a problem on the release process that magnolia doesn't allow version number with two hyphens and always considers everything after the first hyphen is the classifier. here is a code snippet from info.magnolia.module.model.Version final int classifierIdx = versionStr.indexOf('-'); if (classifierIdx > 0) { classifier = versionStr.substring(classifierIdx + 1); if (!classifierValidation.matcher(classifier).matches()) { throw new IllegalArgumentException("Invalid classifier: \"" + classifier + "\" in version \"" + versionStr + "\""); } numbers = versionStr.substring(0, classifierIdx); } I suggest change final int classifierIdx = versionStr.indexOf('-'); to final int classifierIdx = versionStr.lastIndexOf('-'); |
| Comments |
| Comment by Magnolia International [ 22/Apr/15 ] |
|
Hi, Thanks for the report. I'm not sure this can be fixed without side-effects for others (who may have come to rely on this). Although AFAIK, we don't use the classifier for anything, so it should be OK. Is there no way for you to not have such a qualifier ? What build tool are you using ? |
| Comment by Liang Shi [ 22/Apr/15 ] |
|
hi, we are using maven und intend to have version number like ${project.version} the version number format is given, we solved this problem by changing the version format and use '.' as separator |
| Comment by Magnolia International [ 23/Apr/15 ] |
|
Okay, good to know. I'll try to get this in in a next release, but hopefully using dots is satisfying for you until then? |
| Comment by Roman Kovařík [ 19/May/22 ] |
|
Hello, This ticket is now marked as closed due to one of the following reasons:
If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you. Thank you, |