You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeff <pr...@gmail.com> on 2011/11/19 00:15:08 UTC

wsimport with multiple environments...

We have a number of environments for our web applications and
services (dev, stage, live) that not only require different configurations,
but also require us to run wsimport against a similarly environment
specific web service to generate the java client files required during
build.

What continues to be painful is how to manage the builds for these
environment-specific things and hoped someone had better ideas than I have,
particularly in the CI pipeline progression.

Most web applications I see load 'config.properties' that is overwritten
with an environment-specific file at deploy-time.  E.g., if in 'dev', then
copy config-dev.properties to config.properties.  Our old ANT project would
explode the WAR and copy the configs for the target environment during
deploy, but this feels yucky as the artifact is not the same as the one
that was built.

Our current setup requires a lot of manual intervention and is mostly ANT
based.  I"m looking at converting to Maven and have one of our core
projects building in Maven and running wsimport during the build, but it is
currently statically pointed to the wsimport web service for dev.

I don't know how cleanly use Maven to manage the various wsimports and all
the configs without generating all sorts of artifacts, assuming it is
possible.

Has anyone been successful at doing this?

Is it possible to just include literally *all* environment-specific config
files and wsimport artifacts in one bundle and just dynamically load the
correct one at run-time based on some setting or host or domain name?

Thanks!

-- 
Jeff Vincent
predatorvi@gmail.com
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!

Re: wsimport with multiple environments...

Posted by Ron Wheeler <rw...@artifact-software.com>.
This is a recurring discussion. Almost everyone has this problem in one 
form or another.

IMO the best thing to do is to remove all deployment stuff from development.
In general, deployment configuration is the responsibility of the system 
administrator not the developer.

http://blog.artifact-software.com/tech/?p=58 describes how we do this.

If you describe your target deployment architectures, you might get some 
input from others who have solved this problem in your environment.

You might also search the archives to find previous discussions.

Ron


On 18/11/2011 6:15 PM, Jeff wrote:
> We have a number of environments for our web applications and
> services (dev, stage, live) that not only require different configurations,
> but also require us to run wsimport against a similarly environment
> specific web service to generate the java client files required during
> build.
>
> What continues to be painful is how to manage the builds for these
> environment-specific things and hoped someone had better ideas than I have,
> particularly in the CI pipeline progression.
>
> Most web applications I see load 'config.properties' that is overwritten
> with an environment-specific file at deploy-time.  E.g., if in 'dev', then
> copy config-dev.properties to config.properties.  Our old ANT project would
> explode the WAR and copy the configs for the target environment during
> deploy, but this feels yucky as the artifact is not the same as the one
> that was built.
>
> Our current setup requires a lot of manual intervention and is mostly ANT
> based.  I"m looking at converting to Maven and have one of our core
> projects building in Maven and running wsimport during the build, but it is
> currently statically pointed to the wsimport web service for dev.
>
> I don't know how cleanly use Maven to manage the various wsimports and all
> the configs without generating all sorts of artifacts, assuming it is
> possible.
>
> Has anyone been successful at doing this?
>
> Is it possible to just include literally *all* environment-specific config
> files and wsimport artifacts in one bundle and just dynamically load the
> correct one at run-time based on some setting or host or domain name?
>
> Thanks!
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102