<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>yguard</groupId>
<artifactId>yguard</artifactId>
<version>2.1.0</version>
<scope>system</scope>
<systemPath>${basedir}/../lib/yguard.jar</systemPath>
</dependency>
</dependencies>
<executions>
<execution>
<phase>install</phase>
<configuration>
<tasks>
<property refid="maven.compile.classpath" name="mvn.classpath"></property>
<!-- <echo message="Using Maven Classpath: ${mvn.classpath}" /> -->
<taskdef name="yguard" classname="com.yworks.yguard.YGuardTask" />
<yguard>
<!-- Input file and output file is the same. -->
<inoutpair
in="${project.auto.deploy.dir}/jar/${project.build.finalName}.${project.packaging}"
out="${project.auto.deploy.dir}/jar/${project.build.finalName}_obfuscation.jar" />
<shrink logfile="${project.auto.deploy.dir}/yguard.log.xml">
<property name="error-checking" value="pedantic"/>
<keep>
<class classes="public" methods="public">
<patternset>
<include name="*" />
</patternset>
</class>
</keep>
</shrink>
<!-- Obfuscate classes plus string references. -->
<rename mainclass="com.pkg.edi.MainParser" logfile="${project.auto.deploy.dir}/yguard.log.xml"
replaceClassNameStrings="true">
<property name="error-checking" value="pedantic"/>
<!-- Keep the only class to be used for easy running and its public
method main().
-->
<adjust replaceContent="true">
<!-- plain-text class names in the config files will -->
<!-- be replaced with the obfuscated name versions -->
<include name="**/*.xml"/>
<include name="**/*.properties"/>
</adjust>
<!-- <adjust replacePath="false">
keep the complete path to the resources, (gifs...) even if
package com.mycompany.myapp gets obfuscated by name
<include name="com/pkg/persistence/*"/>
</adjust> -->
<adjust replaceName="true">
<!-- Replace the .properties files' names with the obfuscated -->
<!-- versions if the corresponding .class files get obfuscated -->
<include name="**/*.properties"/>
</adjust>
<keep>
<class classes="public" methods="public">
<patternset>
<include name="com.pkg.edi.MainParser" />
</patternset>
</class>
</keep>
</rename>
<!-- There are some external libraries used - Maven knows details. -->
<externalclasses>
<pathelement path="${mvn.classpath}" />
</externalclasses>
</yguard>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Thanks for the post, I am techno savvy. I believe you hit the nail right on the head. I am highly impressed with your blog.
ReplyDeleteIt is very nicely explained. Your article adds best knowledge to our Java Online Training from India.
or learn thru Java Online Training from India Students.
I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog.
ReplyDeleteData Science Training in Chennai
Data Science training in kalyan nagar
Data science training in Bangalore
Data Science training in marathahalli
Data Science interview questions and answers
Data science training in jaya nagar
kralbet
ReplyDeletebetpark
tipobet
slot siteleri
kibris bahis siteleri
poker siteleri
bonus veren siteler
mobil ödeme bahis
betmatik
PO1VG
sex videos
ReplyDeletetütün sarma makinesi
site kurma
sms onay
binance hesap açma
T8KA
شركة مكافحة الفئران بالجبيل m8DgEVD2mn
ReplyDelete