From a0b1a28bf298a769605a8f3b333d22adc76b82ce Mon Sep 17 00:00:00 2001 From: timw Date: Tue, 28 Sep 2010 09:36:08 +0000 Subject: [PATCH] Moved all Eclipse specific files into res/ide-support/eclipse. Removed spaces from launch target filenames. Corrected launch targets to run in output/build instead of root directory (still not sure if they're a good idea) Added an Ant ide-eclipse target to prepare the working copy to be built with Eclipse and create Eclipse project files. Updated the Building docs to document new Eclipse setup method. Added descriptions of how to configure Eclipse to respect Tomcat coding conventions to the Building guide. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1002073 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 14 ++++++ .../ide-support/eclipse/eclipse.classpath | 0 .../ide-support/eclipse/eclipse.project | 0 .../ide-support/eclipse/start-tomcat.launch | 2 +- .../ide-support/eclipse/stop-tomcat.launch | 2 +- webapps/docs/building.xml | 50 ++++++++++++---------- 6 files changed, 43 insertions(+), 25 deletions(-) rename eclipse.classpath => res/ide-support/eclipse/eclipse.classpath (100%) rename eclipse.project => res/ide-support/eclipse/eclipse.project (100%) rename Start Tomcat.launch => res/ide-support/eclipse/start-tomcat.launch (94%) rename Stop Tomcat.launch => res/ide-support/eclipse/stop-tomcat.launch (94%) diff --git a/build.xml b/build.xml index 5e5d7a26f..fdad9907c 100644 --- a/build.xml +++ b/build.xml @@ -1513,6 +1513,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + @@ -2242,6 +2243,19 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + + + + + + + + Eclipse project files created. +Read the Building page on the Apache Tomcat documentation site for details on how to configure your Eclipse workplace. + + diff --git a/eclipse.classpath b/res/ide-support/eclipse/eclipse.classpath similarity index 100% rename from eclipse.classpath rename to res/ide-support/eclipse/eclipse.classpath diff --git a/eclipse.project b/res/ide-support/eclipse/eclipse.project similarity index 100% rename from eclipse.project rename to res/ide-support/eclipse/eclipse.project diff --git a/Start Tomcat.launch b/res/ide-support/eclipse/start-tomcat.launch similarity index 94% rename from Start Tomcat.launch rename to res/ide-support/eclipse/start-tomcat.launch index 4f4f1eb92..54c5a203a 100644 --- a/Start Tomcat.launch +++ b/res/ide-support/eclipse/start-tomcat.launch @@ -9,5 +9,5 @@ - + diff --git a/Stop Tomcat.launch b/res/ide-support/eclipse/stop-tomcat.launch similarity index 94% rename from Stop Tomcat.launch rename to res/ide-support/eclipse/stop-tomcat.launch index 21c00f47b..cb1e60c6a 100644 --- a/Stop Tomcat.launch +++ b/res/ide-support/eclipse/stop-tomcat.launch @@ -9,5 +9,5 @@ - + diff --git a/webapps/docs/building.xml b/webapps/docs/building.xml index 55b203a49..0dbddec18 100644 --- a/webapps/docs/building.xml +++ b/webapps/docs/building.xml @@ -161,11 +161,6 @@ and the following steps have been used by some developers.

-NOTE: You must complete all the above steps to fetch -dependency libraries and build Tomcat before you can setup an Eclipse project and start -using it. -

-

NOTE: This will not let you build everything under Eclipse; the build process requires use of Ant for the many stages that aren't simple Java compilations. @@ -174,19 +169,19 @@ get warnings, reformat code, perform refactorings, run Tomcat under the IDE, and so on.

-Complete the download of all third party dependencies required to compile the Tomcat -source in Eclipse: +Sample Eclipse project files and launch targets are provided in the +res/ide-support/eclipse directory of the source tree. +The instructions below will automatically copy these into the required locations. +

+

+An Ant target is provided as a convenience to download all binary dependencies, and to create +the Eclipse project and classpath files in the root of the source tree.

cd ${tomcat.source}
- ant extras
+ ant ide-eclipse

-

-Sample Eclipse project and classpath files are provided in the root directory of the source tree. -The sample files are named eclipse.project and eclipse.classpath, and must -be copied to .project and .classpath respectively before proceeding. -

Start Eclipse and create a new Workspace. @@ -212,21 +207,30 @@ and import the Tomcat project located there.

-You may see errors in your problems tab at this point about missing build path dependencies. -If this happens you have forgotten to execute the ant extras build to download -these dependencies. -

- -

-Start Tomcat and Stop Tomcat launch configurations are provided in the -root directory of the source tree and will be available in the Run->Run Configurations -dialog. Use these to start and stop Tomcat from Eclipse. +start-tomcat and stop-tomcat launch configurations are provided in +res/ide-support/eclipse and will be available in the Run->Run Configurations +dialog. Use these to start and stop Tomcat from Eclipse.
If you want to configure these yourself (or are using a different IDE) then use org.apache.catalina.startup.Bootstrap as the main class, -start/stop as program arguments, and specify -Dcatalina.home=... +start/stop etc. as program arguments, and specify -Dcatalina.home=... (with the name of your build directory) as VM arguments.

+

+Tweaking a few formatting preferences will make it much easier to keep consistent with Tomcat +coding conventions (and have your contributions accepted): +

+

+ + + + + + + +
Java -> Code Style -> Formatter -> Edit...Tab policy: Spaces only
Tab and Indentation size: 4
General -> Editors -> Text EditorsDisplayed tab width: 2
Insert spaces for tabs
Show whitespace characters (optional)
XML -> XML Files -> EditorIndent using spaces
Indentation size: 2
Ant -> Editor -> FormatterTab size: 2
Use tab character instead of spaces: unchecked
+

+
-- 2.11.0