Wednesday, April 12, 2006

New Appfuse Project in Eclipse

New AppFuse Project in Eclipse - initial startup using hibernate

All this is well documented by Matt Raible but I wanted to have a quick start with some config stuff that I often use for starting up a new AppFuse Project.

1. Download latest appfuse
2. Unzip and go to appfuse folder and run: ant new (and fill in name of project, name of domain, name of database)
3. In eclipse - File -> New Project -> Java Project
  • Fill in Project Name and in "Create Project from existing source" browse to the folder where you got your new project created by the ant new command make in step 2.
  • Clean project: Project->Clean...
  • Open build.properties and Change/add information about your database, e.g.
    database.admin.username=root
    database.admin.password=password

    hibernate.dialect=org.hibernate.dialect.MySQLDialect
    database.driver_class=com.mysql.jdbc.Driver
    database.url=jdbc:mysql://127.0.0.1:3306/myprojectdb
4. Go back to command promt and run ant setup-db and the ant test-all

Notice that tomcat and ant environment variables have to be set in eclipse as well.
Read more about running Appfuse in eclispe here

Project should be built and tested successfullt.

All tutorials and other articles for AppFuse is found here

/C