How do I allocate more memory to Proguard with the Proguard Maven Plugin?

只愿长相守 提交于 2019-12-13 06:14:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!