Eclipse -> Glassfish won't incrementally deploy - JBOSS does
Asked Answered
A

3

6

I've started in a new job developing Java EE 6 apps with an Ubuntu workstation.

Glassfish is the main App Server I've been using for a year or so now and am quite familiar with it. I've also tried JBoss to debug this problem. I'm developing with Eclipse and have also tried Netbeans to debug this problem.

  • Incremental deploy does not work for Eclipse / Glassfish.
  • It works for Eclipse / JBoss.
  • It works for Netbeans / Glassfish.
  • It works for Eclipse / Glassfish at home on my Mac.

I have the Glassfish Tools for Eclipse Juno installed and I've set up a glassfish server adapter. I've reinstalled Glassfish (3.1.2.2).

Eclipse Auto-build is on and indeed the target .class or .xhtml files are created / updated.

But these modified files are not copied to the app directory in Glassfish. They are to the equivalent location under JBoss when using it instead.

Glassfish > Domain > Applications Configuration > Reload is enabled (but the .class / .xhtml etc are not even getting there anyway).

A number of people have asked similar questions with few replies so I don't think I will get a solution. However I would like some help in debugging this problem.

Is there any log level I can increase to see what is happening; or is there something else I can look at? Or any other thoughts?

Any helpful feedback appreciated.

ps. I tried to use the tag 'incremental-deploy' but I don't have enough reputation. Could someone fix that?

Aucoin answered 18/6, 2013 at 7:16 Comment(2)
I set logging for javax.enterprise.system.tools.deployment to FiNEST and the only thing that is returned (when I'm expecting an incremental deploy to happen) is FINE: Skipping /opt/dev/glassfish3/glassfish/domains/domain1/autodeploy/bundles because its name is in the list of files to ignore. I can't see any other LOGGER that would be relevant.Aucoin
I think I know what it is but can't test until I'm back at work tomorrow. Its the publishing state of the Glassfish Server Connector in Eclipse (ie. double click the server). It must be set to 'Never publish automatically'. Hope I'm write. Twill find out tomorrow.Aucoin
A
12

Got it!

The Server Adapters / Connectors have a Publishing configuration found by double-clicking on the Adapter listed under the Servers tab. This needs to be set to 'Automatically publish when resources change' to see the changes immediately (See footnote). If its set to Never Publish Automatically then a full-manual redeploy needs to be done. Each and every time :(

Every server adapter that I know has such a configuration.

  • footnote - Glassfish and all App Servers have an option to dynamically reload applications - this needs to be enabled and you can set the reload poll interval. This can be found on Glassfish by going to admin (http://localhost:4848 by default) > Domain > Application Configuration

How to set Eclipse to publish to Glassfish

Required configuration on the Glassfish server

Aucoin answered 18/6, 2013 at 23:6 Comment(0)
T
1

there was decision not to use the automatic deployment by default because it is not desirable for bigger projects. But ir works fine for small experimental projects so you can always turn it on.

Thompkins answered 21/6, 2013 at 10:51 Comment(1)
Fair enough. That was a change I didn't expect thoguh and didn't know where to look when it didn't work. I wrote this post as I couldn't find any references to the problem and solution. Hopefully more people are the wiser now!Aucoin
O
0

In order to deploy XHTML files, you can use FileSync Eclipse Plugin.

Olive answered 4/6, 2014 at 16:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.