com.aliyun.manager.config.ToolkitPackageConfigManager 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.manager.config;
import com.aliyun.Context;
import com.aliyun.bean.config.ToolkitPackageConfig;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import java.io.File;
public class ToolkitPackageConfigManager extends AbstractConfigManager {
private MavenProject project;
private Log logger;
public ToolkitPackageConfigManager() {
super(false);
this.project = Context.getProject();
this.logger = Context.getLogger();
}
public ToolkitPackageConfig loadProperties(String configFile, String defaultFile) throws MojoExecutionException {
try {
if (configFile != null || new File(defaultFile).exists()) {
return load(configFile, defaultFile, ToolkitPackageConfig.class);
}
throw new Exception("No toolkit package config is found.");
} catch (Exception ex) {
logger.error(ex);
throw new MojoExecutionException(ex.getMessage());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy