IntelliJ IDEA的Maven項目在修改時報java.lang.OutOfMemoryError: PermGen space異常


什么也不說了---內存溢出,遇見太多回了,下面是解決方式:

1.在項目設置中新建Maven,然后設置VM:

2. 在pom.xml添加下面2個插件,一個是jrebel的,一個是jetty的

  <build>
      <finalName>shuyangyang</finalName>
      <plugins>
            <plugin>
              <groupId>org.zeroturnaround</groupId>
              <artifactId>jrebel-maven-plugin</artifactId>
              <executions>
                  <execution>
                      <id>generate-rebel-xml</id>
                      <phase>process-resources</phase>
                      <goals>
                          <goal>generate</goal>
                      </goals>
                  </execution>
              </executions>
            </plugin>

            <plugin>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>maven-jetty-plugin</artifactId>
              <version>6.1.26</version>
              <configuration>
                  <scanIntervalSeconds>0</scanIntervalSeconds>
                  <connectors>
                      <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                          <port>8981</port>
                          <headerBufferSize>16192</headerBufferSize>
                      </connector>
                  </connectors>
              </configuration>
            </plugin>
      </plugins>
  </build>

注:如果添加不了,在pom.xml添加下面的倉庫地址就可下載:

    <repositories>
        <repository>
            <id>Sonatype</id>
            <name>Sonatype Repository</name>
            <url>http://maven.oschina.net/home.html</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

 

后記:在我的為之筆記有補充方法。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM