DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41280>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41280

           Summary: APT Task ignores memoryMaximumSize argument
           Product: Ant
           Version: 1.7.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


While processing a large number of files via an 'apt' ant task, apt is failing
with an out of memory exception.  Altering the task to include a
'memoryMaximumSize' argument does not rectify the situation.  The following is
emitted regardless of the 'fork=' setting in the ant script:

      [apt] Compiling 1881 source files
      [apt] Since fork is false, ignoring memoryMaximumSize setting.
      [apt]
      [apt]
      [apt] The system is out of resources.
      [apt] Consult the following stack trace for details.
      [apt] java.lang.OutOfMemoryError: Java heap space

I haven't found a way to work around the issue via the script.  However, I was
able to get the Apt task to do what I need by altering the
org.apache.tools.ant.taskdefs.Apt constructor as follows.

Original constructor:
    public Apt() {
        super();
        super.setCompiler(AptExternalCompilerAdapter.class.getName());
        setFork(true);
    }
Work-around constructor:
    public Apt() {
        super();
        super.setCompiler(AptExternalCompilerAdapter.class.getName());
        super.setFork(true);
    }

However, the workaround causes the task to emit a different warning:
      [apt] Since compiler setting isn't classic or modern,ignoring fork 
setting.
      [apt] Compiling 1881 source files
      [apt] Since compiler setting isn't classic or modern,ignoring fork 
setting.

I suspect this implies other changes need to be made to get the apt task to
recognize the appropriate memory options.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to