星期三, 六月 13, 2007

在Eclipse里设置Carrot2

1. Check out Carrot2 source code from the SVN repository:
   svn co https://svn.sourceforge.net/svnroot/carrot2/trunk carrot2

2. Import all Carrot22 projects into your workspace:
   1)From the Package Explorer's context menu choose Import...
   2)In the first step of the Import wizard, choose General -> Existing projects into Workspace and click Next.
   3)In the next step of the wizard, in the Select root directory field provide the path to your local Carrot2 checkout and click Finish.

3. The Eclipse compile process will fail because of undefined classpath variables: ANT_HOME and CARROT2_CHECKOUT_BASE. To define these variables open the Preferences window (Window -> Preferences...) and then go to (Java -> Build Path -> Classpath variables). Make the ANT_HOME variable point to your local Ant installation and CARROT2_CHECKOUT_BASE to your local Carrot2 repository checkout.

4. Clean all projects (Project -> Clean...) and let Eclipse compile everything again, this time without errors.

5. Run Carrot2 browser using the Run... toolbar icon (Eclipse should have automatically created the appropriate launch entry during project import).

没有评论: