我有Maven項目失敗時發佈:執行被稱爲,雖然釋放;準備按預期工作。maven-release-plugin:執行失敗,'工作目錄'... workspace target checkout workspace「不存在!'
我發現的bug報告(如下圖),這當然似乎像這個問題我有,但不能完全肯定我理解這個問題: MRELEASE516
輸出的最後幾行,我得到:
[INFO] Executing: cmd.exe /X /C "p4 -d E:\hudson\jobs\myHudsonJob\workspace\target\checkout -p 1.1.1.1:1111: client -d myProjectWorkspace-MavenSCM-E:\hudson\jobs\myHudsonJob\workspace\target\checkout"
[INFO] Executing goals 'deploy'...
[WARNING] Base directory is a file. Using base directory as POM location.
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing Maven.
Working directory "E:\hudson\jobs\myHudsonJob\workspace\target\checkout\workspace" does not exist!
從閱讀錯誤報告錯誤的原因可能是與我模塊的結構,我試着概括如下它:
/workspace | |+ pom.xml (root pom whose parent is the build pom, | calling release:perform on this pom) | [Modules: moduleA and moduleB] | |- moduleA |+ pom.xml (parent is also build pom) |+ build/pom.xml (the build pom - no custom parent) |- moduleB |+ pom.xml (parent is build pom)
似乎根目錄應該位於'工作區'內部的某個公共目錄中,但是嘗試過並且不起作用,對於爲什麼我需要它也沒有意義。
什麼是警告基地目錄是一個文件要我做的呢?!然後它會計算出基本目錄是工作區,這意味着找不到工作目錄...有什麼想法?
在此先感謝。
編輯:
檢查過SCM配置這一切看起來不錯,我...每個模塊中和根POM我:
<scm>
<connection>
scm:perforce:1.1.1.1:1111://rootToDirectoryContainingRelevantPom
</connection>
<developerConnection>
scm:perforce:1.1.1.1:1111://rootToDirectoryContainingRelevantPom
</developerConnection>
</scm>
編輯2:
也許我點擊了MRELEASE-261?
沒有你的poms的內容,很難說點什麼,並分析問題。另一方面,爲什麼你有這樣的結構(父級更深層次的pom)?moduleA是否有一個模塊部分用於構建? – khmarbaise 2010-05-10 16:29:21
我認爲其他poms的母公司的更深層次的原因是因爲我們的項目從moduleA開始,並且從那以後一直在增長。 – 2010-05-10 16:44:27