Build once, deploy everywhere

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Build once, deploy everywhere

Jan-2
Hi All,

Does anyone using Maven as Build Once and deploy Everywhere method? Like
lets say i don't want to recompile my source code everytime for different
environment DEV,SIT,UAT & PROD. I want to do my compile and package only at
DEV then deploy the artifact to all mentioned environment. Is this possible
using Maven, is there any reference any one could share with me Please.
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

stephenconnolly
What you want to do is have your packaged software be independent of the
environment it is deployed to. That way you know by checking the SHA1 of
the artifact you can know it was the one that was tested by QA.

So what you do is have your application read its configuration from an
external source.

One example is you could read the configuration from the JNDI environment
(if you are deploying in a JavaEE server). Thus you can setup the dev
environment with the DB servers, etc defined in JNDI and the same for QA,
PROD, etc

Another example is you could look for a .properties file on the classpath
or at a well known location (perhaps the user home or something like that)

The application should fail fast if any of the configuration settings are
missing to help diagnose issues.

There are many ways to skin this cat, but rebuilding an artifact for each
environment should be considered a critical anti-pattern

On 10 September 2014 15:03, Jan <[hidden email]> wrote:

> Hi All,
>
> Does anyone using Maven as Build Once and deploy Everywhere method? Like
> lets say i don't want to recompile my source code everytime for different
> environment DEV,SIT,UAT & PROD. I want to do my compile and package only at
> DEV then deploy the artifact to all mentioned environment. Is this possible
> using Maven, is there any reference any one could share with me Please.
>
Reply | Threaded
Open this post in threaded view
|

RE: Build once, deploy everywhere

cody.a.fyler
Both of the below are good solutions.

I've also seen folks use a run time based solution where a different set of properties is loaded based on an Environment Variable common to all servers.

Cody Fyler
Lending Grid Build Team
G=Lending Grid Builds
(515) – 441 - 0814

-----Original Message-----
From: Stephen Connolly [mailto:[hidden email]]
Sent: Wednesday, September 10, 2014 9:15 AM
To: Maven Users List
Subject: Re: Build once, deploy everywhere

What you want to do is have your packaged software be independent of the environment it is deployed to. That way you know by checking the SHA1 of the artifact you can know it was the one that was tested by QA.

So what you do is have your application read its configuration from an external source.

One example is you could read the configuration from the JNDI environment (if you are deploying in a JavaEE server). Thus you can setup the dev environment with the DB servers, etc defined in JNDI and the same for QA, PROD, etc

Another example is you could look for a .properties file on the classpath or at a well known location (perhaps the user home or something like that)

The application should fail fast if any of the configuration settings are missing to help diagnose issues.

There are many ways to skin this cat, but rebuilding an artifact for each environment should be considered a critical anti-pattern

On 10 September 2014 15:03, Jan <[hidden email]> wrote:

> Hi All,
>
> Does anyone using Maven as Build Once and deploy Everywhere method?
> Like lets say i don't want to recompile my source code everytime for
> different environment DEV,SIT,UAT & PROD. I want to do my compile and
> package only at DEV then deploy the artifact to all mentioned
> environment. Is this possible using Maven, is there any reference any one could share with me Please.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

stephenconnolly
The down side of that is that if your environment details for a specific
server change, then you need to rebuild.

If you are loading configuration from an external source then you just
update the external source and continue with the app as is.

On 10 September 2014 15:17, <[hidden email]> wrote:

> Both of the below are good solutions.
>
> I've also seen folks use a run time based solution where a different set
> of properties is loaded based on an Environment Variable common to all
> servers.
>
> Cody Fyler
> Lending Grid Build Team
> G=Lending Grid Builds
> (515) – 441 - 0814
>
> -----Original Message-----
> From: Stephen Connolly [mailto:[hidden email]]
> Sent: Wednesday, September 10, 2014 9:15 AM
> To: Maven Users List
> Subject: Re: Build once, deploy everywhere
>
> What you want to do is have your packaged software be independent of the
> environment it is deployed to. That way you know by checking the SHA1 of
> the artifact you can know it was the one that was tested by QA.
>
> So what you do is have your application read its configuration from an
> external source.
>
> One example is you could read the configuration from the JNDI environment
> (if you are deploying in a JavaEE server). Thus you can setup the dev
> environment with the DB servers, etc defined in JNDI and the same for QA,
> PROD, etc
>
> Another example is you could look for a .properties file on the classpath
> or at a well known location (perhaps the user home or something like that)
>
> The application should fail fast if any of the configuration settings are
> missing to help diagnose issues.
>
> There are many ways to skin this cat, but rebuilding an artifact for each
> environment should be considered a critical anti-pattern
>
> On 10 September 2014 15:03, Jan <[hidden email]> wrote:
>
> > Hi All,
> >
> > Does anyone using Maven as Build Once and deploy Everywhere method?
> > Like lets say i don't want to recompile my source code everytime for
> > different environment DEV,SIT,UAT & PROD. I want to do my compile and
> > package only at DEV then deploy the artifact to all mentioned
> > environment. Is this possible using Maven, is there any reference any
> one could share with me Please.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

Graham Leggett
In reply to this post by Jan-2
On 10 Sep 2014, at 10:03, Jan <[hidden email]> wrote:

> Does anyone using Maven as Build Once and deploy Everywhere method? Like
> lets say i don't want to recompile my source code everytime for different
> environment DEV,SIT,UAT & PROD. I want to do my compile and package only at
> DEV then deploy the artifact to all mentioned environment. Is this possible
> using Maven, is there any reference any one could share with me Please.

We do this extensively with maven, using the maven release plugin.

Our artifacts are in turn installable packages (rpms in our case, but could be deb, whatever) which get published into a yum repository.

The code is "promoted" from dev to test to higher environments by hard linking the packages into distinct yum repos, a yum repo for each environment.

The release created by the release plugin is built just once and promoted. The rpms are created using the rpm-maven-plugin.

Regards,
Graham
--


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

Jan-2
Thanks All.

My package is not environment specific, and currently i compile and package
using Maven, and run deployment using Ant, coz when i tried to run maven
deploy it was using the full life cycle goals again, instead of this is
there any way to execute just deploy and skip all other goals?


On Wed, Sep 10, 2014 at 9:26 AM, Graham Leggett <[hidden email]> wrote:

> On 10 Sep 2014, at 10:03, Jan <[hidden email]> wrote:
>
> > Does anyone using Maven as Build Once and deploy Everywhere method? Like
> > lets say i don't want to recompile my source code everytime for different
> > environment DEV,SIT,UAT & PROD. I want to do my compile and package only
> at
> > DEV then deploy the artifact to all mentioned environment. Is this
> possible
> > using Maven, is there any reference any one could share with me Please.
>
> We do this extensively with maven, using the maven release plugin.
>
> Our artifacts are in turn installable packages (rpms in our case, but
> could be deb, whatever) which get published into a yum repository.
>
> The code is "promoted" from dev to test to higher environments by hard
> linking the packages into distinct yum repos, a yum repo for each
> environment.
>
> The release created by the release plugin is built just once and promoted.
> The rpms are created using the rpm-maven-plugin.
>
> Regards,
> Graham
> --
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

Adrien Rivard
Hi,


You can always run mvn deploy:deploy, but the main point of deploy is not
to deploy applications but to deploy binaries into a Maven repository
manager (Nexus ..)

Deploying applications is traditionnally done via others specifics tools,
though a few maven plugins do that as well.



On Wed, Sep 10, 2014 at 5:07 PM, Jan <[hidden email]> wrote:

> Thanks All.
>
> My package is not environment specific, and currently i compile and package
> using Maven, and run deployment using Ant, coz when i tried to run maven
> deploy it was using the full life cycle goals again, instead of this is
> there any way to execute just deploy and skip all other goals?
>
>
> On Wed, Sep 10, 2014 at 9:26 AM, Graham Leggett <[hidden email]> wrote:
>
> > On 10 Sep 2014, at 10:03, Jan <[hidden email]> wrote:
> >
> > > Does anyone using Maven as Build Once and deploy Everywhere method?
> Like
> > > lets say i don't want to recompile my source code everytime for
> different
> > > environment DEV,SIT,UAT & PROD. I want to do my compile and package
> only
> > at
> > > DEV then deploy the artifact to all mentioned environment. Is this
> > possible
> > > using Maven, is there any reference any one could share with me Please.
> >
> > We do this extensively with maven, using the maven release plugin.
> >
> > Our artifacts are in turn installable packages (rpms in our case, but
> > could be deb, whatever) which get published into a yum repository.
> >
> > The code is "promoted" from dev to test to higher environments by hard
> > linking the packages into distinct yum repos, a yum repo for each
> > environment.
> >
> > The release created by the release plugin is built just once and
> promoted.
> > The rpms are created using the rpm-maven-plugin.
> >
> > Regards,
> > Graham
> > --
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>



--
Adrien Rivard
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

Jason van Zyl-6
In reply to this post by Jan-2
Yes, this is the only thing I've ever done. Unfortunately all the JEE specs don't seem to be well thought out in this regard.

For a given runtime the model I use is one where there is a launcher, a binary part (libs and app), and configuration. I combine these three things to make a working runtime. I may launch in an IDE vs a production system (using JSW, daemon tools, shell scripts), and configurations are going to be different for all environments especially dev vs production, but the binary part remains constant.

The launcher for your production environments should be fairly regular as well, so it is really only your configuration that changes. To deal with configuration I generally package templates in JARs, and while being extracted I filter them against a known set of variables.

This is how I construct Facebook's Presto server: https://github.com/facebook/presto/blob/master/presto-server/src/main/provisio/presto.xml

Under the launcher section there is the configuration as well. We're adjusting how the server is constructed but you get the idea.

On Sep 10, 2014, at 10:03 AM, Jan <[hidden email]> wrote:

> Hi All,
>
> Does anyone using Maven as Build Once and deploy Everywhere method? Like
> lets say i don't want to recompile my source code everytime for different
> environment DEV,SIT,UAT & PROD. I want to do my compile and package only at
> DEV then deploy the artifact to all mentioned environment. Is this possible
> using Maven, is there any reference any one could share with me Please.

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

believe nothing, no matter where you read it,
or who has said it,
not even if i have said it,
unless it agrees with your own reason
and your own common sense.

 -- Buddha









Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

stephenconnolly
In reply to this post by Jan-2
you could look at my attempt to work around that: ship-maven-plugin @
codehaus

On 10 September 2014 16:07, Jan <[hidden email]> wrote:

> Thanks All.
>
> My package is not environment specific, and currently i compile and package
> using Maven, and run deployment using Ant, coz when i tried to run maven
> deploy it was using the full life cycle goals again, instead of this is
> there any way to execute just deploy and skip all other goals?
>
>
> On Wed, Sep 10, 2014 at 9:26 AM, Graham Leggett <[hidden email]> wrote:
>
> > On 10 Sep 2014, at 10:03, Jan <[hidden email]> wrote:
> >
> > > Does anyone using Maven as Build Once and deploy Everywhere method?
> Like
> > > lets say i don't want to recompile my source code everytime for
> different
> > > environment DEV,SIT,UAT & PROD. I want to do my compile and package
> only
> > at
> > > DEV then deploy the artifact to all mentioned environment. Is this
> > possible
> > > using Maven, is there any reference any one could share with me Please.
> >
> > We do this extensively with maven, using the maven release plugin.
> >
> > Our artifacts are in turn installable packages (rpms in our case, but
> > could be deb, whatever) which get published into a yum repository.
> >
> > The code is "promoted" from dev to test to higher environments by hard
> > linking the packages into distinct yum repos, a yum repo for each
> > environment.
> >
> > The release created by the release plugin is built just once and
> promoted.
> > The rpms are created using the rpm-maven-plugin.
> >
> > Regards,
> > Graham
> > --
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

RE: Build once, deploy everywhere

mgainty
In reply to this post by cody.a.fyler




> From: [hidden email]
> To: [hidden email]
> Subject: RE: Build once, deploy everywhere
> Date: Wed, 10 Sep 2014 14:17:25 +0000
>
> �Both of the below are good solutions.
>
> I've also seen folks use a run time based solution where a different set of properties is loaded based on an Environment Variable common to all servers.
MG>one example could be %HOMEPATH%/.m2/repository/settings.xml IMHO
MG>can your provide example of properties loaded thru a environment variable?

>
> Cody Fyler
> Lending Grid Build Team
> G=Lending Grid Builds
> (515) – 441 - 0814
>
> -----Original Message-----
> From: Stephen Connolly [mailto:[hidden email]]
> Sent: Wednesday, September 10, 2014 9:15 AM
> To: Maven Users List
> Subject: Re: Build once, deploy everywhere
>
> What you want to do is have your packaged software be independent of the environment it is deployed to. That way you know by checking the SHA1 of the artifact you can know it was the one that was tested by QA.
>
> So what you do is have your application read its configuration from an external source.
>
> One example is you could read the configuration from the JNDI environment (if you are deploying in a JavaEE server). Thus you can setup the dev environment with the DB servers, etc defined in JNDI and the same for QA, PROD, etc
>
> Another example is you could look for a .properties file on the classpath or at a well known location (perhaps the user home or something like that)
>
> The application should fail fast if any of the configuration settings are missing to help diagnose issues.
>
> There are many ways to skin this cat, but rebuilding an artifact for each environment should be considered a critical anti-pattern
>
> On 10 September 2014 15:03, Jan <[hidden email]> wrote:
>
> > Hi All,
> >
> > Does anyone using Maven as Build Once and deploy Everywhere method?
> > Like lets say i don't want to recompile my source code everytime for
> > different environment DEV,SIT,UAT & PROD. I want to do my compile and
> > package only at DEV then deploy the artifact to all mentioned
> > environment. Is this possible using Maven, is there any reference any one could share with me Please.
> >
> �Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âW6W'2�V�7V'67&�&T�fV��6�R��&pФf�"FF�F����6����G2�R���âW6W'2ֆV��fV��6�R��&p
     
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

james northrup
(http://)   12factor.net lean service deployment works well enough with
maven projects if the presence of source is not a detriment to a given sla.
 I use

git pull;mvn install;bin/run.sh

when transitioning to production from development and I agree with 12factor
apps about ENV vars being a pretty good way to configure a service

On Wed, Sep 10, 2014 at 11:25 AM, Martin Gainty <[hidden email]> wrote:

>
>
>
>
> > From: [hidden email]
> > To: [hidden email]
> > Subject: RE: Build once, deploy everywhere
> > Date: Wed, 10 Sep 2014 14:17:25 +0000
> >
> > �Both of the below are good solutions.
> >
> > I've also seen folks use a run time based solution where a different set
> of properties is loaded based on an Environment Variable common to all
> servers.
> MG>one example could be %HOMEPATH%/.m2/repository/settings.xml IMHO
> MG>can your provide example of properties loaded thru a environment
> variable?
> >
> > Cody Fyler
> > Lending Grid Build Team
> > G=Lending Grid Builds
> > (515) – 441 - 0814
> >
> > -----Original Message-----
> > From: Stephen Connolly [mailto:[hidden email]]
> > Sent: Wednesday, September 10, 2014 9:15 AM
> > To: Maven Users List
> > Subject: Re: Build once, deploy everywhere
> >
> > What you want to do is have your packaged software be independent of the
> environment it is deployed to. That way you know by checking the SHA1 of
> the artifact you can know it was the one that was tested by QA.
> >
> > So what you do is have your application read its configuration from an
> external source.
> >
> > One example is you could read the configuration from the JNDI
> environment (if you are deploying in a JavaEE server). Thus you can setup
> the dev environment with the DB servers, etc defined in JNDI and the same
> for QA, PROD, etc
> >
> > Another example is you could look for a .properties file on the
> classpath or at a well known location (perhaps the user home or something
> like that)
> >
> > The application should fail fast if any of the configuration settings
> are missing to help diagnose issues.
> >
> > There are many ways to skin this cat, but rebuilding an artifact for
> each environment should be considered a critical anti-pattern
> >
> > On 10 September 2014 15:03, Jan <[hidden email]> wrote:
> >
> > > Hi All,
> > >
> > > Does anyone using Maven as Build Once and deploy Everywhere method?
> > > Like lets say i don't want to recompile my source code everytime for
> > > different environment DEV,SIT,UAT & PROD. I want to do my compile and
> > > package only at DEV then deploy the artifact to all mentioned
> > > environment. Is this possible using Maven, is there any reference any
> one could share with me Please.
> > >
> >
> �Т���������������������������������������������������������������������ХF�
> V�7V'67&�&R� R�� �â W6W'2�V�7V'67&�&T � fV��   6�R��&pФf�"  FF�F��� � 6���
> �G2� R�� �â W6W'2ֆV�  � fV��   6�R��&p
>




--
Jim Northrup  *  (408) 837-2270 *
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

Baptiste MATHUS
In reply to this post by Jan-2
*that* deploy has actually nothing to do with the deploy you want. It's
only and specifically designed to push a binary produced by the building
process to some maven repository manager (say archiva, nexus or artifactory
for example).

2014-09-10 17:07 GMT+02:00 Jan <[hidden email]>:

> Thanks All.
>
> My package is not environment specific, and currently i compile and package
> using Maven, and run deployment using Ant, coz when i tried to run maven
> deploy it was using the full life cycle goals again, instead of this is
> there any way to execute just deploy and skip all other goals?
>
>
> On Wed, Sep 10, 2014 at 9:26 AM, Graham Leggett <[hidden email]> wrote:
>
> > On 10 Sep 2014, at 10:03, Jan <[hidden email]> wrote:
> >
> > > Does anyone using Maven as Build Once and deploy Everywhere method?
> Like
> > > lets say i don't want to recompile my source code everytime for
> different
> > > environment DEV,SIT,UAT & PROD. I want to do my compile and package
> only
> > at
> > > DEV then deploy the artifact to all mentioned environment. Is this
> > possible
> > > using Maven, is there any reference any one could share with me Please.
> >
> > We do this extensively with maven, using the maven release plugin.
> >
> > Our artifacts are in turn installable packages (rpms in our case, but
> > could be deb, whatever) which get published into a yum repository.
> >
> > The code is "promoted" from dev to test to higher environments by hard
> > linking the packages into distinct yum repos, a yum repo for each
> > environment.
> >
> > The release created by the release plugin is built just once and
> promoted.
> > The rpms are created using the rpm-maven-plugin.
> >
> > Regards,
> > Graham
> > --
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;!
>
Reply | Threaded
Open this post in threaded view
|

RE: Build once, deploy everywhere

mgainty
In reply to this post by james northrup
PortBinding:
different services in the computer which needs to send and receive data are uniquely identified by PORT no.

I would like to see an example implementation of this

Thanks James,

> From: [hidden email]
> Date: Wed, 10 Sep 2014 11:49:30 -0700
> Subject: Re: Build once, deploy everywhere
> To: [hidden email]
>
> (http://)   12factor.net lean service deployment works well enough with
> maven projects if the presence of source is not a detriment to a given sla.
>  I use
>
> git pull;mvn install;bin/run.sh
>
> when transitioning to production from development and I agree with 12factor
> apps about ENV vars being a pretty good way to configure a service
>
> On Wed, Sep 10, 2014 at 11:25 AM, Martin Gainty <[hidden email]> wrote:
>
> >
> >
> >
> >
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: RE: Build once, deploy everywhere
> > > Date: Wed, 10 Sep 2014 14:17:25 +0000
> > >
> > > �Both of the below are good solutions.
> > >
> > > I've also seen folks use a run time based solution where a different set
> > of properties is loaded based on an Environment Variable common to all
> > servers.
> > MG>one example could be %HOMEPATH%/.m2/repository/settings.xml IMHO
> > MG>can your provide example of properties loaded thru a environment
> > variable?
> > >
> > > Cody Fyler
> > > Lending Grid Build Team
> > > G=Lending Grid Builds
> > > (515) – 441 - 0814
> > >
> > > -----Original Message-----
> > > From: Stephen Connolly [mailto:[hidden email]]
> > > Sent: Wednesday, September 10, 2014 9:15 AM
> > > To: Maven Users List
> > > Subject: Re: Build once, deploy everywhere
> > >
> > > What you want to do is have your packaged software be independent of the
> > environment it is deployed to. That way you know by checking the SHA1 of
> > the artifact you can know it was the one that was tested by QA.
> > >
> > > So what you do is have your application read its configuration from an
> > external source.
> > >
> > > One example is you could read the configuration from the JNDI
> > environment (if you are deploying in a JavaEE server). Thus you can setup
> > the dev environment with the DB servers, etc defined in JNDI and the same
> > for QA, PROD, etc
> > >
> > > Another example is you could look for a .properties file on the
> > classpath or at a well known location (perhaps the user home or something
> > like that)
> > >
> > > The application should fail fast if any of the configuration settings
> > are missing to help diagnose issues.
> > >
> > > There are many ways to skin this cat, but rebuilding an artifact for
> > each environment should be considered a critical anti-pattern
> > >
> > > On 10 September 2014 15:03, Jan <[hidden email]> wrote:
> > >
> > > > Hi All,
> > > >
> > > > Does anyone using Maven as Build Once and deploy Everywhere method?
> > > > Like lets say i don't want to recompile my source code everytime for
> > > > different environment DEV,SIT,UAT & PROD. I want to do my compile and
> > > > package only at DEV then deploy the artifact to all mentioned
> > > > environment. Is this possible using Maven, is there any reference any
> > one could share with me Please.
> > > >
> > >
> > �Т���������������������������������������������������������������������ХF�
> > V�7V'67&�&R� R�� �â W6W'2�V�7V'67&�&T � fV��   6�R��&pФf�"  FF�F��� � 6���
> > �G2� R�� �â W6W'2ֆV�  � fV��   6�R��&p
> >
>
>
>
>
> --
> Jim Northrup  *  (408) 837-2270 *
     
Reply | Threaded
Open this post in threaded view
|

Re: Build once, deploy everywhere

james northrup
Martin i use
https://github.com/jnorthrup/1xio/blob/master/src/main/java/one/xio/Config.java
in several projects to have configs close to source but based on defaults
overriden by -D commandline and environment.

as far as a key value pair of port:role, sounds too coupled to me, would
rather just say main specifies port and role and leave it to bash scripts
to orchestrate the mess

On Wed, Sep 10, 2014 at 2:41 PM, Martin Gainty <[hidden email]> wrote:

> PortBinding:
> different services in the computer which needs to send and receive data
> are uniquely identified by PORT no.
>
> I would like to see an example implementation of this
>
> Thanks James,
>
> > From: [hidden email]
> > Date: Wed, 10 Sep 2014 11:49:30 -0700
> > Subject: Re: Build once, deploy everywhere
> > To: [hidden email]
> >
> > (http://)   12factor.net lean service deployment works well enough with
> > maven projects if the presence of source is not a detriment to a given
> sla.
> >  I use
> >
> > git pull;mvn install;bin/run.sh
> >
> > when transitioning to production from development and I agree with
> 12factor
> > apps about ENV vars being a pretty good way to configure a service
> >
> > On Wed, Sep 10, 2014 at 11:25 AM, Martin Gainty <[hidden email]>
> wrote:
> >
> > >
> > >
> > >
> > >
> > > > From: [hidden email]
> > > > To: [hidden email]
> > > > Subject: RE: Build once, deploy everywhere
> > > > Date: Wed, 10 Sep 2014 14:17:25 +0000
> > > >
> > > > �Both of the below are good solutions.
> > > >
> > > > I've also seen folks use a run time based solution where a different
> set
> > > of properties is loaded based on an Environment Variable common to all
> > > servers.
> > > MG>one example could be %HOMEPATH%/.m2/repository/settings.xml IMHO
> > > MG>can your provide example of properties loaded thru a environment
> > > variable?
> > > >
> > > > Cody Fyler
> > > > Lending Grid Build Team
> > > > G=Lending Grid Builds
> > > > (515) – 441 - 0814
> > > >
> > > > -----Original Message-----
> > > > From: Stephen Connolly [mailto:[hidden email]]
> > > > Sent: Wednesday, September 10, 2014 9:15 AM
> > > > To: Maven Users List
> > > > Subject: Re: Build once, deploy everywhere
> > > >
> > > > What you want to do is have your packaged software be independent of
> the
> > > environment it is deployed to. That way you know by checking the SHA1
> of
> > > the artifact you can know it was the one that was tested by QA.
> > > >
> > > > So what you do is have your application read its configuration from
> an
> > > external source.
> > > >
> > > > One example is you could read the configuration from the JNDI
> > > environment (if you are deploying in a JavaEE server). Thus you can
> setup
> > > the dev environment with the DB servers, etc defined in JNDI and the
> same
> > > for QA, PROD, etc
> > > >
> > > > Another example is you could look for a .properties file on the
> > > classpath or at a well known location (perhaps the user home or
> something
> > > like that)
> > > >
> > > > The application should fail fast if any of the configuration settings
> > > are missing to help diagnose issues.
> > > >
> > > > There are many ways to skin this cat, but rebuilding an artifact for
> > > each environment should be considered a critical anti-pattern
> > > >
> > > > On 10 September 2014 15:03, Jan <[hidden email]> wrote:
> > > >
> > > > > Hi All,
> > > > >
> > > > > Does anyone using Maven as Build Once and deploy Everywhere method?
> > > > > Like lets say i don't want to recompile my source code everytime
> for
> > > > > different environment DEV,SIT,UAT & PROD. I want to do my compile
> and
> > > > > package only at DEV then deploy the artifact to all mentioned
> > > > > environment. Is this possible using Maven, is there any reference
> any
> > > one could share with me Please.
> > > > >
> > > >
> > >
> �Т���������������������������������������������������������������������ХF�
> > > V�7V'67&�&R� R�� �â W6W'2�V�7V'67&�&T � fV��   6�R��&pФf�"  FF�F��� �
> 6���
> > > �G2� R�� �â W6W'2ֆV�  � fV��   6�R��&p
> > >
> >
> >
> >
> >
> > --
> > Jim Northrup  *  (408) 837-2270 *
>
>



--
Jim Northrup  *  (408) 837-2270 *