You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maarten Volders <ma...@gmail.com> on 2007/06/07 09:17:55 UTC

1 artifact / environment VS 1 artifact / all environments (best practice? Artifact naming problem)

All,

One of the things that is very unclear to me is you should have 1 artifact /
environment (test, staging, prod, ...) or have 1 artifact which works on all
environments? I would like to hear from people who successfully tried one or
the other and have been using this for a while in production environments.

Also perhaps some info on what approach you would take implementing the one
of the other (artifact naming, build cycle, repos, artifact naming...)

I'm also dealing with a multi project structure.

If having 1 artifact / environment, how would you deal with the artifact
names in a multi module environment? Can something like below be done?

PARENT

<project>
    <groupId>test</groupId>
    <artifactId>test${env}</artifactId>
    <packaging>pom</packaging>
    <version>0.1.0-SNAPSHOT</version>

CHILD

<project>
    <parent>
        <artifactId>test${env}</artifactId>
        <groupId>test</groupId>
        <version>0.1.0-SNAPSHOT</version>
    </parent>

CHILD with dependencies

<dependencies>
        <dependency>
            <groupId>${pom.groupId}</groupId>
            <artifactId>aaa${env}</artifactId>
            <version>0.1.0-SNAPSHOT</version>
        </dependency>

And replacing ${env} by dev, test, prod ... but what about <version>
0.1.0-SNAPSHOT</version>,how do I deal with this? Or do I put the ${env} in
version instead of artifactid? And what about using the release mgmt plugin
in combination? As you see I'm totally confused about environment specific
artifacts :-)

Grtz