跳至主要内容

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

此博客中的热门博文

Create a restful application with AngularJS and Zend 2 framework

Create a restful application with AngularJS and Zend 2 framework This example application uses AngularJS/Bootstrap as frontend and Zend2 Framework as REST API producer. The backend code This backend code reuses the database scheme and codes of the official Zend Tutorial, and REST API support is also from the Zend community. Getting Started with Zend Framework 2 Getting Started with REST and Zend Framework 2 Zend2 provides a   AbstractRestfulController   for RESR API producing. class AlbumController extends AbstractRestfulController { public function getList() { $results = $this->getAlbumTable()->fetchAll(); $data = array(); foreach ($results as $result) { $data[] = $result; } return new JsonModel(array( 'data' => $data) ); } public function get($id) { $album = $this->getAlbumTable()->getAlbum($id); return new JsonModel(array("data" =...

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 clas...