Compare commits

...

3 Commits

Author SHA1 Message Date
stanislav.bieliaiev
b9821c54f8 Revert "fix(APPINT-35116) - fix for nexus versions"
This reverts commit 3fb65fd3f1.
2022-10-27 11:25:03 +03:00
stanislav.bieliaiev
3fb65fd3f1 fix(APPINT-35116) - fix for nexus versions 2022-10-27 11:24:10 +03:00
stanislav.bieliaiev
c1533f273e fix(APPINT-34581) - fixed versions 2022-10-17 21:19:21 +03:00

View File

@@ -309,11 +309,20 @@ public class PomIdsHelper {
ProjectPreferenceManager manager = getPreferenceManager(projectTechName);
return manager.getBoolean(MavenConstants.USE_PROFILE_MODULE);
}
private static String getPublishCloudVersion(String latestVersion) {
if (null == latestVersion) {
return "0.1.0";
} else {
int i = latestVersion.lastIndexOf('.') + 1;
return latestVersion.substring(0, i) + (Long.parseLong(latestVersion.substring(i)) + 1);
}
}
/**
* @return "<bundleVersion>".
*/
public static String getBundleVersion(Property property, String bundleVersion) {
public static String getNotIteratedBundleVersion(Property property, String bundleVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
@@ -337,7 +346,7 @@ public class PomIdsHelper {
/**
* @return "<featureVersion>".
*/
public static String getFeatureVersion(Property property, String featureVersion) {
public static String getNotIteratedFeatureVersion(Property property, String featureVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
@@ -358,6 +367,54 @@ public class PomIdsHelper {
return version;
}
/**
* @return "<bundleVersion>".
*/
public static String getBundleVersion(Property property, String bundleVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
if (property.getAdditionalProperties() != null) {
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
}
if(version == null) {
version = getPublishCloudVersion(bundleVersion);
}
if (version == null) {
version = VersionUtils.getPublishVersion(property.getVersion());
}
if (useSnapshot) {
version += MavenConstants.SNAPSHOT;
}
}
return version;
}
/**
* @return "<featureVersion>".
*/
public static String getFeatureVersion(Property property, String featureVersion) {
String version = null;
if (property != null) {
boolean useSnapshot = false;
if (property.getAdditionalProperties() != null) {
version = (String) property.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
useSnapshot = property.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
}
if(version == null) {
version = getPublishCloudVersion(featureVersion);
}
if (version == null) {
version = VersionUtils.getPublishVersion(property.getVersion());
}
if (useSnapshot) {
version += MavenConstants.SNAPSHOT;
}
}
return version;
}
public static boolean getIfExcludeDeletedItems() {
String excludeDeleted = System.getProperty("talend.exclude.deleted");
if (excludeDeleted != null) {