Maven 1.x IDEA Plugin

Project.jelly should take "maven.multiproject.type" into account when deciding to link to a web module

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.6
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 1.02
  • Number of attachments :
    0

Description

When generating iml and ipr files for my project, I got the following problem. The generated ipr file wants to link to a webmodule, although my module is not a webmodule. I noticed in the jelly code that to define if a module is a webmodule the "maven.war.src" property is checked if it is not empty. However, my project.properties of my rootproject.xml (all modules extend from this one), already defines this property, because I want it to be the same for all modules.
By checking if the module type is "war", you can avoid this problem. Project.jelly would then need to be adjusted like this (starting from line 87):

<j:if test="${maven.multiproject.type == 'war'}">
<j:set var="webSourceDir" value="${maven.war.src}"/>
<j:choose>
<j:when test="${empty(webSourceDir)}">
<component name="WebManager">
<OPTION enabled="false"/>
</component>
<component name="WebRootContainer"/>
</j:when>
<j:otherwise>
<component name="WebManager">
<OPTION enabled="true"/>
</component>
<component name="WebRootContainer">
<root url="file://$$PROJECT_DIR$$/${webSourceDir}" name="${pom.artifactId}" validate="false"/>
</component>
</j:otherwise>
</j:choose>
</j:if>
<j:if test="${maven.multiproject.type != 'war'}">
<component name="WebManager">
<OPTION enabled="false"/>
</component>
<component name="WebRootContainer"/>
</j:if>

regards,

Wim

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: