Saturday, March 23, 2013

Environment variables and Maven

Recently, due to security restrictions, like others, I lost the VPN access to my office.

I was  still able to access to our source code repository from the outside, but VPN provided me a remote access to our internal artifacts repository (Apache Archiva), and thus the same conditions to develop remotely  (compile, deploy, release) that I have at work.

The workaround I found to continue to work nearly as before was the following:

1) Install Archiva on my workstation. It was a good occasion for me to use Puppet for that.

2) Import (tar cf / xf) artifacts required (not rebuildable, what I call "postulate artifacts") in this Archiva instance.

3) Use environment variables pointing to an artifact repository in my setup.xml (local to each development environment) and in all of our projects pom.xml (in SVN). For instance:




Obviously, A_HOST and A_PORT must be defined in all development environments (cli, Maven, Jenkins, IDEs) , but this is not a big deal. 

The only thing I lost comparing to the VPN way was the access to THE company repository, allowing me to deploy or release versions remotely, but this is no surprise ...

No comments:

Post a Comment

Please, enter your comments bellow