AspectJ Maven插件编译时间内存超过错误

时间:2019-08-26 09:19:09

标签: aspectj-maven-plugin

您好,我正在使用编译时AspectJ来编织类,但是有些类太大,以至于在编译时无法编织它。

所以我已经尝试在插件中添加参数: -Xmx2048m

pom.xml:

{"bar", "baz"}

错误日志:

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.11</version>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <argLine>-Xmx2048m</argLine>
                    <complianceLevel>${maven.compiler.target}</complianceLevel>
                    <source>${maven.compiler.target}</source>
                    <target>${maven.compiler.target}</target>
                    <showWeaveInfo>true</showWeaveInfo>
                    <verbose>true</verbose>
                    <Xlint>ignore</Xlint>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <forceAjcCompile>true</forceAjcCompile>
                    <sources />
                    <weaveDirectories>
                        <weaveDirectory>${project.build.directory}/classes</weaveDirectory>
                    </weaveDirectories>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

如何解决此问题,请帮忙?

0 个答案:

没有答案