You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jesse McConnell (JIRA)" <ji...@codehaus.org> on 2006/05/09 22:59:41 UTC

[jira] Closed: (MRESOURCES-10) Filtering should handle java.io.File values

     [ http://jira.codehaus.org/browse/MRESOURCES-10?page=all ]
     
Jesse McConnell closed MRESOURCES-10:
-------------------------------------

     Assign To: Jesse McConnell
    Resolution: Fixed

fix was released in plexus-utils version 1.2 so I added a dependency to that version of the lib and this will be fixed in the next release of the plugin which will be rsn (real soon now)

> Filtering should handle java.io.File values
> -------------------------------------------
>
>          Key: MRESOURCES-10
>          URL: http://jira.codehaus.org/browse/MRESOURCES-10
>      Project: Maven 2.x Resources Plugin
>         Type: Improvement

>     Reporter: Mike Perham
>     Assignee: Jesse McConnell
>      Fix For: 2.2

>
>
> I'm trying to use filters along with ${basedir} to setup my unit test Derby database.  Derby must have a unique directory to build its database in and this becomes a problem in multi-module builds.
> Currently I'm doing this:
> {code:xml}
> <bean id="wsf.storage.dataSource" class="org.apache.commons.dbcp.BasicDataSource">
>   <property name="driverClassName"><value>org.apache.derby.jdbc.EmbeddedDriver</value></property>
>   <property name="url"><value>jdbc:derby:target/test/testdb/${pom.artifactId};create=true</value></property>
> </bean>
> {code}
> But I'd like to do this:
> {code:xml}
> <bean id="wsf.storage.dataSource" class="org.apache.commons.dbcp.BasicDataSource">
>   <property name="driverClassName"><value>org.apache.derby.jdbc.EmbeddedDriver</value></property>
>   <property name="url"><value>jdbc:derby:${basedir}/target/test/testdb;create=true</value></property>
> </bean>
> {code}
> When I try to do the latter, I get this:
> java.lang.ClassCastException: java.io.File
>         at org.codehaus.plexus.util.InterpolationFilterReader.read(InterpolationFilterReader.java:269)
>         at org.codehaus.plexus.util.InterpolationFilterReader.read(InterpolationFilterReader.java:162)
>         at java.io.Reader.read(Reader.java:100)
>         at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:212)
>         at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:200)
>         at org.apache.maven.plugin.resources.ResourcesMojo.copyFile(ResourcesMojo.java:249)
>         at org.apache.maven.plugin.resources.ResourcesMojo.copyResources(ResourcesMojo.java:172)
>         at org.apache.maven.plugin.resources.TestResourcesMojo.execute(TestResourcesMojo.java:53)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)

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