allatori-JAVA代码混淆工具

Allatori是第二代Java混淆器,它为您的知识产权提供全方位的保护。

虽然大多数第二代混淆器都能提供值得信赖的保护,但我们在Allatori中开发了一些额外的功能,使代码的反向工程几乎不可能。

Allatori不仅仅是混淆,它还能最大限度地减少应用程序的大小,提高速度,同时除了你和你的团队,任何人都无法读懂你的代码。Allatori和所有现代的Java混淆器一样,具有完整的水印功能,可以为您的软件提供适当的许可!

如果你有必要保护你的软件,如果你想减少它的大小和处理时间,Allatori混淆器是为你准备的。

 官网 https://allatori.com/

上代码

在根目录下创建allatori文件夹,放入配置文件allatori.xml,创建lib文件夹,导入allatori.jar和allatori-annotations.jar。

<config>
    <input>
        <jar in="${project.build.finalName}.jar" out="${project.build.finalName}-obfuscated.jar"/>
    </input>

    <keep-names>
        <class access="protected+">
            <field access="protected+"/>
            <method access="protected+"/>
        </class>
    </keep-names>

    <property name="log-file" value="log.xml"/>
    <ignore-classes>
        <!-- 注意:spring的框架相关的文件需要排除,避免启动报错 -->
        <class template="class *springframework*"/>
        <class template="class org**"/>
    </ignore-classes>
</config>

 pom文件

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.smardec.mousegestures</groupId>
  <artifactId>mouse-gestures</artifactId>
  <packaging>jar</packaging>
  <version>1.2</version>
  <name>mouse-gestures</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>

    <plugins>

      <!-- Copying Allatori configuration file to 'target' directory.
           The destination file will be filtered (Maven properties used in configuration file will be resolved). -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>copy-and-filter-allatori-config</id>
            <phase>package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/allatori</directory>
                  <includes>
                    <include>allatori.xml</include>
                  </includes>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Running Allatori -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <id>run-allatori</id>
            <phase>package</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>-Xms128m</argument>
            <argument>-Xmx512m</argument>
            <argument>-jar</argument>

            <!-- Copy allatori.jar to 'allatori' directory to use the commented line -->
            <argument>${basedir}/allatori/lib/allatori.jar</argument>
            <!-- <argument>${basedir}/allatori/allatori.jar</argument> -->

            <argument>${basedir}/target/allatori.xml</argument>
          </arguments>
        </configuration>
      </plugin>

    </plugins>

  </build>

</project>

执行打包命令 

mvn clean package -U -Dmaven.test.skip=true
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值