...
|
...
|
@@ -10,6 +10,7 @@ import com.taobao.logconfig.LogConfigurator; |
|
|
import com.taobao.maven.plugin.config.ConfigRuntimeImpl;
|
|
|
import com.taobao.maven.plugin.expand.ExpanderRuntimeImpl;
|
|
|
import com.taobao.maven.plugin.util.CharsetUtil;
|
|
|
import com.taobao.maven.plugin.util.StringUtil;
|
|
|
|
|
|
/**
|
|
|
* Maven plugin to invoke antx-autoconfig.
|
...
|
...
|
@@ -82,6 +83,20 @@ public class AutoconfigMojo extends AbstractMojo { |
|
|
* @parameter expression="${autoconfig.userProperties}"
|
|
|
*/
|
|
|
private File userProperties;
|
|
|
|
|
|
/**
|
|
|
* Shared properties file.
|
|
|
*
|
|
|
* @parameter expression="${autoconfig.sharedProperties}"
|
|
|
*/
|
|
|
private String sharedProperties;
|
|
|
|
|
|
/**
|
|
|
* Shared properties name.
|
|
|
*
|
|
|
* @parameter expression="${autoconfig.sharedPropertiesName}"
|
|
|
*/
|
|
|
private String sharedPropertiesName;
|
|
|
|
|
|
public void execute() throws MojoExecutionException, MojoFailureException {
|
|
|
if (skip) {
|
...
|
...
|
@@ -123,6 +138,12 @@ public class AutoconfigMojo extends AbstractMojo { |
|
|
if (userProperties != null) {
|
|
|
runtimeImpl.setUserPropertiesFile(userProperties.getAbsolutePath(), null);
|
|
|
}
|
|
|
|
|
|
if (sharedProperties != null) {
|
|
|
String[] sharedPropertiesFiles = StringUtil.split(sharedProperties, ",");
|
|
|
sharedPropertiesName = sharedPropertiesName == null ? "sharedAutoconfig" : sharedPropertiesName;
|
|
|
runtimeImpl.setSharedPropertiesFiles(sharedPropertiesFiles, sharedPropertiesName, charset);
|
|
|
}
|
|
|
|
|
|
getLog().info(
|
|
|
"Configuring " + dest.getAbsolutePath() + ", interactiveMode=" + interactiveMode + ", strict="
|
...
|
...
|
|