Description of problem: My Jenkins cartridge is unable to create its ~/.m2/repository directory, which also cannot be created over SSH(access denied) Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create standalone Jenkins cartridge 2. Log into jenkins on this cartridge, create a new project to be built. Provide access to a valid git repository with a maven repo for the project. 3. Install the JDK and maven as follows: a. SCP the tarballs for JDK 7u45 and latest Maven version to ~/jenkins/data b. Extract packages, and give Jenkins the locations to which the packages were extracted. 4. Run a Maven-enabled job in Jenkins. Observe its successfully calling JDK and Maven commands(proving it can find and run them). Observe Maven command giving error that it cannot create a repo at ~/.m2 5. Attempt to change the location to which Maven will write its repo with its settings.xml or command-line options in Jenkins. This has no effect. Actual results: Maven unconditionally uses the unusable location ~/.m2 for its repository. This directory does not exist and it cannot be created with mkdir ("Access denied" message) Expected results: ~/.m2 is writeable and can be created(contingent on disk quota). Additional info: As far as I can tell, this is a showstopper for Maven builds using the Jenkins cartridge short of recompiling Jenkins with changes, as the latter does not allow overriding the location passed to Maven. The cartridge is new, only a day old. It was created standalone, not by adding jenkins to an existing cartridge, but is not the first application on the domain. Disk quotas: [jenkins-mosstest.rhcloud.com 52646f325973ca65bb000260]\> quota Disk quotas for user 52646f325973ca65bb000260 (uid 6210): Filesystem blocks quota limit grace files quota limit grace /dev/mapper/EBSStore01-user_home01 411560 0 1048576 6337 0 40000 [jenkins-mosstest.rhcloud.com 52646f325973ca65bb000260]\> quota -s Disk quotas for user 52646f325973ca65bb000260 (uid 6210): Filesystem blocks quota limit grace files quota limit grace /dev/mapper/EBSStore01-user_home01 402M 0 1024M 6337 0 40000
Is your cartridge code available for public review? You should be able to create the ~/.m2 directory during the setup or install scripts for the cartridge. The current JBoss cartridges have examples of this: https://github.com/openshift/origin-server/blob/stage/cartridges/openshift-origin-cartridge-jbossas/bin/setup#L9
Jhon: I am not using my own cartridge. Using my own I can create ~/.m2 just fine. The problem is that the Jenkins cartridge should really be creating this folder itself due to Jenkins' close interaction with Maven.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/ba8b89a38d351addf96258040d61a0d987ffd9d6 Bug 1021722 - Create ~/.m2 for all jenkins gears
Tested on devenv_3939. The folder ".m2" will be created successfully. App build will not meet those errors. Make the bug as verified.