问题
My setup is as follows:
I am using Eclipse Version: Juno Service Release 2 Build id: 20130225-0426 and Glassfish 3.1.2.
The glassfish adapter is version 5.0.1.201201241920
I have war maven project that is set up to require a jar maven project.
I've configured the war Deployment assembly to include the jar project.
I've turned off automatic publishing to glassfish (but turning it on does not solve the problem)
The problem:
If I make a change to a class in the jar project, the server will change its status to "started publish". Indicating that it knows resources have changed and a publish is required. However if I right click on the server and click publish it does not popup the publishing dialog box indicating that it is copying the resources over to glassfish and the server does not redeploy the add. The server then indicates it is synchronized but the changes made to the required jar project are not on the server.
If I make a change to the war project and right click publish, the all the resources are copied over to the glassfish server. Including the changes to the required jar project.
Solutions:
I think this is a bug, but is someone has a configuration solution that would be solve this issue.
If this is a bug where do I log it? The eclipse bugzilla does not seem to have a section for glassfishs adapter bugs.
Can anyone confirm whether indigo has this problem? I have just upgraded from HElios but will downgrade to Indigo if need be.
回答1:
My current work around is set glassfish to publish on build and then run project clean all when I want to publish. But this is annoying as the code is deployed after each build and most times this is unnecessary.
回答2:
Trying to work with Glassfish and Eclipse, I was plagued with errors. I ended up switching to using Payara.
Install Payara
You'll need to download Payara server and extract it into a location on your file system. I downloaded the community server (not enterprise, not micro, not Payara web). I found the download here.
Install Payara Tools
Then install Payara tools in eclipse. They can be found in the Eclipse Marketplace or here.
With those pieces of software in place, I added the Payara server to Eclipse.
Add Server
Right click in the "Servers" tab and select New > Server.
Configure Payara
In the New Server dialog, you should see "Payara", select that and point it to the place where you extracted the server to. Also, point it at your JDK installation (in my case Java 8 at /usr/lib/jvm/jdk1.8.0_261
on a Linux system (a.k.a. $JAVA_HOME
)).
After making the switch to Payara, my persistent errors went away.
来源:https://stackoverflow.com/questions/16833879/eclipse-glassfish-not-publishing-changes-to-required-projects