Menu

Change OutJar file name

2017-11-02
2017-11-02
  • Rakesh Koplod

    Rakesh Koplod - 2017-11-02

    I am able to obfuscate my java application. But I am not able to change the output jar file name. It comming by default "filename-small.jar". I want to change the outjar file name. I tried by providing the name in -outjars but it is not reflected and it is still appended by -small.

    Here is my pom.xml plugin for Proguard:

    <plugin>
    <groupId>com.github.wvengen</groupId>
    <artifactId>proguard-maven-plugin</artifactId>
    <version>2.0.8</version>
    <executions>
    <execution>
    <phase>package</phase>
    <goals><goal>proguard</goal></goals>
    </execution>
    </executions>
    <configuration>
    <obfuscate>true</obfuscate>
    <attach>true</attach>
    <injar>${pom.artifactId}-${pom.version}-jar-with-dependencies.jar</injar>
    <outjar>abc.jar</outjar>
    <outputDirectory>${basedir}/build</outputDirectory>
    <options>
    <option>-allowaccessmodification</option>
    <option>-dontshrink</option>
    <option>-dontoptimize</option>
    <option>-dontwarn</option>
    <option>-keep public class test.MainController { public protected *; }</option>
    </options>
    <libs>
    <lib>${java.home}/lib/rt.jar</lib>
    <lib>${java.home}/lib/jsse.jar</lib>
    </libs>
    </configuration>
    </plugin>

     
  • Eric Lafortune

    Eric Lafortune - 2017-11-03

    This behavior is determined by this com.github.wvengen Maven plugin, which is not part of the standard ProGuard software. I imagine it has a setting for the output jar name. You could contact its developer or look at the source code.