Thanks. Pretty much what I did. I also tried the fork option, which worked as well. Still not entirely sure why ajc fails when run within a larger ant build, but I guess it is a bit of a moot point.
Thanks, Eric On Fri, Aug 26, 2016 at 12:34 PM, Andy Clement <[email protected]> wrote: > I think if you don't want to fork then you need to just increase the > memory provided to the overall ant launch. > > http://allscm.com/archives/how-to-increase-heap-size-for- > ants-outofmemory-error-using-ant_opts.html > > cheers > Andy > > On 26 August 2016 at 09:23, Eric B <[email protected]> wrote: > >> I'm not the biggest fan of Ant, but I need to use if for this project. >> However, I'm getting the following error message in my build script: >> >> _compile: >> [mkdir] Created dir: C:\dev\Projects\hotfix\aspects\dist\compile >> [echo] Java target: 1.6 >> [iajc] maxMem ignored unless forked: 256m >> [iajc] error AspectJ 1.6.13 ran out of memory during compilation: >> [iajc] >> [iajc] Please increase the memory available to ajc by editing the >> ajc script >> [iajc] found in your AspectJ installation directory. The -Xmx >> parameter value >> [iajc] should be increased from 64M (default) to 128M or even 256M. >> [iajc] >> [iajc] See the AspectJ FAQ available from the documentation link >> [iajc] on the AspectJ home page at http://www.eclipse.org/aspectj >> >> >> My ant script is: >> >> <target name="_compile"> >> >> <taskdef >> resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.pr >> operties"> >> <classpath> >> <pathelement location="${aspectj.lib.home}/aspectjtools.jar"/> >> </classpath> >> </taskdef> >> <mkdir dir="${compile.dir}"/> >> <echo message="Java target: ${jdk.target}"/> >> >> <iajc source="1.6" destDir="${compile.dir}" maxmem="256m"> >> <sourceroots> >> <pathelement location="${java.src.dir}" /> >> </sourceroots> >> <classpath refid="project.classpath"/> >> </iajc> >> >> <mkdir dir="${compile.test.dir}"/> >> <mkdir dir="${test.src.dir}"/> >> <javac srcdir="${test.src.dir}" destdir="${compile.test.dir}" >> source="${jdk.target}" target="${jdk.target}" >> debug="${jdk.debug}" classpathref="compiled.classpath"/> >> >> </target> >> >> >> You'll notice I am not even specifying any inpath; I'm just trying to >> build a jar of aspects to use with the Load-Time-Weaver. And my entire >> source dir is a whopping 6 files. >> >> This only seems to happen when building as part of a complete project >> build (ie: ant has already built other jars, and wars). If I just build >> this jar by itself, i don't run into errors. >> >> Is the only choice running this in a fork? Can I not specify additional >> memory to use to the process otherwise? >> >> Thanks, >> >> Eric >> >> >> _______________________________________________ >> aspectj-users mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> > > > _______________________________________________ > aspectj-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/aspectj-users >
_______________________________________________ aspectj-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/aspectj-users
