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:42:51 UTC

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

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
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:42 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


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

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPIDEA-11?page=all ]
     
Brett Porter closed MPIDEA-11:
------------------------------

    Fix Version: 1.6
     Resolution: Fixed

applied Geoffrey's modified patch

> include maven project resources in module library
> -------------------------------------------------
>
>          Key: MPIDEA-11
>          URL: http://jira.codehaus.org/browse/MPIDEA-11
>      Project: maven-idea-plugin
>         Type: Improvement
>     Reporter: Matthew McGowan
>     Priority: Minor
>      Fix For: 1.6
>  Attachments: diff.txt
>
>
> 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}">

-- 
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


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

Posted by "Geoffrey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPIDEA-11?page=comments#action_38453 ]
     
Geoffrey commented on MPIDEA-11:
--------------------------------

This patch might have a small problem which can be fixed.

The problem is that IntelliJ doesn't copy this lib directory into the target/classes directory.

Try the following:
A resource src/resources/myprops.props with a property "a = 1"
- Build with maven => myprops.props get copied into target/classes
- Run in Intellij: works perfectly
- change "a = 2"
- Make in IntelliJ => myprops.props doesn't get copied and in target/classes/myprops.props a is still 1
- Run in IntelliJ: target/classes is on the classpath before src/resources so a = 1 instead 2

Solution:
put the library for src/resource before <module source> in order/export tab in IntelliJ

> include maven project resources in module library
> -------------------------------------------------
>
>          Key: MPIDEA-11
>          URL: http://jira.codehaus.org/browse/MPIDEA-11
>      Project: maven-idea-plugin
>         Type: Improvement
>     Reporter: Matthew McGowan
>     Priority: Minor
>  Attachments: diff.txt
>
>
> 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}">

-- 
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


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

Posted by "Geoffrey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPIDEA-11?page=comments#action_38793 ]
     
Geoffrey commented on MPIDEA-11:
--------------------------------

so in module.jelly before:

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

> include maven project resources in module library
> -------------------------------------------------
>
>          Key: MPIDEA-11
>          URL: http://jira.codehaus.org/browse/MPIDEA-11
>      Project: maven-idea-plugin
>         Type: Improvement
>     Reporter: Matthew McGowan
>     Priority: Minor
>  Attachments: diff.txt
>
>
> 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}">

-- 
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


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

Posted by ji...@codehaus.org.
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