You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/09/29 14:44:51 UTC

[jira] Updated: (MPIDEA-11) include maven project resources in module library

The following issue has been updated:

    Updater: Matthew McGowan (mailto:mdm@techie.com)
       Date: Wed, 29 Sep 2004 8:43 AM
    Comment:
Diff attached.
    Changes:
             Attachment changed to diff.txt
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/browse/MPIDEA-11?page=history

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPIDEA-11

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPIDEA-11
    Summary: include maven project resources in module library
       Type: Improvement

     Status: Open
   Priority: Minor

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-idea-plugin

   Assignee: Brett Porter
   Reporter: Matthew McGowan

    Created: Wed, 29 Sep 2004 8:42 AM
    Updated: Wed, 29 Sep 2004 8:43 AM

Description:
Maven source and unit test resource directories are added to the module path, so they are picked up when running apps or unit tests directly from IDEA. 


Index: src/plugin-resources/templates/v4/module.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/idea/src/plugin-resources/templates/v4/module.jelly,v
retrieving revision 1.7
diff -u -r1.7 module.jelly
--- src/plugin-resources/templates/v4/module.jelly	23 Jun 2004 12:28:49 -0000	1.7
+++ src/plugin-resources/templates/v4/module.jelly	28 Sep 2004 13:10:17 -0000
@@ -122,6 +122,44 @@
           <sourceFolder url="file://$$MODULE_DIR$$/${value}" isTestSource="true"/>

         </j:if>

       </content>

+
+        <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'}">
+		      <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="jdk" jdkName="java version &quot;${java.version}&quot;"/>

       <orderEntry type="sourceFolder" forTests="false"/>

       <j:forEach var="lib" items="${pom.artifacts}">




---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report 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