Import TTPublisher source file into Eclipse

29 views
Skip to first unread message

Bijan

unread,
Mar 28, 2010, 1:03:08 PM3/28/10
to ttpub-user
This may seem dumb but I have been trying many ways to import the
TTPub source file posted on the web (ttpub_code-1.5.1.zip) into
Eclipse as a web project and subsequently export it as a deployable
WAR file, but none of them worked.

How can you import that source file in Eclipse so that it becomes a
regular Web project in there?
I unzipped the file, and then used the import wizard in Eclipse to
import it as an existing project (General-->Existing Projects into
Workspace). It seems to have imported everything, including all the
java files, class files, build file etc. But then, when I try to
export it as a Web archive file, Eclipse doesn't recognize it as a
valid Web project.

What am I doing wrong?

Frank

unread,
Mar 29, 2010, 1:32:19 PM3/29/10
to ttpub-user
Hi Bijan,

I don't use the web project profile in Eclipse...rather, I use the
Java project profile, and I use Eclipse's built-in Ant support to both
important, and then build TTPUB for me.

The following works for me:

1) Unzip TTPUB.zip source file
2) File->New->Project
3) In the project dialog, open the Java folder
4) Select 'Java Project from Existing Ant Buildfile' option.
5) Select 'Browse' option, and get to the TTPUB directory where the
source exists.
6) Choose the 'build.xml' file in the root ttpub directory.
7) Choose the first 'javac' target (selected by default when
build.xml is opened) from the import dialog.
8) Choose 'Finish' button on the input dialog, and the project
should now be loaded into Eclipse
9) Building TTPUB with Ant: use Eclipse's Ant dialog to build the
war file by opening the Ant View (Window->Views->Ant), and dragging
the built.xml file from the package explorer into the Ant window.
From there, dbl-click on ttpub in the Ant View, and the code should
build the ttpub.war file.

BTW, I use Eclipse to debug TTPUB by doing the following:
a) Build ttpub.war
b) Deploy the ttpub.war into a stand-alone instance of Tomcat
(catalina.sh jpda start)
c) Attach to java process from debug menu (Remote Java
Application), which is the Tomcat I started above in the jpda debugger
d) I set a breakpoint in TTPUB's java code in Eclipse
e) I go to a web browser and execute a ttpub command, and expect
eclipse to stop TTPUB/tomcat execution, and have the code pointer
sitting at the breakpoint I set above.

Good luck,
Frank

Reply all
Reply to author
Forward
0 new messages