You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Matthew McGowan <ma...@nynodata.no> on 2004/09/28 15:24:13 UTC

[patch] maven-idea-plugin - module libraries includes source and unit test resources

Hi,

The IDEA plugin is really great, but currently doesn't include source
resources and unit test resources in the module path. I found this makes
running unit tests difficult as you have to run maven first to copy the
resources to test-classes. 

The patch below includes source and unit test resources in the generated
module.

Regards,
Mat McGowan


248a249,286
> 
>         <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>
> 






Re: [patch] maven-idea-plugin - module libraries includes source and unit test resources

Posted by Brett Porter <br...@apache.org>.
Thanks.

Please obtain the patch by running cvs diff -u on CVS HEAD for the IDEA 
plugin, with the changes in place - then post the output as an 
attachment to http://jira.codehaus.org/browse/MPIDEA

Cheers,
Brett

Matthew McGowan wrote:

>Hi,
>
>The IDEA plugin is really great, but currently doesn't include source
>resources and unit test resources in the module path. I found this makes
>running unit tests difficult as you have to run maven first to copy the
>resources to test-classes. 
>
>The patch below includes source and unit test resources in the generated
>module.
>
>Regards,
>Mat McGowan
>
>
>248a249,286
>  
>
>>        <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>
>>
>>    
>>
>
>
>
>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>



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