Hi all.

I have a web app that I need to build for deployment on different
tomcat instances (production and test). To achieve this I use
profiles; I use different properties files depending on the profile
that was used for building. This works great.

Now, the problem I have is that in addition to deploying to a tomcat
instance, I also would like to deploy the generated war file to our
artifact repository;

mvn -Pprod deploy

This also works great, but a new requirement is that we want one
artifact in the repository for the test environment and one for
production. This is where the problem arises. Although I am able to
use the <finalName> property in each profile to set the name of the
war file that ends up in the target folder, this does not affect the
name that is used on the artifact when it is deployed using "mvn
-Pprod deploy". The effect is that we are not able to distinguish the
artifacts in the repository that was built using the test profile from
those built using the production profile.

And now for the question; is it possible to alter the name of the
artifact that ends up in the repository based on the profile that was
used when deploying it? If not, does anybody have a tip to how I can
go about achieving what we want in other ways? I though about using
different repositories for test and production, but this seems
sub-optimal.

Any help would be greatly appreciated!

Regards, Bent.

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

Reply via email to