I created a web application in my Azure's portal with the intention of deploying the last jenkins.war. I followed all the necessary steps: repository cloning, uploading of the war renamed as ROOT.war and finally got it up and running.
Then I configured git, Maven and added a new job against a GitHub repository of mine.
The problem is that when the jobs starts to build, after checking out correctly from GitHub, I get the following error:
Checking out Revision 63d0972e8a96a1661c6875d5cb39544b18e5d39e (refs/remotes/origin/master)
> D:\Program Files (x86)\Git\bin\git.exe config core.sparsecheckout # timeout=10
> D:\Program Files (x86)\Git\bin\git.exe checkout -f 63d0972e8a96a1661c6875d5cb39544b18e5d39e
> D:\Program Files (x86)\Git\bin\git.exe rev-list 63d0972e8a96a1661c6875d5cb39544b18e5d39e # timeout=10
Parsing POMs
ERROR: Failed to create C:\.m2
Finished: FAILURE
It seems that by default it tries to create the .m2 folder in a place where it doesn't have r/w permission.
Ideally I could configure the settings.xml localRepository in the server to point somewhere else like(D:/.m2),
I found out that I can FTP into the server so I uploaded a settings.xml file and configured the global maven settings to point at that file.
/site/wwwroot/%HOME%/site/wwwroot/jenkins_home/jenkins.mvn.GlobalMavenConfig.xml:
<jenkins.mvn.GlobalMavenConfig>
<settingsProvider class="jenkins.mvn.FilePathSettingsProvider">
<path>D:\home\site\settings.xml</path>
</settingsProvider>
<globalSettingsProvider class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
</jenkins.mvn.GlobalMavenConfig>
/site/settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:/.m2</localRepository>
</settings>
However it still fails showing ERROR: Failed to create C:\.m2
.
Some help?