Maven 2.x IDEA Plugin

multi-module master ipr generated incorrectly

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP / opened with IntelliJ 7.0.3 (EAP)
  • Number of attachments :
    0

Description

I have a multi-module web-application which works fine with maven2. In order to make it more friendly with our source control system, the master project pom file was moved into it's own directory, parallel to the child modules.

C:\\Development\mavenflattened\GetSmartMaster

The modules section of the pom.xml references each child module using a relative filepath:

<modules>
<module>../GetSmartLogging</module>
<module>../GetSmart</module>
</modules>

Each child pom.xml was modified to reference the parent, also using a relative filepath:

<parent>
<groupId>com.foo.max</groupId>
<artifactId>app</artifactId>
<relativePath>../GetSmartMaster/pom.xml</relativePath>
</parent>

With this configuration I can successfully compile,build, deploy the entire application the mvn commands.

When I create an IntelliJ ipr/iml files using the idea:idea goal, the modules filepath are incorrect in the ipr file. These appear as:

<modules>
<module filepath="$PROJECT_DIR$/app.iml"/>
<module filepath="$PROJECT_DIR$/C:/development/mavenflattened/GetSmartLogging/GetSmartLogging.iml"/>
<module filepath="$PROJECT_DIR$/C:/development/mavenflattened/GetSmart/GetSmart.iml"/>
</modules>

When i try to open up the master ipr with IntelliJ, I get the following error message for each module:

Cannot load module file 'C:\development\mavenflattened\GetSmartMaster\C:\development\mavenflattened\GetSmartLogging\GetSmartLogging.iml':
File C:\development\mavenflattened\GetSmartMaster\C:\development\mavenflattened\GetSmartLogging\GetSmartLogging.iml does not exist
Would you like to remove the module from the project?

I have to manually edit the generated ipr file to get the project to open with the correct module references.

Issue Links

Activity

Hide
Haus Code added a comment -

We ran into the same issue. Using Maven 2.0.6 works fine, 2.0.7 and 2.0.8 are broken

Show
Haus Code added a comment - We ran into the same issue. Using Maven 2.0.6 works fine, 2.0.7 and 2.0.8 are broken
Hide
Dennis Lundberg added a comment -

Which version of maven-idea-plugin are you using?
Are you using cygwin?

Show
Dennis Lundberg added a comment - Which version of maven-idea-plugin are you using? Are you using cygwin?
Hide
Paolo Compieta added a comment -

I'm facing exactly the same problem on:

  • IntelliJ 6.0.6
  • maven-idea-plugin:2.1

I'm designing a flat structure for all maven project, because of Eclipse-compatibility: it's really annoying having to manually fix each submodule's path in the xml file.

Note: my modules do not specify the parent's 'relativePath'.

Thanks

Show
Paolo Compieta added a comment - I'm facing exactly the same problem on:
  • IntelliJ 6.0.6
  • maven-idea-plugin:2.1
I'm designing a flat structure for all maven project, because of Eclipse-compatibility: it's really annoying having to manually fix each submodule's path in the xml file. Note: my modules do not specify the parent's 'relativePath'. Thanks

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: