2/29/2008

The strange thing - NetBeans.

Ok, ok, I know, I know, this is not a description of my holidays and rafting things (I hope you are looking forward to it... ;)), but now I am in a hurry to read and pick up some new (for me) technology in J2EE (for what reason I will tell you in a month), so I haven't got much free time for translating my notes, but I will write some things here anyway (about professional stuff, of course). And anyway, I definitely will write my translated notes here, but... later. So, let's begin..

All the Sun's tutorials which I read on the http://java.sun.com are written for making examples on the NetBeans IDE. And I decided to try this IDE once again. I have done it once (about 2 years ago), but then my team, where I was working, decided to use Eclipse and I agreed. Anyway, I installed NetBeans 6.0 with GlassFish v2 and began to investigate what it is. The first thing I noticed was an unusal interface, but it is definitely because I have more than 3-year experience with Eclipse, and have a very strong boundage with it ;) The second thing was more unusual - All the projects I made with help of wizard (and afterwards I learn from documentation it is a feature of NetBeans) are Ant-based. It means that after project creation under project directory you will find not only the directories 'src', 'classes' and the files '.classpath' and '.project' (in mininal configuration, of course), but the 'build.xml' and the 'bp-project' directory with some '*.xml' and '*.properties' files. Ok, I am not afraid of using Ant and have good experience in it, and it also impresses me, BUT, WHY I could not change the settings for output folder in the project creation wizard? It freaks me out. I've tried to find these setting for many times but without success. Then I realized, that it definitely can be done in the 'project.properties' file directly. I did so (set the variable responsible for this folder in '/') and got the empty project folder by next clean/build action. Yep, this is my fault, I should have thought carefully about what the current directory contains and the 'src' folder too, I would have removed clearing this directory from Ant task, but WHY such simple thing should be done in such a complicated way? Then I read the documentation to find out how to make it easier. There I've picked out a suggestion to use the free-form project for that goal (I mean if you want to set custom folders), and NOT to edit manually the files generated by IDE in the 'bp-project' directory. But creation of the 'free-form' demands an existing 'build.xml'. I planned to take one which had been created by NetBeans. But... NetBeans said 'There is no valid build.xml' ;) After that I decided to stop my attempts to work with this IDE and return back to my usual one (Eclipse). I think this all is funny and shows that I need more education in Ant and NetBeans principals. But I still think that such an easy action as setting thw custom output folder shouldn't consume so much efforts and time and definitely should be somewhere in Project properties.

PS: I have registered and found request in Bug Tracker for NetBeans team to add functionality to manage this directory from wizard. This issue is closed with resolution 'Won't fix' and suggestion 'Use free-form project'. Sadness... :(

No comments: