You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Wim Deblauwe (JIRA)" <ji...@codehaus.org> on 2005/06/22 14:02:52 UTC

[jira] Created: (MPIDEA-34) Project.jelly should take "maven.multiproject.type" into account when deciding to link to a web module

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

         Key: MPIDEA-34
         URL: http://jira.codehaus.org/browse/MPIDEA-34
     Project: maven-idea-plugin
        Type: Bug
    Versions: 1.6    
 Environment: Maven 1.02
    Reporter: Wim Deblauwe


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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org