On Sep 19, 2006, at 12:42 PM, Meeraj Kunnumpurath wrote:
Ok, thinking about this further, I have a couple of ideas ...
Have an abstract class AbstractMavenRepository with two
specializations,
1. WarMavenRepository
2. StandaloneMavenRepository
Both will get injected an instance of RuntimeInfo that is specific
to the runtime environment in which the repository is used. We
could have WarRuntimeInfo that will give reference to artifacts
like servlet context and StandaloneRuntimeInfo that will provide
info on install dir etc. The host enviornment will inject the
appropriate runtime info object to the repo.
I had run into that thinking about how to move the extension loader
from WebappRuntimeInfo into a component. Also we have the various
problems with how we tried to find the install directory,
particularly when there wasn't one (e.g. in a war or in a test case).
I think it would be fairly easy to fix this and I've been tinkering
with the bootstrap code recently so I'm happy to take this on. At
first guess I've been thinking we'd get something like:
StandaloneRuntimeInfo extends RuntimeInfo {
File getInstallDirectory();
}
WarRuntimeInfo extends RuntimeInfo {
ServletContext getServletContext();
}
I'm not quite sure what the current getApplicationRootDirectory()
method returns and why we need it - can someone please enlighten me
here?
Meeraj, if this works for you I should be able to get that in there
today or tomorrow.
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]