Friday, 23 May 2008

Maven IDEA plugin generating incorrect references in .ipr file in multi-module project

Is there a bug in the maven IDEA plugin when working with multi-module files?
I normally do most of my command-line work in the Cygwin environment, and
have not experienced this problem on my previous project, which was a
single-module project.


ERROR in parent project file:

- generated this when running mvn idea:idea under cygwin
- trying to open the project file results in error dialog box:
"Cannot load module file
'C:\work\Fads\C:\work\Fads\FeedProcessor\FeedProcessor.iml':
File C:\work\Fads\C:\work\Fads\FeedProcessor\FeedProcessor.iml does not exist.
Would you like to remove the module from the project?"

<modules>
<module fileurl="file://$PROJECT_DIR$/C:/work/FeedsProject/packaging/FeedsProject.iml"
filepath="$PROJECT_DIR$/C:/work/FeedsProject/packaging/FeedsProject.iml"
/>
<module fileurl="file://$PROJECT_DIR$/FadsParent.iml"
filepath="$PROJECT_DIR$/FadsParent.iml" />
<module fileurl="file://$PROJECT_DIR$/C:/work/FeedsProject/FeedProcessor/FeedProcessor.iml"
filepath="$PROJECT_DIR$/C:/work/FeedsProject/FeedProcessor/FeedProcessor.iml"
/>
<module fileurl="file://$PROJECT_DIR$/C:/work/FeedsProject/FileService/FileService.iml"
filepath="$PROJECT_DIR$/C:/work/FeedsProject/FileService/FileService.iml"
/>
</modules>

- the fix is to generate the IDEA project file under DOS - mvn idea:idea
- this file is correct.

<modules>
<module fileurl="file://$PROJECT_DIR$/packaging/FeedsProject.iml"
filepath="$PROJECT_DIR$/packaging/FeedsProject.iml" />
<module fileurl="file://$PROJECT_DIR$/FadsParent.iml"
filepath="$PROJECT_DIR$/FadsParent.iml" />
<module fileurl="file://$PROJECT_DIR$/FeedProcessor/FeedProcessor.iml"
filepath="$PROJECT_DIR$/FeedProcessor/FeedProcessor.iml" />
<module fileurl="file://$PROJECT_DIR$/FileService/FileService.iml"
filepath="$PROJECT_DIR$/FileService/FileService.iml" />
</modules>

No comments: