All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.utils.PluginUtils Maven / Gradle / Ivy

Go to download

Aliyun Open API SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com

There is a newer version: 1.1.9
Show newest version
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