Developing Sailfin CAFE Applications using Netbeans
Developing Sailfin CAFE Application with Netbeans is easier then ever. Resolve dependencies and build the project without any hassles.
Here's a quick guide to it:
- Create a new Netbeans project : File --> New Project
- In maven category, choose Maven Web Application, you will get the following window:
click finish to create a project.
- Right click on mavenproject1 - Source Packages and select new -> Java Class, to create a new Java Class.
- Make the class as CAFE CommunicationBean, by adding the following annotation:
@CommunicationBean
public class NewClass {
}
- For resolving the missing dependency, select the tooltip next to @CommunicationBean annotation and click on Search Dependency at maven repositories.
- the following suggestion box will appear, select cafe-communication-api and select Add.
- Save the project, click on the tooltip next to @CommunicatioBean and select import org.glassfish.cafe.api.bean.CommunicationBean
- Build the project and your CAFE Application is ready !!
- Steps to install and run the App:



For compiling the project, you may need to add the following to your settings.xml or pom.xml between the tags <repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
Posted by Mohit Gupta on November 23, 2009 at 03:39 AM PST #