com.aliyun.utils.PluginUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of toolkit-maven-plugin
Show all versions of toolkit-maven-plugin
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
package com.aliyun.utils;
import java.io.InputStream;
import java.util.Properties;
public class PluginUtils {
private static String version = null;
public static String getVersion() {
if (version != null) {
return version;
}
InputStream is = null;
try {
is = PluginUtils.class.getClassLoader().getResourceAsStream("plugin.information");
Properties properties = new Properties();
properties.load(is);
version = properties.getProperty("toolkit.maven_plugin.version");
} catch (Exception ex) {
//ignore
} finally {
CommonUtils.close(is);
}
if (version == null) {
version = "unknown";
}
return "cloud-toolkit-" + version;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy