10 Steps to Get Started with Maven on the NetBeans Platform
By Geertjan-Oracle on Jan 06, 2010
However, the official docs all assume you're using Ant to build your application. Time to fix that.
Here's a start. Simple NetBeans Platform "getting started" scenario (plus some interesting benefits over Ant) via Maven and a bunch of screenshots.
- Go to the New Project wizard, choose the Maven project type, and click Next:
- Choose the Maven NetBeans Platform Application Archetype and click Next:
- Enter a name for your application and other stuff, including a main package, which (just for fun) I have here specified to indicate that this application is being developed for the Skyguide team (visited by Toni and myself last year and they're doing great with the NetBeans Platform, last I heard):
- Click Finish and then the IDE shows you the project structure of the folders and files that have been created on disk:
- However, maybe you reckon that IntelliJ IDEA provides a better perspective. No worries, just open the 'pom.xml' file created for the application into the (free!) community edition of IntelliJ IDEA and then you're good to go:
Note: Follow these steps to set up the classpath correctly for using the NetBeans Platform in IntelliJ IDEA.
- Use the "New Window Component" wizard in NetBeans IDE to create a new window in the application:
- Run the application (from wherever you like, including the command line), open a few windows, and here's the starting point of the brilliant application you're about to create:
- Ask yourself this simple question: "How much coding have I done to get to the above state of my application?"
- Then use the Matisse GUI Builder in NetBeans IDE to add UI elements to the window you generated earlier.
- Next, if that's your preference, use IntelliJ IDEA again for the coding of the business logic of your application. I.e., in this scenario, NetBeans IDE is a simplistic code generator, while IntelliJ IDEA is your code editor. The dependency graph for Maven applications is fun too:
Hurray, you're up and running with the NetBeans Platform for Maven-based applications! What should be addressed next in this Maven-based series of blog entries? Tell me and I will write it!