Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] (m2e-wtp) RunOnServer Bypasses Resource Filtering

Hello,

I'm using Eclipse 3.7, m2e 1.0.0.20110607-2117, and
m2e-wtp 0.13.1.20110728-1800. I have a project with some Spring
bean definition file at src/main/resources/META-INF/spring-data.xml
which looks like this:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
  destroy-method="close">
    <property name="url" value="${db.url}" />
    <property name="username" value="${db.username}" />
    <property name="password" value="${db.password}" />
    <property name="initialSize" value="1" />
    <property name="maxActive" value="20" />
</bean>

In pom.xml I've set up resource filtering to put in the actual
database connection info.

When I tried "Run As -> Run on Server" in Eclipse, it didn't work.
I noticed that the resource filtering did not happen when the
project was deployed to Eclipse's work directory -
.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\myproject;
however, under ProjectDirectory/target/classes the resource was
filtered correctly. The same thing happened when filtering some
web resources under WEB-INF with maven-war-plugin's webResources
filtering - the filtering was done properly under
target/m2e-wtp/web-resources/WEB-INF but didn't happen under
Eclipse's work directory.

So my question is did I do something wrong or is this a bug?

Thanks a lot,

- Chengyu


Back to the top