GWT compiler doesn't notice changes in code - java

I use the GWT plugin for eclipse on a project, that's imported from maven. For some reason changes within my code aren't considered while compiling my web application. If I start the preview mode within eclipse, the changes are shown, but when I compile the application via console: mvn clean gae:run -DskipTests(this is the only way I can run my application, since the GWT Development Mode does't work - see this thread ), I still get some older version of my web application, which doesn't contain my changes. I already cleared my browser's cache and rebuild my eclipse project, but still no effect.
Does anyone know how to get the compiler to consider my changes?

Related

How to take chages from my IDE Eclipse to the run time execution for my plug-in

Please I am using plug-in development tool in Eclipse. I run my plug-in like that: Run=> Run as=> Eclipse application another ide for execution opend and I see result, but when i change the code in my IDE of plug-in development I need to close the execution application and run again to see the new result.
I want to modify in the IDE and keep see the new changes in the runtime-EclipseApplication there is way please to that ? thanks .
Debug=> Debug as=> Eclipse application will cause code changes to be swapped into the runtime VM as you make them, assuming Automatic building is enabled, just as it does for any other Java application. However, it will not make changes in your plug-in MANIFEST.MF or plugin.xml take effect--that still requires restarting and clearing the Configuration space.

Changes in my java code in eclipse not show in application , even after liferay restart

I have a problem in Eclipse 4.7 (Oxygen) and Liferay IDE 3.1 When I alter my source code, my changes have no effect .
Earlier it was working if I restart liferay (was using liferay 2.6 and eclipse Mars and java7) from eclipse but now each time I have to do a dev ant-rebuild and then after starting server the changes reflect.
Have tried solution provided in other links like (Project -> Build Automatically)
add project in Server but nothing seems to work.
Based off your answer to the previous comments I have determined that you are expecting to see something that is no supposed to happen. If your server is running and you make a change to your Java files (any file ending in .java) you will not see the changes in your browser (on the GUI) until your save, compile, and deploy your changes.
So without any additional tools you will need to do the following for ever .java change.
Save changes
Run the ant compile target
Run the ant direct deploy target
You should see the deployment happen in the console and you can now refresh the page and view your changes. It is important to note that depending on your change you may need to restart the application container and clear temporary files.
There are a few exceptions to this.
JSP changes. You can view changes in your JSP automatically.
JRebel. For 6.2 development I cannot stress this product enough. Get a copy of My JRebel. With JRebel you can save your Java changes and see them immediately. This is a 3rd party tool though which traditionally costed 500usd. It is now free though
Sorry, this was too long for a comment. In the thrust of Olaf's comment though, you need to give more detail. Here are some shots in the dasrk and a question:
Upgrade to Liferay 3.1.1 if you haven't.
Do you see messages like the below ones in the log when you save an edited file? How about when you drag the project onto the running server (the server is running, right)?
21:28:01,514 INFO [pool-10-thread-2][BundleStartStopLogger:38] STOPPED com.liferay.docs.guestbook.service_1.0.0 [562]
21:28:01,588 INFO [Refresh Thread: Equinox Container: 40aeefb4-a286-0017-134c-c19af18a2252][BundleStartStopLogger:38] STOPPED com.liferay.docs.guestbook.portlet_1.0.0 [563]
21:28:01,661 INFO [pool-10-thread-3][BundleStartStopLogger:35] STARTED com.liferay.docs.guestbook.portlet_1.0.0 [563]
21:28:01,672 INFO [pool-10-thread-3][BundleStartStopLogger:35] STARTED com.liferay.docs.guestbook.service_1.0.0 [562]
Have you tried restarting eclipse?

Netbeans always running maven build before debugging

I am running Netbeans 8.0.2 and I am trying to debug a web app. This app is a module in a larger suite. Normally just the parent gets compiled which set's up property values for db connections etc. So, that being said the web app I am trying to debug never gets built independently.
So, I want to be able to do right-click > debug without netbeans running the maven build (this will mess up the prop values).
I have the "Always perform build before running application" unchecked in the Run configuration. But every single time, it builds it anyways!
Is there something I'm missing? Or is there some bug in Netbeans?
Edit: I've also tried deleting the cache.
I know this is an old question which you probably (and hopefully) solved already. However, as I had the same problem and could not find an answer here, I want to share my solution to this problem for others.
My application also first built itself and then started debugging. I checked the run/debug configuration and they were fine. So I deleted the local maven repositories of all dependencies of my application and rebuilt them. Seems like NetBeans confused something with the dependencies and therefore rebuilt the application every single time again. After deleting and rebuilding the dependencies I was able again to debug the application without building it before.

Automatically reload Java AppEngine Maven project after making changes

Is it possible to automatically reload a Java AppEngine project (which uses Maven) after making changes to the code? I.e. after making a change to the code (such as a JSP) I'd like to see those changes straight away in a web browser without having to re-run the project. Is this possible?
I have done the following:
Created a Maven project using the Google's tutorial
Imported it into Eclipse using Google's instructions.
Enabled the "Build Automatically" setting on my project in Eclipse (which this article suggests is required).
Run the dev server inside the ear project (mvm appengine:devserver)
However, changes to JSPs aren't automatically reflected when I view the page in a web browser. I can only see the changes by installing (mvn clean install) and then re-running the dev server.
Projects created using the Google Eclipse plugin reload automatically however, I'd prefer to use Maven as it'll make it easier to install other software (such as the Spring Framework).
I think I've got to the bottom of this:
Import only the web Maven project (not the main project) into Eclipse (as suggested in the Eclipse Web Tools documentation)
Create a server as per Google's documentation. The web site should automatically reload 15 seconds after you make a change to the code. To change this...
Open the "servers" tab, right-click on your server and select "open".
Expand the "Publishing" section and decrease the value for "Automatically public after a build event.
Note: the "auto scan for resources change setting" doesn't seem to make any difference.

Play Framework 2.1 Java/Eclipse: Auto-Reload not working

The Problem/s:
Views are being compiled but hitting refresh in a browser won't show the changes without restarting the server manually.
Changes to controllers compile automatically using ~run but only a manual server restart will update the content on the server.
Changes to routes under conf are only shown after manually restarting the server.
Background:
running on OSX 10.8.3
using Eclipse Juno 4.2.2
Server is launched using play ~run
Only restarting the server will show changes to views, controllers, routes
To be able to make changes without having to restart the server each time I tried (without success):
in the console: clean -> eclipse -> ~run
in the console: clean -> compile -> ~run
shutdown/restart the computer
Tick Refresh using native hooks or polling -> remove classes_managed from Referenced Libraries and add it manually
Questions:
How can the Auto-Reload functionality be restored?
How can this problem be solved on IDEs besides Eclipse?
Further information:
Playframework reload not working Mac OSX
Auto-reloading with Play framework on a network filesystem
Both of them point to JNotify as the cause for auto-reloading not to work. One of the answers (not enough rep to write a comment) mentions how one could "hack Play framework's sbt plugin to make the PlayReloader trait behave as if JNotify wasn't available." How could one achieve this?
The following got Play's auto-reload to working with Eclipse:
In Eclipse Preferences go to General → Workspace. Uncheck Build automatically.
Restart OS X.
For whatever reason, I had to restart OS X to get akim's suggestion to take hold.
I got around this problem by changing the project configuration in Eclipse. I unchecked the "Allow output folders for source folders" option, which means that Eclipse will compile classes to the "bin" folder. This prevents the Eclipse compilation from interfering with the Play compilation. The only downside is that you have to remember to redo it if you ever do play eclipse again.
Following akim's suggestion, disabling Build automatically under General\Workspace in the Eclipse Preferences solves the problem and re-enables Play!'s auto-reload functionality in all of the above problem cases.

Categories