maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lisak (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (SUREFIRE-667) Setting up maven resources when testing in addition to testResources
Date Tue, 04 Jan 2011 15:11:57 GMT

    [ http://jira.codehaus.org/browse/SUREFIRE-667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=250391#action_250391
] 

lisak commented on SUREFIRE-667:
--------------------------------

the main problem is :  naming conflict on the classpath :  project[ target/classes/META-INF/spring-hibernate-stuff.xml
] & dependency[ META-INF/spring-hibernate-stuff.xml ]   

- In general terms, what If I needed resources of this dependency for testing purposes, but
I had them also in project[ target/classes ] ? For example in Liferay portal,  Portal portlet
and plugin portlet use different classloaders in container, but when testing I can use only
one classloader ... and portal portlet (dependency) must be loaded up prior plugin portlet
.... both have the same directory structure .... 

I can simulate the container environment perfectly except one thing....I need to load up (initialize)
the dependency first,  BUT my plugin's/projects META-INF is on the claspath prior to dependency's
META-INF and I can't do anything about it except of really UGLY workarounds....

and because it should be a Liferay archetype that would be used be a lot of people, it's kinda
important for me 

possibility to modify /src/main/resources in <testResources> would be a fix that should
be done by somebody who can see the consequences...

> Setting up maven resources when testing in addition to testResources
> --------------------------------------------------------------------
>
>                 Key: SUREFIRE-667
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-667
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.6
>            Reporter: vychtrle
>
> Hey,
> I think that developers would need resource goal of resource plugin to be set up differently
for
> test phase, than for build phase. When testing one needs to exclude stuff
> from src/main/resources. It seems it can't be done, testResources goal
> is irrelevant for this because it can't operate on src/main/* and resource goal can have
only one
> setting in pom definition, that takes effect in both test and build
> phase...
> For example, I'd need following settings to look differently (some
> excludes) in testing phase :
>                <resources>
>                  <resource>
>                    <directory>${project.basedir}/src/main/java</directory>
>                    <includes>
>                        <include>**/*.java</include>
>                        <include>service.properties</include>
>                    </includes>
>                  </resource>
>                  <resource>
>                    <directory>${project.basedir}/src/main/resources</directory>
>                    <includes>
>                        <include>**/*.xml</include>
>                        <include>**/*.properties</include>
>                    </includes>
>                  </resource>
>                </resources>
> The ideal behavior would be if one could define "src/main/*" in
> <testResources> but it unfortunately can't be done right now

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

        

Mime
View raw message