0

We are using Maven as our build tool. Currently we have DEV , TEST , QA environments. Our application is using JSF framework.

What is the best practice to version the Application Jars ,Common module Jars in different environments. DEV - D-0.1-Snapshots
TEST - T-0.1-Snapshots QA - QA-0.1-Snapshots

Thanks Vijay

user684434
  • 1,165
  • 2
  • 19
  • 39

3 Answers3

1

If you are set on having different artifacts for different environments (probably not the best idea), you could generate different versions by using different profiles, and have the maven-compiler-plugin use a classifier for each environment. Not sure I'd go this route, but if you have to, you could potentially do that.

Michael
  • 6,141
  • 2
  • 20
  • 21
0

Quite often the libraries aren't labelled with the environment name. The reason for this is that you probably want to gradually promote the same version through each of your environments until they are live. So you could have:

  • project-1.3 in development
  • project-1.2 in test
  • project-1.1 in qa
  • project-1.0 in production
Jamie McCrindle
  • 9,114
  • 6
  • 43
  • 48
0

@Michaels idea of using a classifier is the way to go.
See http://maven.apache.org/guides/mini/guide-building-for-different-environments.html

When looking at the final artifact, the name should tell you 3 main facts (myApp-1.2-prod) :

  1. Application name : myApp
  2. Application version : 1.2
  3. Application configuration : prod (this is the classifier)

In the past I've also used assemblies to package the different artifact configurations.

crowne
  • 8,456
  • 3
  • 35
  • 50