Processing/filtering resources when deploying [message #189804] |
Thu, 15 March 2007 10:01  |
Eclipse User |
|
|
|
Hi
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 file.
Thanks for you help
- Felix
|
|
|
Re: Processing/filtering resources when deploying [message #189936 is a reply to message #189804] |
Thu, 15 March 2007 17:54   |
Eclipse User |
|
|
|
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.
Cheers,
Larry
Felix Röthenbacher wrote:
> Hi
>
> 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 file.
>
> Thanks for you help
>
> - Felix
>
|
|
|
Re: Processing/filtering resources when deploying [message #190144 is a reply to message #189936] |
Tue, 20 March 2007 09:46   |
Eclipse User |
|
|
|
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.
> Cheers,
> Larry
> Felix Röthenbacher wrote:
>> Hi
>>
>> 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 file.
>>
>> Thanks for you help
>>
>> - Felix
>>
|
|
|
Re: Processing/filtering resources when deploying [message #190160 is a reply to message #190144] |
Tue, 20 March 2007 12:40  |
Eclipse User |
|
|
|
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.
Cheers,
Larry
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.
>
>> Cheers,
>> Larry
>
>> Felix Röthenbacher wrote:
>>> Hi
>>>
>>> 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
>>> file.
>>>
>>> Thanks for you help
>>>
>>> - Felix
>>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02570 seconds