Since you will need to communicate what commands to run to the
developers anyway, it doesn't seem like that much of a burden to have
the commands be somewhat complex.
Developers, please run:
mvn myplugin:new-web (-Dname.of.new.project=)myWebProject
...is not really much different from...
Developers, please run:
mvn archetype:create -DartifactId=user-guide \
-DgroupId=com.mergere.mvnbook.proficio \
-DarchetypeArtifactId=maven-archetype-site-simple
In my opinion, having the developers run the full commands is
preferable. You don't have to create, maintain, and distribute a plugin,
and the developers get some exposure to "real" Maven. For instance, it
is very likely that your developers will need to install 3rd party jars
in a team repository or in their local repositories, which are commands
that require many command line arguments. It probably doesn't make sense
to hide this complexity from your developers. We expect carpenters to be
able to use saws and hammers; we should expect developers to be able to
use the tools of their trade (build tools, version control, etc.).
-Max
Scott Seiter wrote:
I've created archetypes for different project types and am looking for a
method of creating a new project without having to type in all the extra
arguments (as in):
archetype:create -DartifactId=user-guide
-DgroupId=com.mergere.mvnbook.proficio
-DarchetypeArtifactId=maven-archetype-site-simple
Clearly I could use a batch job/shell script to avoid the arguments, but I'd
like to make it easy for all our developers to do this without having to
distribute a set of scripts. The initial thought is to create a plugin that
feeds parameters to the archetype plugin.
Using this mythical plugin, creating a web project could be done by typing
something like:
mvn myplugin:new-web myWebProject
Has anyone done something like this? If so, how do you call a plugin from
another plugin. I noticed Maven 1 had a 'caller' plugin but one page said
this wasn't needed in Maven 2. Any suggestions?
Thanks in advance!
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]