allatori obfuscator. .
env ALLATORI_LIB=LOCATION/lib
: .
//, , . allatori-config.xml ( - , )
allatori-config.xml :
<config>
<keep-names>
</keep-names>
<jars>
<jar in="${obf.jar}" out="${obf.jar}"/>
</jars>
<property name="log-file" value="target/allatori-log.xml"/>
</config>
maven maven-antrun-plugin .
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
<id>obfuscate2</id>
<configuration>
<target unless="${obfuscation.skip}">
<echo message="running allatori"/>
<property name="obf.jar" value="target/${project.artifactId}-${project.version}.jar"/>
<property name="runtime_classpath" refid="maven.runtime.classpath"/>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<taskdef name="allatori" classname="com.allatori.ant.ObfuscatorTask" classpath="${env.ALLATORI_LIB}/allatori.jar:${runtime_classpath}:${compile_classpath}" />
<allatori config="${basedir}/allatori-config.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>