Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseDebug
AppFuseSupport
Articles
Articles_cn
Articles_de
Articles_ko
Articles_pt
Articles_zh
DevelopmentEnvironme...
DevelopmentEnvironme...
...and 1 more




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseEclipse


Difference between version 46 and version 45:

At line 10 changed 5 lines.
* [3] Add junit.jar to Ant's classpath
* [4] Add build.xml to Ant View
* [5] Run Ant
* [6] Run JUnit Tests in Eclipse
* [7] Tips for Debugging and UI Editing
* [3] Add build.xml to Ant View
* [4] Run Ant
* [5] Run JUnit Tests in Eclipse
* [6] Tips for Debugging and UI Editing
At line 17 changed 1 line.
Open Eclipse (either with an existing or a new workspace) and to go File → New → Project. Then select "Java Project" and hit the Next button. In the Project Name field, enter the name of the directory that your project lives (i.e. c:\source\appfuse).
Open Eclipse (either with an existing or a new workspace) and to go File → New → Project. Then select "Java Project" and hit the Next button. In the Project Name field, enter the name of your project (i.e. appfuse) and the directory that your project lives (i.e. c:\source\appfuse) in the box below. If you're prompted to switch the Java Perspective, choose Yes.
At line 25 changed 1 line.
!!Add J2EE_HOME to Classpath Variables [#2]
!!Configuring Ant in Eclipse [#2]
At line 27 changed 1 line.
Go to Window → Preferences. Navigate to Java → Classpath Variables. Click the New... button and enter J2EE_HOME for the name field. In the path field enter the pathname to the directory of your J2EE JDK or click the Folder.. button and select the directory. Click on OK one or more times to return to the main Eclipse window. Eclipse will now rebuild your project and the Unbound class variable problem should be gone.
The easiest way to configure Eclipse for AppFuse is to install Ant on your hard drive (i.e. c:\Tools\apache-ant-1.6.2) and then point Eclipse's ANT_HOME to this directory. To do this, go to Window → Preferences → Ant → Runtime. Then click the "Ant Home" button and select the installation folder on your hard drive.
At line 29 changed 2 lines.
!!Add JUnit to Ant's classpath [#3]
Adding junit.jar to Ant's classpath is pretty easy. Open Eclipse and go to Window → Preferences. Navigate to Ant → Runtime and you should a window similar to the one below.
If you'd rather use Eclipse's built-in Ant, you'll need to add junit.jar to its classpath. To do this, go to Window → Preferences → Ant → Runtime. Then click the "Add JARs" button and select junit.jar from appfuse/lib/junit3.8.1/lib/junit.jar. Click OK until you arrive back at the workbench view.
At line 32 changed 1 line.
Note - in Eclipse 3.0 the dialog has changed. I found you had to add junit.jar to the "Ant Home Entries" as it didn't work under "Global Entries".
!!Add build.xml to Ant View [#3]
Now we need to add the build.xml to Eclipse's Ant View. To do this, go to Window → Show View → Ant. Then click on the first icon in this view (screenshot below) to add AppFuse's build file.
At line 34 changed 1 line.
[ant-runtime.png]
[ant-view.png]
At line 36 changed 1 line.
You will need to add junit.jar to the __additional classpath entry__ in the bottom pane. If you have Ant installed, and junit.jar in it's ''lib'' directory, I'd use that. Otherwise, you can use the junit.jar file in the lib/junit3.8.1 directory.
!!Run Ant [#4]
After adding the build.xml, you should be able to expand it in the Ant View and execute any of the targets. I usually do "test-all" to verify all the tests pass in my initial project. For a list of targets I use most often, see [AppFuse Ant Targets|AppFuseAntTasks].
At line 38 changed 1 line.
__Note:__ Sometime between M4 and M7, the layout of the Runtime properties page has changed. Be sure to add junit.jar to the __Ant Home Entries__ rather than the ''Global Entries''.
If you're using the internal version of Ant, you may get an error message like the one below:
{{{
BUILD FAILED: C:\source\appfuse\build.xml:802: The following error occurred while executing this line:
C:\source\appfuse\build.xml:780: The following error occurred while executing this line:
java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
}}}
At line 40 changed 2 lines.
!!Add build.xml to Ant View [#4]
Now we need to add the build.xml to Eclipse's Ant View. To do this, go to Window → Show View → Ant. Then click on the first icon in this view (screenshot below) to add AppFuse's build file.
This is because there are tasks that require Xerces to be in your Ant classpath [[[reference|http://wiki.apache.org/jakarta-cactus/FrequentlyAskedQuestions]].
At line 43 changed 1 line.
[ant-view.png]
At this point, you should see something similar to the screenshot below.
At line 45 removed 3 lines.
!!Run Ant [#5]
After adding the build.xml, you should be able to expand it in the Ant View and execute any of the targets. You should make sure that your $J2EE_HOME environment variable is set (not just the Classpath Variables you configured above), since AppFuse relies on this. At this point, you should see something similar to the screenshot below.

Back to AppFuseEclipse, or to the Page History.