Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to obfuscate a webapp using Maven and ProGuard
    primarykey
    data
    text
    <p>I use Maven and the maven-war-plugin to to build my WAR. All JSPs are pre-compiled using the jspc-maven-plugin and all classes are put into a JAR (WEB-INF/lib). So far everything works fine. Now I try to configure the proguard-maven-plugin to obfuscate my code. </p> <p>First I tried to obfuscate all classes during the compile phase but then I get in trouble pre-compiling the JSPs. I found some examples where the package phase is defined. But in this case I dont know how to address my JAR file, which is alrady packed into the WAR. Finally I tried simply to set my WAR as &lt;injar&gt;mywebapp.war&lt;/injar&gt;. But this is also not working. What am I missing?</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;com.pyx4me&lt;/groupId&gt; &lt;artifactId&gt;proguard-maven-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.4&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;proguard&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;obfuscate&gt;true&lt;/obfuscate&gt; &lt;includeDependency&gt;false&lt;/includeDependency&gt; &lt;injar&gt;${project.artifactId}-v${project.version}.war&lt;/injar&gt; &lt;outjar&gt;${project.artifactId}-v${project.version}-obf.war&lt;/outjar&gt; &lt;outputDirectory&gt;${project.build.directory}&lt;/outputDirectory&gt; &lt;maxMemory&gt;256m&lt;/maxMemory&gt; &lt;libs&gt; &lt;!-- Java Runtime --&gt; &lt;lib&gt;${java.home}/../Classes/classes.jar&lt;/lib&gt; &lt;lib&gt;${java.home}/../Classes/jce.jar&lt;/lib&gt; &lt;/libs&gt; &lt;options&gt; &lt;option&gt;-allowaccessmodification&lt;/option&gt; &lt;option&gt;-dontskipnonpubliclibraryclasses&lt;/option&gt; &lt;option&gt;-dontskipnonpubliclibraryclassmembers&lt;/option&gt; &lt;/options&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>Do you have any hints, examples to get this done?</p> <p>Thanks a lot! David</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload