问题
I'm getting OutOfMemoryErrors when trying to use the Proguard Maven Plugin. I have tried allocating more memory to Maven by setting the MAVEN_OPTS environment variable to -Xmx2g but this doesn't make any difference. I assume that proguard must run in a separate process.
回答1:
As far as I know proguard-maven-plugin has a separate configuration entry for that:
<plugin>
<groupId>com.pyx4me</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.4</version>
...
<configuration>
<maxMemory>576m</maxMemory>
</configuration>
</plugin>
And you're right, proguard runs in a forked process.
来源:https://stackoverflow.com/questions/19387801/how-do-i-allocate-more-memory-to-proguard-with-the-proguard-maven-plugin