maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Sawatzky <jeff.sawat...@locationary.com>
Subject Re: multiple environment build and dependency management
Date Wed, 01 Aug 2012 22:50:58 GMT
Ron, thanks for the reply. However, I've read the links you provided and I'm not sure if they
help.  Also, when I said "and C and something that uses the data store" I meant "and C IS
something that uses the data store". So I only have three projects, A,B, and C. Not sure if
that changes your response any. I will try to re-word my question to see if it helps at all...


We have different branches, one for each step in our release cycle:

- "Feature Branch": this branch is the branch where the developer works on the actual feature,
and it is branched off of the last release branch.

- dev: this branch is the "continuous integration branch" that the feature branch gets merged
into once the feature is complete. If any issues are found, the feature will be reopened and
sent back to the developer to fix in the feature branch.

- qa: this is the "test" branch that the feature branch will get merged into once all kinks
have been worked out in the dev branch. If any issues are found, the feature will be reopened
and sent back to the developer to fix in the feature branch.

- staging: this is the "staging" branch that the feature branch will get merged into once
all kinks have been worked out in the qa branch. By now all kinks should have been worked
out and this is just a safety check before sending out to production, but if any issues are
found then it is reopened and sent back to the developer to fix in the feature branch.

- demo: this is outside of the normal release cycle and is where we merge features that the
CEO wants to demo before they are fully ready


We have a different environment for each branch. I want to be able to deploy specific builds
of each branch to the environment automatically. I am trying to get something working where
the dependencies for each branch look like:

dev: A-1.0-dev-SNAPSHOT <-- B-1.0-dev-SNAPSHOT <-- C-1.0-dev-SNAPSHOT

qa: A-1.0-qa-SNAPSHOT <-- B-1.0-qa-SNAPSHOT <-- C-1.0-qa-SNAPSHOT

demo: A-1.0-demo-SNAPSHOT <-- B-1.0-demo-SNAPSHOT <-- C-1.0-demo-SNAPSHOT

staging: A-1.0.1.1 <-- B-1.0.1.1<-- C-1.0.1.1


I am currently trying to accomplish this by passing a -Dbranch=<branch> and then have
profiles for each branch (activated by the branch property) which specify the version to use.
This doesn't seem to be working the way I want though, and was wondering if I am going about
this the wrong way, and if so, what is the correct way?


Thanks again,
Jeff.


On 2012-07-20, at 11:54 AM, Ron Wheeler <rwheeler@artifact-software.com> wrote:

> Everybody has this problem, once they get to the first release of their application.
> 
> You can find lots of discussions about this in the forum archives.
> 
> Google is your friend as well.
> 
> Profiles are not the way to handle this.
> 
> Separate the code from environment.
> 
> Make A, B C and "something that uses the data store" without environment stuff.
> 
> Make a separate project for Dev that contains the Dev environment configuration and depends
on "something that uses the data store".jar  that includes A, B and C.
> Same for the rest(test,  production, etc.)
> These will have no code and just configuration files.
> 
> Use JNDI or some other method of communicating environment variables.
> 
> http://blog.artifact-software.com/tech/?p=150
> 
> http://blog.artifact-software.com/tech/?p=58
> 
> Ron
> 
> 
> On 20/07/2012 11:08 AM, Jeff Sawatzky wrote:
>> I have multiple projects, lets call them A, B, and C. A is a util project, B is the
data store layer, and C and something that uses the data store. So, A depends on nothing,
B depends on A, and C depends on B. I am also trying to create multiple builds for different
environments, dev, test, production, and have created related profiles in each project for
each build and specify the dependencies in those profiles. For instance, B-dev-SNAPSHOP depends
on A-dev-SNAPSHOT, and C-dev-SNAPSHOT depends on B-dev-SNAPSHOT. And I specify the environment
through a system property.
>> 
>> The problem I am running into is that when I build C, it includes the dev profile
and adds B-dev-SNAPSHOT as a dependency, but the environment system property doesn't seem
to get passed to the pom of B-dev-SNAPSHOT and therefore the A-dev-SNAPSHOT dependency isn't
included.
>> 
>> Am I going about this the wrong way?
>> 
>> Thanks,
>> Jeff.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
> 
> 
> -- 
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message