|Re: Processing/filtering resources when deploying [message #190160 is a reply to message #190144]
||Tue, 20 March 2007 12:40
| Larry Isaacs
Registered: July 2009
For publishing, the org.eclipse.wst.server.core.publishTasks extension |
point accepts a class that extends
org.eclipse.wst.server.core.model.PublishTaskDelegate. The typeIds for
the extension point specifies the server(s) to which it applies. You
override one of the getTasks() methods to return an array of
org.eclipse.wst.server.core.model.PublishOperation. While you will have
information on what is being published and to what server, I'm not aware
of any public API to determine where modules are being published on that
server or a way to hook what is done in PublishOperations from other
plug-ins. You can examine the source for the
org.eclipse.jst.server.tomcat.core plug-in for an example.
I haven't looked very deeply into export, but I assume something similar
was done for it.
Felix Röthenbacher wrote:
> Thanks for your help. Can you give me a hint where to look for
> documentation/API of "source/runtime" version respective
> processing of resources during publication or export.
> Thanks, Felix
> Larry Isaacs wrote:
>> Publishing for a server is handled by each individual server, which is
>> separate from the handling for exporting to a WAR file. I think
>> trying to make this kind of modification during publish or export
>> would prove to be impractical. I think an easier approach would be to
>> create a "builder" that gets added to the project that automatically
>> transforms a "source" version of the resource into the "runtime"
>> version resource within the project. Then your resource is always
>> ready, allowing publish and export to work as expected.
>> Felix Röthenbacher wrote:
>>> Is it possible to write a plugin that does filtering/processing a
>>> resource when it is copied (published) to the server,
>>> e.g. replace some placeholders with actual values in a configuration
>>> Thanks for you help
>>> - Felix
Powered by FUDForum
. Page generated in 0.02456 seconds