Alexandre,
Is it correct that Mojo's exec-maven-plugin will NOT include dependent
jars of the project on classpath of a new java process?
It'd be nice to have a project, and being able to run:
mvn run 'classname'
with all the runtime dependencies included on classpath.
Is there anything available of this kind?
Once again, thanks very much for help.
Serge
Alexandre Poitras wrote:
On 3/13/06, Sergei Dubov <[EMAIL PROTECTED]> wrote:
Hi guys,
I am a complete Maven newbie (but a fairly advanced Ant user). I
attended Jason's presentation at Toronto JUG and was very impressed with
the value proposition of Maven.
I am still getting my head around the Maven philosophy part. But I do
keep pushing ahead. :-) A couple of questions that I need answering.
1. I can't seem to find a plugin for running Java progs, akin to Ant's
java task. And if it is missing, is it appropriate (philosophically
speaking) to just script an Ant task to the pom.xml?
This is what you want :
http://mojo.codehaus.org/exec-maven-plugin/introduction.html
2. I really need to understand how to handle project specific settings
for each user. Stuff like DB configs, app server specific configuration
files. Basically 3-4 *.properties files with config info in them.
I appreciate any response.
Thanks!
Usually you put the private environnement settings in the settings.xml
using a build profile. But environnement settings related to the
project and not to a particular
developper (a repository declaration for instance) should be kept into
the pom using profile to keep the build portable. It is a good
practice to keep as much information as you can in the project pom
file to keep a consistant and portable build.
My strategy is to duplicate the environnement settings not specific to
me. I include thoses informations in :
1) A super pom file wich is deployed in our internal corporation
repository. All my new projects declare it as their parent. This way I
am sure all the information is recovered and standard across my
projects. When I need to change the settings, I just need to change
the super pom, release a new version on my internal repository and
make sure all my projects use the new version.
2) The settings.xml file so I can work without pom when I need it (for
instance to run archetype:create or deploy:deploy-file goals). Just
putting your public environnement settings is not enough, you risk to
have a unportable build if you don't respect #1.
I suggest you to read attentively this guide. It explains the build
profiles and especially the profiles pitfall I have just mentionned :
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
Hope it's help!
Serge
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]