views:

362

answers:

2

Hi,

I have maven project that fails when release:perform is called, though release;prepare works as expected.

I have found the bug report (below) which certainly seems to resemble the issue I have but not entirely sure I understand the problem: MRELEASE516

The last few lines of output I get:

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

From reading the bug report the possible cause of the error is related to my modules' structure, I've tried to outline it below:

/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)

It seems that the root pom should be in some common directory inside 'workspace' from the error but tried that and doesn't work, nor make sense as to why I need it.

What does the warning Base directory is a file want me to do instead?! It then figures that the base directory is workspace which then means the working directory is not found...any ideas?

Thanks in advance.

EDIT:

Having checked the SCM configuration it all looks ok to me...in each module and the root pom I have:

<scm>
<connection>
    scm:perforce:1.1.1.1:1111://rootToDirectoryContainingRelevantPom
</connection>
<developerConnection>
    scm:perforce:1.1.1.1:1111://rootToDirectoryContainingRelevantPom
</developerConnection>
</scm>

EDIT 2:

Maybe I have hit MRELEASE-261?

A: 

I'm not sure you're facing MRELEASE-516 (which is about release:prepare). However, I wonder if you have correct <scm> informations in each POM. Can you confirm this?

Pascal Thivent
Near the bottom of the bug report he goes on to explain what happens if he runs release:perform and gets exactly the same error...although I guess you're right, the majority of the report talks about prepare. Will double check scm details now...thanks
Ed
See edit, SCM config seems ok to me...
Ed
A: 
Working directory "E:\hudson\jobs\myHudsonJob\workspace\target\checkout\workspace" does not exist!

I just saw the above line in your log. It looks like you have some screwy path setting somewhere. Do you overwrite the Workspace somewhere? Check your configuration and try to eliminate as much as possible the optional settings.

Peter Schuetze
No, I don't override the workspace, I use the default which appears to be target/checkout but since maven thinks I have a root directory and then that must be 'workspace' it decides to checkout under workspace as well...workspace is just the default directory hudson uses as my Perforce workspace. Cheers
Ed
As an additional note; if I didn't make it clear, the correct directory it should be using is "E:\hudson\jobs\myHudsonJob\workspace\target\checkout" since in this directory once it has failed are modules I need to package up
Ed