Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] How to hint an IServer it should publish stuff?

As far as I know, there is no API to ensure a publish does not start the server.

You could, however, try to set the module publish state to one of the IServer constants indicating an unknown state. This wouldn't force the server to publish immediately, but it would tell the server that a publish is needed (without forcing the publish to occur).

I would see this as a bug in the glassfish adapter. IT should support a publish without a start, but, I suppose it's entirely up to them how to handle their adapter.

On 07/31/2013 05:46 AM, Fred Bricon wrote:
Hi,

I have this bug report in m2e-wtp[1], where calling IServer.publish() [2] causes some adapter(s) (GlassFish at least) to start stopped server instances. I must say I find that behavior questionable, but I can't control how 3rd party server adapters work. Anyways, is there a recommended way to tell the stopped IServer instance it *should* publish, in a way it -most likely- wouldn't start the server?

And if you ask why I force server publication in that resource listener, it's to support dynamic war overlay [3] (changes in overlay project are automatically published in main web app)

So if you have any pointers, please let me know. Thanks,

Fred.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=413987
[2] https://github.com/eclipse/m2e.wtp/blob/master/org.eclipse.m2e.wtp.overlay/src/org/eclipse/m2e/wtp/overlay/internal/servers/OverlayResourceChangeListener.java#L83
[3] http://maven.apache.org/plugins/maven-war-plugin/overlays.html


--
"Have you tried turning it off and on again" - The IT Crowd



Back to the top