You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
when executing mvn rewrite:run on a rather large repo (this one).
So i thought i could mitigate that by limiting the amount of files being parsed, as i was seeing "[WARNING] There were problems parsing …" on lots of files that are completely irrelevant to the migration (i.e. yaml files), by using <excludes> in the rewrite-maven-plugin config.
All of the following did not work, there was no effect whatsoever on the warnings and the fatal OutOfMemoryError:
<exclude>*/samples/**</exclude> (just as shown on the reference page)
<exclude>${project.basedir}/samples/**</exclude>
<exclude>./samples/**</exclude>
<exclude>samples/**</exclude>
Running again with -X revealed what i believe to be the issue here:
(reformatted and actual home dir replaced with ~ for legibility here)
The pom.xml plugin config posted above lies in the root dir (~/prog/oss/openapi-generator) but all the excludes are resolved to the context of the module currently being processed, hence they are not being applied as expected – the samples folder in the main directory will still be parsed and the run fails with OutOfMemoryException.
Workaround
**/samples/** works (obviously)
But this workaround may not be feasible for everybody, i.e. another recipe user may need to exclude ${project.basedir}/samplesbut not${project.basedir}/modules/some-module/samples.
The text was updated successfully, but these errors were encountered:
What version of OpenRewrite are you using?
I am using rewrite-maven-plugin 5.33.0
How are you running OpenRewrite?
Problem details and root
I was constantly running into
[ERROR] Java heap space -> [Help 1] java.lang.OutOfMemoryError: Java heap space
when executing
mvn rewrite:run
on a rather large repo (this one).So i thought i could mitigate that by limiting the amount of files being parsed, as i was seeing "[WARNING] There were problems parsing …" on lots of files that are completely irrelevant to the migration (i.e. yaml files), by using
<excludes>
in the rewrite-maven-plugin config.All of the following did not work, there was no effect whatsoever on the warnings and the fatal OutOfMemoryError:
<exclude>*/samples/**</exclude>
(just as shown on the reference page)<exclude>${project.basedir}/samples/**</exclude>
<exclude>./samples/**</exclude>
<exclude>samples/**</exclude>
Running again with
-X
revealed what i believe to be the issue here:(reformatted and actual home dir replaced with
~
for legibility here)The
pom.xml
plugin config posted above lies in the root dir (~/prog/oss/openapi-generator
) but all the excludes are resolved to the context of the module currently being processed, hence they are not being applied as expected – the samples folder in the main directory will still be parsed and the run fails with OutOfMemoryException.Workaround
**/samples/**
works (obviously)But this workaround may not be feasible for everybody, i.e. another recipe user may need to exclude
${project.basedir}/samples
but not${project.basedir}/modules/some-module/samples
.The text was updated successfully, but these errors were encountered: