On 12/6/06, Checksum <[EMAIL PROTECTED]> wrote:
Are there any good tutorials for creating a Roller project in NetBeans, or
can someone give a rundown on the best way to do this?
I recently downloaded Roller into NetBeans via the subversion profile, but
received an error right off the bat related to a pojos class when trying to
build the application. Once I cleaned the project though the build ran
successfully. After building from source in NetBeans and testing all units
I wanted to deploy the app to Tomcat so I mapped the target "deploy-tomcat"
to NetBeans "Deploy project" menu item, but again ran into another problem
which required me to edit the ant.properties and custom-ant.xmlf files for
my specific setup. Once I did that the I was able to run the "Deploy
project" menu item to propogate my build to the Tomcat webapp directory, but
again I ran into a problem when trying to start the web app from under the
Tomcat server runtime menu related to JDBC connectivity to the database. I
assume from here I need to make the JDBC available globally via the
CLASSPATH, and install and configure my database of choice, but am I
complicating things here? Is there an easier way to handle this?
You've probably seen the Developer Guide
http://rollerweblogger.org/wiki/Wiki.jsp?page=DeveloperGuide
Here's what I do for my edit-compile-test loop:
1) Run the "rebuild" target to clean and build Roller
2) In my Tomcat install:
- Put JDBC driver in common/lib
- Put my roller-custom.properties in common/classes
- Create a roller.xml in conf/Catalina/localhost
(path to webapp is <roller source dir>/build/webapp
3) When I change just a JSP
- Run the "build" target to copy the JSP to build/webapp
- No Tomcat restart is necessary
4) When I change a Java class
- Run the "build" target to compile and copy updated jar to build/webapp
- Restart Tomcat
5) When I change a POJO, some code and config regen is necessary
- Run the "rebuild" target to rebuild and regen the world
- Restart Tomcat
6) To debug a single unit test
- Set break point in test
- Select the test class in Netbeans Files or Project view
- Use Run->Run File->Debug Test blahtest.java
A target in custom/custom-ant.xmlf ensures that the embeded Derby
database is created, started, the test is run, then the database is
shut down.
I've experimented with redeploying on Tomcat and Glassfish, but never
got it working to my satisfaction.
Hope that helps.
- Dave
--
View this message in context:
http://www.nabble.com/NetBeans-Roller-Project-tf2771139s12275.html#a7729392
Sent from the Roller - Dev mailing list archive at Nabble.com.