在线订购 试用下载
Allatori配置文件是一个XML文件,具有以下结构:
<config> <input basedir="input-jars" single-jar="application.jar"> <jar in="app.jar" out="app-obf.jar"/> <jar in="input/*.jar" out="output/*.jar"/> <dir in="in-dir" out="out-dir"/> </input> <classpath basedir="library-jars"> <!-- Adding library.jar to the classpath --> <jar name="library.jar"/> <!-- Adding all jars in the lib directory to the classpath --> <jar name="lib/*.jar"/> <!-- Adding all jars in the lib2 directory and its subdirectories to the classpath --> <jar name="lib2/**/*.jar"/> </classpath> <keep-names> <class template="class SomeClass"/> <class template="class * instanceof java.io.Serializable"/> <class template="class com.package.*"/> <class access="protected+"> <field access="protected+"/> <method access="protected+"/> </class> <class template="class com.company.abc.*"> <field template="public int *"/> <method template="public get*(*)"/> <method template="public set*(*)"/> </class> </keep-names> <watermark key="secure-key-to-extract-watermark" value="Customer: John Smith"/> <expiry date="2017/01/01" string="EXPIRED!"/> <!-- Configuration properties, all properties are optional --> <!-- General properties, we recommend to use these two properties --> <property name="log-file" value="renaming-log.xml"/> <property name="random-seed" value="type anything here"/> <!-- String encryption --> <property name="string-encryption" value="enable"/> <property name="string-encryption-type" value="fast"/> <property name="string-encryption-version" value="v4"/> <property name="string-encryption-ignored-strings" value="patterns.txt"/> <!-- Control flow obfuscation --> <property name="control-flow-obfuscation" value="enable"/> <property name="extensive-flow-obfuscation" value="normal"/> <!-- Renaming --> <property name="default-package" value="com.package"/> <property name="force-default-package" value="enable"/> <property name="packages-naming" value="abc"/> <property name="classes-naming" value="compact"/> <property name="methods-naming" value="compact"/> <property name="fields-naming" value="compact"/> <property name="local-variables-naming" value="optimize"/> <property name="update-resource-names" value="enable"/> <property name="update-resource-contents" value="enable"/> <!-- Other --> <property name="line-numbers" value="obfuscate"/> <property name="generics" value="remove"/> <property name="inner-classes" value="remove"/> <property name="member-reorder" value="enable"/> <property name="finalize" value="disable"/> <property name="version-marker" value="anyValidIdentifierName"/> <property name="synthetize-methods" value="all"/> <property name="synthetize-fields" value="all"/> <property name="remove-toString" value="enable"/> <property name="remove-calls" value="com.package.Logger.debug"/> <property name="output-jar-compression-level" value="9"/> <!-- Incremental obfuscation --> <property name="incremental-obfuscation" value="input-renaming-log.xml"/></config>
注意1:所有相对路径都是根据配置文件位置解析的。
注意2:如果从Ant运行Allatori,则可以使用标准Ant语法引用Ant构建文件中定义的属性:$ {PropertyName}。
注意3:可以分别使用$ {System.getProperty(property.name)}和$ {System.getenv(VARIABLE_NAME)} 引用系统属性和环境变量。
想要购买该产品正版授权,或了解更多产品信息请点击“咨询在线客服”

标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!