Skip to content

Commit

Permalink
Retain .qualifier/-SNAPSHOT on version bump
Browse files Browse the repository at this point in the history
fix #2877
  • Loading branch information
mlehmannm committed Oct 2, 2023
1 parent c610c26 commit fc8c8df
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public abstract class AbstractTychoMapping implements Mapping, ModelReader {
protected static final String TYCHO_POMLESS_AGGREGATOR_NAMES_PROPERTY = "tycho.pomless.aggregator.names";

private static final String PARENT_POM_DEFAULT_VALUE = System.getProperty(TYCHO_POMLESS_PARENT_PROPERTY, "..");
private static final String QUALIFIER_SUFFIX = ".qualifier";
private static final String MODEL_PARENT = "TychoMapping.model.parent";

@Requirement
Expand Down Expand Up @@ -343,12 +344,12 @@ private static void setLocation(Model model, Path modelSource) {

protected String getPomVersion(String pdeVersion) {
String pomVersion = pdeVersion;
if (pdeVersion.endsWith(TychoConstants.QUALIFIER_SUFFIX)) {
if (pdeVersion.endsWith(QUALIFIER_SUFFIX)) {
String unqualifiedVersion = pdeVersion.substring(0, pdeVersion.length() - QUALIFIER_SUFFIX.length());
if (isExtensionMode() && snapshotFormat != null) {
return unqualifiedVersion + snapshotFormat;
}
return unqualifiedVersion + TychoConstants.SNAPSHOT_SUFFIX;
return unqualifiedVersion + "-SNAPSHOT";
}
return pomVersion;
}
Expand Down

0 comments on commit fc8c8df

Please sign in to comment.