hallo

sorry for the confusion. repos defined in a pom dont need a profile. i have put them into settings.xml, there i got my example from.

when you create different flavours of artifacts (test, stage, prod) the best practice is to use profiles.

most likely it is only the project that needs certain custom settings, not the dependencies themselves. so i would use two repositories, one for snapshots, one for releases.

then i would create a build project with profiles to achieve the deployment on the different test/stage/prod platforms. (use assemblies, wagon, ant).

artifacts that live as dependencies (think log4j, junit) should not depend on a profile. since it may be diffucult to determine what jar actually was downloaded.

if you have
parent-pom
 - mod1 -> mod1.jar
 - mod2 -> mod2.jar
 - mod3 -> mod3.jar

i would add a module
 - mod4.built

which contains the specific settings

but in the end you are free to do what ever you like. i have never tried to put the <distributionManagement> section into a profile, nor to add some custom proerties within there. but i think you could do that.


regards

ossi




Baz schrieb:
Ossi, thanks for your reply.

Why are we using profile in this case? In
http://maven.apache.org/guides/mini/guide-multiple-repositories.html, it
seems like a standard pom.xml file that specify several repositories in
order. Thats all right?

Would you please give coding example for a simple implementation?

dev repo - a repo for developers to change things for testing.
stage and production repo - repos that controlled by release engineering
group.

search order - production, stage, then dev.

Thanks.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to