跳至主要内容

Maven support in NetBeans 6.7 m2 ...en

NetBeans has released the second milestone product some days ago. There are many articles on PlanetNetBeans(http://www.planetnetbeans.org) which were talking about the newest features NetBeans 6.7 will bring. Maven support is a highlight feature of them. Many peoples have praised the Maven support in NetBeans 6.7. I am a maven fan, but after I tried it, I was disappointed.

Maven support is an incomplete work now. As described on NetBeans wiki, it supports JEE and Java Web project creation now. I found this functionality is only a short-circuit of the normal "Maven Project". In the second step of the wizard, it only provide a extra Java EE version option. In my idea, it must support: target server selection, project relation (parent Maven module and child Maven module) settings and web framework configuration.
For "Web project", ideally, in the project definition panel , it must provide a "Add to existed Enterprise Application" option to add current maven project as a module to the parent module(a enterprise application). And support specifying the target runtime server , it should support adding suitable server which are defined in "Servers" node in "Services" windows , and it is better to support adding embeded server plugin(jetty). Web framework configuration support is a must for web project.
For "Enterprise project", beside server selection and Java EE version options , it should support creating "Web Module"," EJB Module" and "App Client Module" in the same wizard, and let user can modify the default name and location of children modules(war, ejb, ear).
For "EJB project", like web projct without web framework selection.

Another problem is the "Add library" dialog which occurs when you right click the "Library" node in the Project view. The new "add library" dialog maybe merged from the "Add Library" and "Find Dependency" in NetBeans 6.5. But I dislike this feature , I preferred using the query-result style ( like "Find Dependency" in NetBeans 6.5) view. The three fields in "Add library" dialog are implemented the "Code Completation" feature , maybe some body like it. But on my machine , It is too slow. When I input first character, I must took some minutes waiting the code completion context menu, after it displayed , then I could input the second character. Beside this, not everybody can remember the first part of group id , artifact id of every maven artifacts. For example, if you want add "common logging" dependency to your project, it is a apache project , you maybe guess the group id is "org.apache.commons". But you are wrong , it is "commons". In this way , I wasted much time on guessing the group id and at last I had to give up , and turned to use the Maven repository browser to search it. Obviously this feature is no use for me. My suggestion is remove it from NetBeans 6.7, use the simple query-style view instead it. In this approach , it must search the keyword( the word user input in the query field) in group id , artifact id , package name and full class name of all artifacts in the whole maven repository. So the NetBeans GUI maybe looks united, in the "Navigate" menu, all "Go To" dialogs use this simple UI style.

The third small defect I found is the "Files" windows in Maven project , it displays the logic name of some nodes , not the real system directory name.

评论

匿名说…
Amazing blog! Is your theme custom made or did you download it from somewhere?
A theme like yours with a few simple tweeks would really make my blog shine.
Please let me know where you got your design. Bless you

My blog post: Layne Tucker

此博客中的热门博文

AngularJS CakePHP Sample codes

Introduction This sample is a Blog application which has the same features with the official CakePHP Blog tutorial, the difference is AngularJS was used as frontend solution, and CakePHP was only use for building backend RESR API. Technologies AngularJS   is a popular JS framework in these days, brought by Google. In this example application, AngularJS and Bootstrap are used to implement the frontend pages. CakePHP   is one of the most popular PHP frameworks in the world. CakePHP is used as the backend REST API producer. MySQL   is used as the database in this sample application. A PHP runtime environment is also required, I was using   WAMP   under Windows system. Post links I assume you have some experience of PHP and CakePHP before, and know well about Apache server. Else you could read the official PHP introduction( php.net ) and browse the official CakePHP Blog tutorial to have basic knowledge about CakePHP. In these posts, I tried to follow the steps describ

JPA 2.1: Attribute Converter

JPA 2.1: Attribute Converter If you are using Hibernate, and want a customized type is supported in your Entity class, you could have to write a custom Hibernate Type. JPA 2.1 brings a new feature named attribute converter, which can help you convert your custom class type to JPA supported type. Create an Entity Reuse the   Post   entity class as example. @Entity @Table(name="POSTS") public class Post implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name="ID") private Long id; @Column(name="TITLE") private String title; @Column(name="BODY") private String body; @Temporal(javax.persistence.TemporalType.DATE) @Column(name="CREATED") private Date created; @Column(name="TAGS") private List<String> tags=new ArrayList<>(); } Create an attribute convert

Auditing with Hibernate Envers

Auditing with Hibernate Envers The approaches provided in JPA lifecyle hook and Spring Data auditing only track the creation and last modification info of an Entity, but all the modification history are not tracked. Hibernate Envers fills the blank table. Since Hibernate 3.5, Envers is part of Hibernate core project. Configuration Configure Hibernate Envers in your project is very simple, just need to add   hibernate-envers   as project dependency. <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-envers</artifactId> </dependency> Done. No need extra Event listeners configuration as the early version. Basic Usage Hibernate Envers provides a simple   @Audited   annotation, you can place it on an Entity class or property of an Entity. @Audited private String description; If   @Audited   annotation is placed on a property, this property can be tracked. @Entity @Audited public class Signup implements Serializa