Eclipse

Dynamic Web Project

Make sure the files listed under are under webContent folder. When you publish the content to any embeded server, it only publishes content from webContent folder. So any resource under the top level project folder, but not under webContent folder will not be published to the server.

If you are using web.xml web-app descriptor 2.5, then use Tomcat 6.x/ java ee 1.6 combination because Tomcat 5.x/java ee 1.5 combination may not work with it. This is what I have seen.


Running Unit Tests inside Eclipse

At times I have seen different results based on how you run the unit test. This may simply be the configuration issue. So If I am in the unit test class , right mouse click and do Run As =>Junit  Test, it runs fine. If I select the file from left navigation inside Package Explorer and click Run from top  "Run" menu, I see the result is different and at times tests fail.  Now If go and run the same test using maven command line, it is most strict and whatever ran successfully inside Eclipse, fails there.

Maven Build Issues: ( Symbol not found , package not found )

1. I created a spring boot project in one workspace, which had other projects involving spring boot. I noticed that proper spring boot jars were not being included in the build path for this project and I was getting "Symbol not found" and package not found errors for Spring Boot classes and packages. 
I went to Project->Properties->Maven and unchecked Resolve dependencies from other projects in workspace and the errors went away and I saw all the dependencies were included properly under Maven Dependencies in the project.

Eclipse editor shows errors ( red marks )  even if "mvn compile/install"  is successful

I noticed this issue ( only for test sources ) was when I pointed the output folder for test  sources also to project default output folder, where regular source was getting compiled. As soon as I changed the output folder for the test sources to a different values, all these Symbol not found errors which were appearing only for test source files ( in the eclipse editor )  were gone. 



Comments

Popular posts from this blog

SQL

Analytics

HIVE