0

pom.xml ファイルから依存関係を解決するために aether-ant を使用しています。jenkins マスターでスクリプトを実行すると、アーティファクトへのパスは次のようになります。

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

ただし、Windows スレーブで実行すると、次のようになります。

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

jenkins マスターと jenkins Windows スレーブの両方で、maven の settings.xml ファイルが取得され、すべてのアーティファクトが C:\m2 にダウンロードされます... しかし、何らかの理由で、Windows スレーブでは、パスはそうではありませんC:\m2 を指しています...

パス C:\Windows\system32\config\systemprofile も存在しません。

これが私のantビルドスクリプトの一部です:

<!-- 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>

github の aether-ant プロジェクトは、https://github.com/eclipse/aether-antにあります。

グーグルで検索したところ、いくつかのWindowsレジストリエントリが間違ったディレクトリを指している可能性があるというエントリが見つかりました...それがこの問題に関連しているかどうかはわかりません.

4

0 に答える 0