Author: brett
Date: Thu Jun  9 22:10:32 2005
New Revision: 189898

URL: http://svn.apache.org/viewcvs?rev=189898&view=rev
Log:
PR: MPIDEA-27, MPIDEA-11, MPIDEA-26, MPIDEA-28, MPIDEA-15
Submitted by: Geoffrey De Smet
Reviewed by:  Brett Porter

plugin fixes roll up

Modified:
    maven/maven-1/plugins/trunk/idea/plugin.jelly
    
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/module.jelly
    
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/multiproject.jelly
    maven/maven-1/plugins/trunk/idea/xdocs/changes.xml

Modified: maven/maven-1/plugins/trunk/idea/plugin.jelly
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/idea/plugin.jelly?rev=189898&r1=189897&r2=189898&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/idea/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/idea/plugin.jelly Thu Jun  9 22:10:32 2005
@@ -92,8 +92,11 @@
           <ant:fail>ERROR: This goal should be used only with IDEA 4 and 
above.</ant:fail>
         </j:if>
 
-      
-        <attainGoal name="idea:workspace"/>
+        <!-- MPIDEA-26 -->
+        <util:file var="workspaceFile" name="${basedir}/${pom.artifactId}.iws" 
/>
+        <j:if test="${!workspaceFile.exists()}">
+            <attainGoal name="idea:workspace"/>
+        </j:if>
         
         <!-- Finding modules -->
         <!-- we use plugin's own settings in first order. -->
@@ -123,6 +126,10 @@
             goals="idea:module"
             ignoreFailures="true"/>
 
+        <!-- MPIDEA-28 -->
+        <attainGoal name="idea:module"/>
+
+        <!-- FIXME: just do attainGoal name="idea:project" -->
         <ant:echo>Creating ${basedir}/${pom.artifactId}.ipr ...</ant:echo>
         <j:file name="${basedir}/${pom.artifactId}.ipr" prettyPrint="true" 
xmlns="dummy">
             <j:import file="${template.dir}/multiproject.jelly" 
inherit="true"/>

Modified: 
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/module.jelly
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/module.jelly?rev=189898&r1=189897&r2=189898&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/module.jelly 
(original)
+++ 
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/module.jelly 
Thu Jun  9 22:10:32 2005
@@ -38,7 +38,9 @@
         <setting name="JAR_ENABLED" value="true" />
       </component>
       <component name="EjbModuleProperties">
-        <deploymentDescriptor name="ejb-jar.xml" 
url="file://$MODULE_DIR$/src/ejb/META-INF/ejb-jar.xml" version="2.x" />
+        <!-- MPIDEA-15 -->
+        <deploymentDescriptor name="ejb-jar.xml" 
url="file://$$MODULE_DIR$$/src/ejb/META-INF/ejb-jar.xml" version="2.x" />
+
         <orderEntriesWatcher>
           <pairs>
             <key>
@@ -80,7 +82,9 @@
         <maven:get var="warSrc" plugin="maven-war-plugin" 
property="maven.war.src" />
         <maven:makeRelativePath var="value" basedir="${basedir}" 
path="${warSrc}" separator="/" />
         <webroots>
-          <root url="file://$MODULE_DIR$/${value}" relative="/" />
+          <!-- MPIDEA-15 -->
+          <root url="file://$$MODULE_DIR$$/${value}" relative="/" />
+
         </webroots>
         <orderEntriesWatcher>
           <pairs>
@@ -123,17 +127,60 @@
         </j:if>
         <j:if test="${maven.idea.target.exclude}">
           <maven:makeRelativePath var="value" basedir="${basedir}" 
path="${maven.build.dir}" separator="/" />
-          <excludeFolder url="file://$$MODULE_DIR$$/${value}"/>        
-        </j:if>      
+          <excludeFolder url="file://$$MODULE_DIR$$/${value}"/>
+        </j:if>
+          
+        <!-- MPIDEA-28: Exclude the subprojects of a multiproject  -->
+        <j:if test="${type == 'multiproject'}">
+            <j:forEach var="project" items="${reactorProjects}">
+                <maven:makeRelativePath var="value" basedir="${basedir}"
+                    path="${project.file.parentFile.canonicalFile}" 
separator="/" />
+                <excludeFolder url="file://$$MODULE_DIR$$/${value}"/>
+            </j:forEach>
+        </j:if>
+
       </content>
       <orderEntry type="jdk" jdkName="java version 
&quot;${java.version}&quot;"/>
+        <!-- MPIDEA-11 (duplicates MPIDEA-22): Reference resources directory 
-->
+        <j:forEach var="res" items="${pom.build.resources}">
+            <orderEntry type="module-library">
+                <library>
+                    <CLASSES>
+                        <maven:makeRelativePath var="value" 
basedir="${basedir}" path="${res.directory}" separator="/"/>
+                        <root url="file://$$MODULE_DIR$$/${value}"/>
+                    </CLASSES>
+                    <JAVADOC/>
+                    <SOURCES/>
+                </library>
+            </orderEntry>
+        </j:forEach>
+        <j:if test="${unitTestSourcesPresent == 'true'}"><!-- TODO should use 
a unitTestResourcesPresent -->
+            <j:if test="${pom.build.unitTest != null}">
+                <j:forEach var="res" items="${pom.build.unitTest.resources}">
+                    <orderEntry type="module-library">
+                        <library>
+                            <CLASSES>
+                                <maven:makeRelativePath var="value" 
basedir="${basedir}" path="${res.directory}" separator="/"/>
+                                <root url="file://$$MODULE_DIR$$/${value}"/>
+                            </CLASSES>
+                            <JAVADOC/>
+                            <SOURCES/>
+                        </library>
+                    </orderEntry>
+                </j:forEach>
+            </j:if>
+        </j:if>
+
       <orderEntry type="sourceFolder" forTests="false"/>
       <j:forEach var="lib" items="${pom.artifacts}">
         <j:set var="dep" value="${lib.dependency}"/>
-        <j:if test="${dep.type=='jar'}">
+          <!-- MPIDEA-27: Depdencies of wars en ejb's should also be reffed -->
+          
           <j:choose>
             <j:when test="${dep.groupId == pom.groupId}" >
+              <!-- MPIDEA-7 -->
               <orderEntry type="module" module-name="${dep.artifactId}" />
+
             </j:when>
             <j:otherwise>
               <orderEntry type="module-library">
@@ -147,7 +194,8 @@
               </orderEntry>
             </j:otherwise>
           </j:choose>
-        </j:if>
+          <!-- MPIDEA-27: Depdencies of wars en ejb's should also be reffed -->
+
       </j:forEach>
     </component>
     <component name="ModuleRootManager"/>

Modified: 
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/multiproject.jelly
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/multiproject.jelly?rev=189898&r1=189897&r2=189898&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/multiproject.jelly
 (original)
+++ 
maven/maven-1/plugins/trunk/idea/src/plugin-resources/templates/v4/multiproject.jelly
 Thu Jun  9 22:10:32 2005
@@ -127,6 +127,10 @@
         </component>
         <component name="ProjectModuleManager">
             <modules>
+                <!-- Include the mutiproject's module -->
+                <j:set var="file" 
value="file://${pom.file.parentFile.canonicalFile}/${pom.artifactId}.iml" />
+                <module fileurl="${file}" filepath="${file}"/>
+
                 <j:forEach var="project" items="${reactorProjects}">
                     <j:set var="file" 
value="file://${project.file.parentFile.canonicalFile}/${project.artifactId}.iml"
 />
                     <module fileurl="${file}" filepath="${file}"/>

Modified: maven/maven-1/plugins/trunk/idea/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/idea/xdocs/changes.xml?rev=189898&r1=189897&r2=189898&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/idea/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/idea/xdocs/changes.xml Thu Jun  9 22:10:32 2005
@@ -25,7 +25,12 @@
   </properties>
   <body>
     <release version="1.6-SNAPSHOT" date="in SVN">
-      <action dev="brett" type="fix" issue="MPIDEA-12" due-to="Matthew 
McGowan">exclude build output directory in module</action>
+      <action dev="brett" type="fix" issue="MPIDEA-15" due-to="Geoffrey De 
Smet">v4/module.jelly generates incorrect references to $MODULE_DIR$</action>
+      <action dev="brett" type="add" issue="MPIDEA-28" due-to="Geoffrey De 
Smet">Generate a module for the multiproject itself</action>
+      <action dev="brett" type="update" issue="MPIDEA-26" due-to="Geoffrey De 
Smet">idea:multiproject without idea:workspace so a local workspaces aren't 
lost</action>
+      <action dev="brett" type="add" issue="MPIDEA-11" due-to="Geoffrey De 
Smet">include maven project resources in module library</action>
+      <action dev="brett" type="update" issue="MPIDEA-27" due-to="Geoffrey De 
Smet">Add depencies on ejb or war modules</action>
+      <action dev="brett" type="update" issue="MPIDEA-12" due-to="Matthew 
McGowan">exclude build output directory in module</action>
       <action dev="brett" type="fix" issue="MPIDEA-17">set module to 
JAVA_MODULE for compatibility with both 4.5 and Irida.</action>
     </release>
     <release version="1.5" date="2004-06-25">



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to