Why is the path to the artifact in aether-ant messed up on my Windows Slave?

215 Views Asked by At

I'm using aether-ant to resolve dependencies from a pom.xml file. When running the script on my jenkins master, then the path to the artifacts looks like:

stomp pl: C:\m2\be\mips\stomp-windows\1.0-SNAPSHOT\stomp-windows-1.0-SNAPSHOT.pl

However, when running it on a Windows Slave, it looks like:

stomp pl: C:\Windows\system32\config\systemprofile\.m2\repository\be\mips\stomp-windows\1.0-SNAPSHOT\stomp-windows-1.0-SNAPSHOT.pl

On both the jenkins master and the jenkins windows slave, the maven settings.xml file is picked up and all of the artifacts are download to C:\m2... But for some reason, on the Windows slave, the path isn't pointing to C:\m2...

The path C:\Windows\system32\config\systemprofile doesn't even exist.

Here's a snipped of my ant build script:

<!-- Read in the pom file. -->
<artifact:pom if:true="${windows}" id="pomId" file="pom-windows.xml" />
<artifact:pom if:true="${linux}" id="pomId" file="pom-linux.xml" />

<!-- Add  -->
<artifact:remoterepos id="all">
    <artifact:remoterepo refid="central"/>
    <!-- Define our remote nexus repo. -->
    <!-- Updates always forces aether to look for a new remote version. -->
    <artifact:remoterepo id="nexusRepo" 
                         url="${env.nexusRepoUrl}/${nexusSnapshotsRepoName}" 
                         updates="always">
        <snapshots enabled="true" />
    </artifact:remoterepo>
</artifact:remoterepos>

<!-- Resolve the dependencies from the pom file. -->
<artifact:resolve>
    <artifact:dependencies pomRef="pomId"/>
    <artifact:remoterepos refid="all"/>
    <!-- 
        For some reason, suddenly, on the Windows Slave, 
        the nexus.dep properties point to an unexisting folder....
     -->
    <artifact:properties prefix="nexus.dep."/>
</artifact:resolve>

The aether-ant project on github can be found at https://github.com/eclipse/aether-ant

I've googled around and found some entries saying that some windows registry entries could be pointing to the wrong directory... I don't know if that's related to this problem.

0

There are 0 best solutions below