Hi Werner,

that filtering is one of my aims.

There are 2 seperate issues as far as I can see: filtering web resources, and filtering classpath resources.

Furthermore I want tomcat to serve my jsps, javascript, images and css direct from my src/main/webapp dir. I think that may be an eclipse WTP issue, so for the moment, I'd like to publish them directly from the src directory.

So m2eclipse should be involved in the publishing, filtering the web resources as they are published.

Eugene, is that even feasible in theory?


Regards
Adam


Werner Müller on 15/08/07 11:25, wrote:
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.


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

   http://xircles.codehaus.org/manage_email

Reply via email to