|
|
@@ -8,7 +8,6 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
|
|
|
import org.apache.maven.plugins.annotations.Mojo;
|
|
|
import org.apache.maven.plugins.annotations.Parameter;
|
|
|
import org.apache.maven.project.MavenProject;
|
|
|
-import winter.com.ideaaedi.classwinter.Forward;
|
|
|
import winter.com.ideaaedi.classwinter.executor.EncryptExecutor;
|
|
|
import winter.com.ideaaedi.classwinter.util.ExceptionUtil;
|
|
|
import winter.com.ideaaedi.classwinter.util.Logger;
|
|
|
@@ -60,18 +59,18 @@ public class ClassWinterPlugin extends AbstractMojo {
|
|
|
@Override
|
|
|
@SuppressWarnings("RedundantThrows")
|
|
|
public void execute() throws MojoExecutionException, MojoFailureException {
|
|
|
- Logger.info(ClassWinterPlugin.class,"---------------------------< class-winter-plugin start >---------------------------");
|
|
|
+ Logger.info("-----------------< class-winter-plugin start >-----------------");
|
|
|
|
|
|
Logger.ENABLE_DEBUG.set(debug != null && debug);
|
|
|
- Logger.debug(Forward.class, "You config arg originJarOrWar -> " + originJarOrWar);
|
|
|
- Logger.debug(Forward.class, "You config arg includePrefix -> " + includePrefix);
|
|
|
- Logger.debug(Forward.class, "You config arg excludePrefix -> " + excludePrefix);
|
|
|
- Logger.debug(Forward.class, "You config arg finalName -> " + finalName);
|
|
|
- Logger.debug(Forward.class, "You config arg password -> " + password);
|
|
|
- Logger.debug(Forward.class, "You config arg includeLibs -> " + includeLibs);
|
|
|
- Logger.debug(Forward.class, "You config arg alreadyProtectedLibs -> " + alreadyProtectedLibs);
|
|
|
- Logger.debug(Forward.class, "You config arg tips -> " + tips);
|
|
|
- Logger.debug(Forward.class, "You config arg debug -> " + debug);
|
|
|
+ Logger.debug("You config arg originJarOrWar -> " + originJarOrWar);
|
|
|
+ Logger.debug("You config arg includePrefix -> " + includePrefix);
|
|
|
+ Logger.debug("You config arg excludePrefix -> " + excludePrefix);
|
|
|
+ Logger.debug("You config arg finalName -> " + finalName);
|
|
|
+ Logger.debug("You config arg password -> " + password);
|
|
|
+ Logger.debug("You config arg includeLibs -> " + includeLibs);
|
|
|
+ Logger.debug("You config arg alreadyProtectedLibs -> " + alreadyProtectedLibs);
|
|
|
+ Logger.debug("You config arg tips -> " + tips);
|
|
|
+ Logger.debug("You config arg debug -> " + debug);
|
|
|
|
|
|
Build build = project.getBuild();
|
|
|
// 要加密的jar/war文件的绝对路径
|
|
|
@@ -90,17 +89,17 @@ public class ClassWinterPlugin extends AbstractMojo {
|
|
|
.tips(tips)
|
|
|
.build();
|
|
|
|
|
|
- Logger.debug(ClassWinterPlugin.class, "The encrypted executor generated based on your configuration is -> " + encryptExecutor);
|
|
|
+ Logger.debug("The encrypted executor generated based on your configuration is -> " + encryptExecutor);
|
|
|
String encryptedJarOrWar;
|
|
|
try {
|
|
|
EncryptExecutor.invokerIsPlugin = true;
|
|
|
encryptedJarOrWar = encryptExecutor.process();
|
|
|
- Logger.info(ClassWinterPlugin.class, "The absolute path of the obfuscated jar is [" + encryptedJarOrWar + "]");
|
|
|
+ Logger.info("The absolute path of the obfuscated jar is [" + encryptedJarOrWar + "]");
|
|
|
} catch (Exception e) {
|
|
|
Logger.error(ClassWinterPlugin.class, ExceptionUtil.getStackTraceMessage(e));
|
|
|
throw e;
|
|
|
}
|
|
|
- Logger.info(ClassWinterPlugin.class,"---------------------------< class-winter-plugin end >---------------------------");
|
|
|
+ Logger.info("-----------------< class-winter-plugin end >-----------------");
|
|
|
}
|
|
|
|
|
|
}
|