0

I am encountering a problem with NetBeans 7.4 (but also previous versions such as NetBeans 7.3). When I clean & build my Java Web application, it gets successfully built, but my newly added code is not included with that build.

I confirmed this by decompiling the classes to check whether my changes got through, but they did not.

I have tried different versions of NetBeans to see what happened. At one point in time, I also compiled the application through command line using ANT. I have also tried deleting the build and dist folders manually. None of these methods solved my issue.

The only, not acceptable solution is that I compile the class individually, then it is ok. But when I clean and build the whole application, the older sources are compiled.

Looking forward for some help, because I'm really lost, and compiling individually is not an option, since before releasing, I would like to use a single .war file.

Ryan S
  • 3,210
  • 17
  • 48
  • 79
  • Maybe this could help you: [clear cache](http://stackoverflow.com/questions/8689780/how-to-clear-the-cache-in-netbeans) – nashuald Nov 14 '13 at 09:53
  • @Christian Kullmann - I am attempting to build a Java Web application, based on JDK7. – Ryan S Nov 14 '13 at 09:56
  • I was on the wrong track with my train of thoughts here. We create projects into which we need to to copy some depending jars (i know, i know) via ant build.xml. Try clearing the cache and check the project setting. I am not that familiar with web applications in netbeans, sorry :( – Christian Kullmann Nov 14 '13 at 09:57
  • @nashuald - I also tried clearing the cache, but this did not solve my problem – Ryan S Nov 14 '13 at 10:50

1 Answers1

0

This issue was a silly mistake. The web part of this project was retrieved by copying the web folder from the server in order to make sure that my team has the latest sources. By doing this the class files were being included within the WEB-INF folder, therefore, when attempting to rebuild the application, for some reason, the build was retaking the files within the Web/WEB-INF folder and not generating the classes from the sources.

When that folder was cleaned up from any class files, the project now builds successfully.

Ryan S
  • 3,210
  • 17
  • 48
  • 79