The following issue has been updated:
Updater: Brett Porter (mailto:[EMAIL PROTECTED])
Date: Wed, 2 Mar 2005 9:56 PM
Changes:
Fix Version changed from 1.1
Fix Version changed to 1.1-beta-1
Component changed from core
---------------------------------------------------------------------
For a full history of the issue, see:
http://jira.codehaus.org/browse/MAVEN-784?page=history
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MAVEN-784
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-784
Summary: Add "embedded mode" execution support for avoiding System.exit()
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven
Fix Fors:
1.1-beta-1
Versions:
1.0-rc1
Assignee:
Reporter: John Casey
Created: Thu, 4 Sep 2003 11:00 PM
Updated: Wed, 2 Mar 2005 9:56 PM
Environment: any platform, executed from within a pre-existing JVM
Description:
Currently, when maven completes, it returns some error level, which allows
users to adjust the behavior of their scripts accordingly (as in the case of
cron jobs and such, I would imagine). It accomplishes this task by calling
System.exit(status) with the appropriate status code for the exit state of
maven. Typically, this is a _good_thing_.
However, when maven is called from within a running JVM, the System.exit()
calls must be parried with some sort of SecurityManager or such, in order to
keep the maven completion from bringing down the entire JVM and larger
application. Another way around this is to spawn a new JVM for each maven
execution, but this is unacceptably high in overhead, especially given the
execution delay typically experienced while maven works its magic behind the
scenes.
My proposal is simple: create an embedded mode for maven, wherein System.exit()
calls are supressed.
In a typical application plugin, maven should be called by invoking Forehead
with the proper configuration. This avoids the duplication of complex
classloader logic, and maintains a single point of maintenance for the maven
bootstrap process. In order to create an embedded mode, all that need be done
is to add an option to the CLI parsing, (-E), and a boolean member variable in
App.java which denotes which execution mode we're running in. Then, in the
exit(status) method of App.java, simply insert conditional logic to check the
execution mode, and supress System.exit() in embedded mode. The rest of maven
need not be touched in any way.
I am attaching a patch to this issue, which incorporates my ideas in concrete
code.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]