aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven deploy dependencies using sudo account on Linux/Unix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven deploy dependencies using sudo account on Linux/Unix" Watch "Maven deploy dependencies using sudo account on Linux/Unix" New topic
Author

Maven deploy dependencies using sudo account on Linux/Unix

Rahul V Dixit
Greenhorn

Joined: Jan 22, 2009
Posts: 6
Hi,
I am relatively new to Maven and Linux as well. I was trying to set up a maven repository for all the dependencies for the java projects we have and so that the entire can use same version of the dependencies and we will just have share the pom.xml (on svn).

The repository needs to be created on a nfs mount drive on a Linux box (Server#1) at ~/maven/repository

To access Server#1 we use our AD user and password and then su to a user appuser. Though this appuser does not have a password and it asks for the sudo password for the AD user and each AD user is added to sudoers file.
All our build processes need to be run using the appuser. At the moment we are trying to deploy the dependencies and the deploy goal asks for password which scp(ing) to the Server#1.
Is there a way we can by pass this? We have already tried creating rsa keys for server and the client machine though of no use. Here is how I have created the server node in the settings.xml file



Please suggest how can this be done in case we want to continue using same security modes of having users login to linux machine using the AD user/password and su to an account with no password.

Thanks,
Rahul


[Thumbnail for settingsxml.JPG]

E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Use artifactory or nexus to share dependencies.
Use a parent pom to fix the versions.
Use jenkins/hudson to do the deploys.

So, all the developers need to do is write codes, test it, and commit it. The build tool can then take care of the deployments using one build tool user account.
Rahul V Dixit
Greenhorn

Joined: Jan 22, 2009
Posts: 6
Thanks E Armitage.

Currently we do not have approval for installing any file server like artifactory or nexus and getting that approved will take a long time due to involved stakeholders and the security policies of the organization.

Is there a way we can manage this on existing linux host till the time we get any of the above approved for use.

Thanks,
Rahul
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Without the tools that Armitage listed all you are left with is file sharing which will be a complete disaster if you have more than 2 developers (and even with only two it might still be a disaster). Don't spent a lot of time trying to come up with a solution that doesn't work, but rather get your manager to push the approvals through ASAP.

By the way, until the approvals go through, do you have a spare machine anywhere, or even a VM? You can always install the tools there until the official machines are approved.


JBoss In Action
Rahul V Dixit
Greenhorn

Joined: Jan 22, 2009
Posts: 6
Thanks Peter, I will do it that way. I do have a spare VM with me where I can install those for the moment till approvals go through. Just wanted to confirm if those are the ways to do things so that I can convince my manager about it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven deploy dependencies using sudo account on Linux/Unix