13/06/2001 00:11:33, Jason van Zyl <[EMAIL PROTECTED]> wrote:

>On 6/12/01 7:07 PM, "michael young" <[EMAIL PROTECTED]> wrote:
>
>> Kevin,
>> 
>> I understand the compiler error. The problem is that the file I'm compiling
>> comes from the CVS sources I've checked out from the jakarta-turbine
>> workspace. I've been trying to import these source files into JBuilder,
>> however, I am experiencing compilation errors. The only way I've been able
>> to successfully compile the Turbine sources is using ant, and I've been
>> wondering if that is the only way to compile the sources. I'd like to be
>> able to compile under Jbuilder in case I need to debug the source files.
>
>I'm sure you can get it to work under Jbuilder :-) I don't use
>it myself so I'm not much help.
>
>But do you could document your journey setting up Turbine
>for development in Jbuilder? If you post a text file I'll
>turn it into an xdoc.

I've put together a document describing my experiences with this but 
(ironically) I can't get it all to compile properly after doing a fresh update 
of Turbine. I've attached the document and I'd be glad of any comments (its in 
unwrapped DOS format - let me know if this is a pain).

My current problem is that javac can't find the javax.xml.transform packages. 
Can someone enlighten me as to which jar these should be in? I seem to remember 
there being some discussion of xml libraries clashing on the classpath but I 
can't find it in the archive.

colm
................................................................ 
colm mccartan                        
panasonic owl uk
[EMAIL PROTECTED]
(44) 131 561 1035

My current setup
----------------------------------------------------
Win 2K
JBuilder 4 Enterprise (4.0.147.0)
Sun JDK 1.3.0-C
Tomcat 3.2.1
SmartNode (OpenTool for JBuilder, see below)

After running the TDK build process to create a new webapp I copy the whole webapp 
directory to underneath Tomcat's webapps directory. This is mostly to get the benefit 
of 3.2.1's performance. Debugging under Catalina is not for the impatient.

JBuilder Project
----------------------------------------------------
Create a JBuilder project with the following properties (the first two reflect my 
personal preference to keep IDE and project-related files away from my source and 
classes):

Project path: your_own_area/your_own_projects/webappname/webappname.jpx
Backup path:  your_own_area/your_own_projects/bak/webappname
Source path:  path/to/tomcat/webapps/webappname/WEB-INF/src/java
Output path:  path/to/tomcat/webapps/webappname/WEB-INF/classes/

Required libraries: 

I create one called Tomcat TDK runtime (or whatever). Use 'Configure libraries' to do 
this and add all the jars in:

        path/to/tomcat/webapps/webappname/WEB-INF/lib

If you want to compile the turbine sources you want of course to remove the turbine 
jar - these will be compiled into your output directory.

I also create one called Tomcat 3.2.1 runtimes which includes all jars in 
path/to/tomcat/lib

This creates the basic project and includes the required jars onto the classpath as 
well as our own source. Now we need to add the source from the jakarta-turbine 
release. After this has been fetched using CVS, we want to add this as an extra source 
path in the project's properties, something like:

        your_own_area/src/jakarta-turbine/src/java

I do this to keep it seperate from my own source under the webapp tree but you could 
place it in there also. I personally have found that, since I don't use the freemarker 
or webmacro services, I have to go through and remove various files from this source 
tree (mostly in turbine/services - the compiler messages will keep you straight) 
although I believe the ant build should be able to detect which service jars are 
present and compile accordingly. I assume since I am compiling from within JBuilder I 
have to do this step manually. Its probably easier just to download the various extra 
jars  e.g. webmacro and freemarker - details of these can be found in 
jakarta-turbine/lib/README

Next, we will want to be able to see the templates as well, so I add these as another 
source path like this:

        path/to/tomcat/webapps/webappname/templates

You should find you are able to compile it all, edit, compile and breakpoint your own 
code *and* turbine source when necessary during development.

Some notes
----------------------------------------------------
As I mentioned above, I have found the SmartNode OpenTool to be invaluable for 
development. Although I want to have access to the Turbine source, I don't really want 
to see the whole source tree on my project pane. To this end, I switch off 'source 
package discovery' in the project properties and use SmartNode to import the 
subcategories of my source tree that I want in my project pane. This means that I 
sacrifice Code Completion - I personally find it irritating and I can still use 
'Browse Symbol' on the context menu in the editor to go to any class or method 
definition. SmartNode is available at 
http://www.javabuilders.com/opentools/smartnode_overview.html but you can, of course, 
carry on using 'source package discovery' if you want to. SmartNode also happily lets 
me import my template files.

I use the standard startup and shutdown scripts to launch Tomcat while developing 
unless I need to debug in which case I have to launch it from within the IDE. This 
requires a Run Configuration. Call it whatever you want, I took the following steps to 
get this working and I chose to avoid the integrated Tomcat support in JBuilder, 
mostly because I like to keep these things cleanly seperated:

- use an application tab (as opposed to a JSP/Sevlet type configuration)
- set the main class to org.apache.tomcat.startup.Tomcat (different under catalina - )
- you must add -classic as the *first* VM parameter for it to launch successfully
- pass -Dtomcat.home=/path/to/tomcat as the next VM param (different under catalina - 
should be TOMCAT_HOME)

Please feel free to correct me/share experiences at [EMAIL PROTECTED]

 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to