Hallo

Well i am not sure if i fully understand your plans. I do have a similar issue: 
I have config.xml files which need to be filtered before tomcat can startup the 
application.

Maven/me2eclipse does properly filter the files and puts them into 
/target/artifactId-version-SNAPSHOT/ folder, which is then used to create the 
war file.

But Webtools is using /src/main/webapp as source path for the deployment into 
the servlet container.

In .settings/org.eclipse.wst.common.component I changed the line:
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>

Into:
<wb-resource deploy-path="/" 
source-path="/target/myArtifactId-version-SNAPSHOT"/>

So if webtools deploys the webapp into 
WORKSPACE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\
It is using the filtered files. I haven't found an option to do this 
automatically. Any hints welcome! 

The drawback is when version number increases this file needs to be updated too.

Hope this helps :)
Regards

Werner



-----Ursprüngliche Nachricht-----
Von: Adam Hardy [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 1. August 2007 23:34
An: [email protected]
Betreff: Re: [m2eclipse-user] Eclipse 3.3.0 and embedded servlet container

Adam Hardy on 01/08/07 00:07, wrote:
> Using eclipse europa 3.3.0 and tomcat 6 as the embedded server, i have a 
> problem with filtering of a properties file by maven/m2eclipse using 
> values from my maven install conf dir settings.xml.
> 
> Deploying in tomcat works but only when I have launched it once (with 
> error) and then restarted it. If I don't restart it, the webapp refuses 
> to launch, giving an error showing that maven didn't filter the 
> properties file.
> 
> I set up the project by manually editing the config files, and this is 
> the org.eclipse.wst.common.component. I had to include the properties 
> file that causes problems (security.properties) - and I think it must be 
> a wrong assumption I've made here somewhere:
> 
> <project-modules id="moduleCoreId" project-version="1.5.0">
>  <wb-module deploy-name="call-centre">
>    <property name="context-root" value="call-centre"/>
>    <wb-resource deploy-path="/" source-path="src/main/webapp"/>
>    <property name="java-output-path" value="/target/classes"/>
>    <wb-resource deploy-path="/WEB-INF/classes" 
> source-path="src/main/java"/>
>    <wb-resource deploy-path="/WEB-INF/classes" 
> source-path="src/test/resources"/>
>    <wb-resource deploy-path="/WEB-INF/lib" 
> source-path="target/call-centre/WEB-INF/lib"/>
>    <wb-resource deploy-path="/WEB-INF/classes/security.properties" 
> source-path="target/call-centre/WEB-INF/classes/security.properties"/>
>    <wb-resource deploy-path="/META-INF" 
> source-path="target/call-centre/META-INF"/>
>  </wb-module>
> </project-modules>

My progress with this issue is hampered by the lack of eclipse documentation on 
the WTP embedded server or how dynamic web projects are deployed to it.

I spent a fair amount of time experimenting with different settings in the 
org.eclipse.wst.common.component settings file but was unable to get anywhere.

I tried setting up the project as a WTP v2.0 variant but also had no luck.

Setting up the Maven2 dependencies in the project's J2EE Module dependencies in 
eclipse also had no positive effect.

If someone could explain briefly either for WTP 1.5 or 2.0 exactly what the 
server deployment requires in terms of configuration, I could probably get over 
this difficulty. Alternatively if anyone knows where the Eclipse project 
documents these details, I'd be grateful.

Regards
Adam Hardy

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to