Sei sulla pagina 1di 15

Using NetBeans For

Your Existing Projects

Tim Boudreau
Senior Staff Engineer
Sun Microsystems
tboudreau@sun.com
Agenda
● Introduction
● Building Software
● About NetBeans Projects
● Automated Project Import
● Manual Project Import
● Maven
● Conclusion
2
Goals
● Become friends with the NetBeans
project system
● Learn how projects can be imported
into NetBeans
● Learn how NetBeans can be used
alongside other IDEs

3
Building Software

4
Building Software
● When programs were a single file?
● - Just compile it
● - Use your IDE to do its own thing
● Then there was Make
● - Make is evil
● Ant – the de-facto standard for building
Java code – XML-based config files
● Maven – Ant++ - solves the libraries
problem
5
NetBeans projects
● Ant-based projects
● Project file: build.xml
● Can be extended
● Ant tightly integrated

6
Two Project Types
● Regular projects
● Free-form projects
● If you can, use regular projects
● Much easier, setup free
● Default file structure
● The IDE takes care of build.xml

7
Automated Import
● Good news for Java SE projects
created with JBuilder or Eclipse:
● We have project importers
● Available on the update center
● They create the build.xml file
● Works for Java SE Projects

8
Manual import
● Using regular projects
● Create a New Project with Existing
Sources
● Let NetBeans generate build.xml
● Using free-form projects
● Create a New Project with Existing Ant
Script
● Reuse existing build.xml

9
Using Multiple IDEs

Regardless of how you get your


project into NetBeans

It's harmless and easy to still


use those other IDEs

10
Apache Maven
● Get the Maven Module from Tools >
Plugins

● Open any Maven project in NetBeans
● - No NB-specific metadata
● - No special set-up
● - It just uses Maven in-place

11
NetBeans Ready
● Documented examples on using
NetBeans with well-known open source
projects
● Tomcat, Ant, JUnit, ...
● Apply the concepts to your own project
● Add to the Wish List
● Contribute
● http://wiki.netbeans.org/wiki/view/
NetbeansReady
12
Did you know...?
● There are Hibernate, Wicket and Spring
plug-ins for NetBeans
● There is a vi plug-in for NetBeans
● The NetBeans 6 Editor is on par with
Eclipse
● NetBeans has keybindings for Eclipse and
emacs
● Maven is well integrated

13
Conclusion
● There are tools that help with project setup
● Free-form projects and Maven are
interesting for some scenarios
● You can use NetBeans in a multi-IDE
environment
● There is no longer a reason for Eclipse
users not to try NetBeans :-)

14
Using NetBeans For
Your Existing Projects

Potrebbero piacerti anche