views:

42

answers:

1

Hi

I have manually configured my org.eclipse.wst.common.component to deploy my web-app via Eclipse WTP from my project's target directory (so my deployment includes the result of JSP pre-compilation).

But now every time I run an "mvn clean" build (command-line or in M2Eclipse, the file reverts to a previous state. Anyone know why this might be happening?

Thanks

A: 

OK, got it. My settings/org.eclipse.wst.common.component had looked like this:

<?xml version="1.0" encoding="UTF-8"?>
<!--THIS IS WRONG-->
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="dss-sample-webapp">
    <property name="context-root" value="dss-sample-webapp"/>
    <wb-resource deploy-path="/" source-path="/target/dss-sample-webapp" />
</wb-module>

Every time I deleted the target/dss-sample-webapp directory (like with a 'mvn clean' build), the corresponding line in the file automatically disappeared:

<wb-resource deploy-path="/" source-path="/target/dss-sample-webapp" />

Removing the leading '/' fixed the problem. I could delete the target directory to my heart's content, and the settings/org.eclipse.wst.common.component file would be unaffected.

So, the fully functioning settings/org.eclipse.wst.common.component is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!--THIS IS RIGHT-->
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="dss-sample-webapp">
    <property name="context-root" value="dss-sample-webapp"/>
    <wb-resource deploy-path="/" source-path="target/dss-sample-webapp" />
</wb-module>