We've been talking about this for a while, but it's time to make it happen
sooner rather than later.
Here's the basic plan we discussed this morning (my time).
Goals
- Allow plug-ins to be added more easily by the user
- Allow user to keep their build file the way they want
Details:
- Plugins are jars with the following contents: plugin.properties,
plugin-build.xml, plugin-delegators.xml
- User downloads plugins and copies them to ${maven.home}/plugins
- The user can tell maven about the plugins by doing: ant
maven:install-plugins
- This process: 1) scans the plugins directory comparing jars to
directories, ala Tomcat with WARs and webapps
- 2) unzips any 'new' plugins
- 3) runs a task to parse the init target and produce
the callbacks
- 4) runs a task to regenerate a proposed new file -
delegators.xml with all targets that may be
delegated to in all available plugins and 'core
maven'
- The user adds a delegator to thier build file, e.g. maven:j2ee:war, or
the install offers to do it for them(?), and they call it as usual.
The 'install' process could be placed as part of the 'verify-project' step
as well, so that if the user ran ANY existing maven target, it would do
it's work.
Files:
plugin.properties - properties that can be overridden by the user and
are used only by this plugin. Format of properties are:
maven.plugin.target.name, e.g. maven.j2ee.war.webxml
plugin-build.xml - the build file that will be delegated to. Same as is
currently stored in src/templates/build
plugin-delegators.xml - a snippet of an ant build file containing the
delegated targets, e.g. for the j2ee plugin as it is now, it would consist
of two targets, war and ear. The antcall from the user's build file is
ALWAYS to ${maven.home}/delegators.xml. plugin-delegators.xml would always
antcall ${maven.home}/plugins/<plugin-name>/plugin-build.xml. For example
the j2ee plugin-delegators.xml would call
${maven.home}/plugins/j2ee/plugin-build.xml
Fire away....
--
dIon Gillard, Multitask Consulting
Work: http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>