Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Processing/filtering resources when deploying
Processing/filtering resources when deploying [message #189804] Thu, 15 March 2007 10:01 Go to next message
Felix Röthenbacher is currently offline Felix RöthenbacherFriend
Messages: 2
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Felix Röthenbacher is currently offline Felix RöthenbacherFriend
Messages: 2
Registered: July 2009
Junior Member
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 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
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
>>>
>
Previous Topic:Content assist not consistently working in detail pane and display view during debugging.
Next Topic:eclipse on solaris 9 /sparc?
Goto Forum:
  


Current Time: Fri Apr 26 10:24:57 GMT 2024

Powered by FUDForum. Page generated in 0.04174 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top