tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1002073 - in /tomcat/trunk: ./ res/ide-support/ res/ide-support/eclipse/ webapps/docs/
Date Tue, 28 Sep 2010 09:36:08 GMT
Author: timw
Date: Tue Sep 28 09:36:08 2010
New Revision: 1002073

URL: http://svn.apache.org/viewvc?rev=1002073&view=rev
Log:
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.

Added:
    tomcat/trunk/res/ide-support/
    tomcat/trunk/res/ide-support/eclipse/
    tomcat/trunk/res/ide-support/eclipse/eclipse.classpath
      - copied unchanged from r1001386, tomcat/trunk/eclipse.classpath
    tomcat/trunk/res/ide-support/eclipse/eclipse.project
      - copied unchanged from r1001386, tomcat/trunk/eclipse.project
    tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch
      - copied, changed from r1001386, tomcat/trunk/Start Tomcat.launch
    tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch
      - copied, changed from r1001386, tomcat/trunk/Stop Tomcat.launch
Removed:
    tomcat/trunk/Start Tomcat.launch
    tomcat/trunk/Stop Tomcat.launch
    tomcat/trunk/eclipse.classpath
    tomcat/trunk/eclipse.project
Modified:
    tomcat/trunk/build.xml
    tomcat/trunk/webapps/docs/building.xml

Modified: tomcat/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1002073&r1=1002072&r2=1002073&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Tue Sep 28 09:36:08 2010
@@ -1513,6 +1513,7 @@ Apache Tomcat ${version} native binaries
         <exclude name=".settings/**"/>
         <exclude name=".classpath"/>
         <exclude name=".project"/>
+        <exclude name="*.launch"/>
         <exclude name="modules/**"/>
         <exclude name="output/**"/>
         <exclude name="build.properties"/>
@@ -2242,6 +2243,19 @@ Apache Tomcat ${version} native binaries
     <get src="${sourcefile}" dest="${destfile}" />
   </target>
 
+  <!-- ============================ IDE Support ============================ -->
+
+  <target name="ide-eclipse" depends="deploy, extras-webservices-prepare"
+          description="Prepares the source tree to be built in Eclipse">
+
+    <!-- Copy the sample project files into the root directory -->
+    <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
+    <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.classpath" tofile="${tomcat.home}/.classpath"/>
+
+    <echo>Eclipse project files created.
+Read the Building page on the Apache Tomcat documentation site for details on how to configure
your Eclipse workplace.</echo>
+  </target>
+
   <!-- ======================= Macros, Taskdefs etc ======================== -->
 
   <macrodef name="jarIt" description="utility macro for standard JAR packaging">

Copied: tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch (from r1001386, tomcat/trunk/Start
Tomcat.launch)
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch?p2=tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch&p1=tomcat/trunk/Start%20Tomcat.launch&r1=1001386&r2=1002073&rev=1002073&view=diff
==============================================================================
--- tomcat/trunk/Start Tomcat.launch (original)
+++ tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch Tue Sep 28 09:36:08 2010
@@ -9,5 +9,5 @@
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.catalina.startup.Bootstrap"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="start"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="tomcat-7.0.x"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcatalina.home=${project_loc:/tomcat-7.0.x/java/org/apache/catalina/startup/Bootstrap.java}"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcatalina.home=${project_loc:/tomcat-7.0.x/java/org/apache/catalina/startup/Bootstrap.java}/output/build"/>
 </launchConfiguration>

Copied: tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch (from r1001386, tomcat/trunk/Stop
Tomcat.launch)
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch?p2=tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch&p1=tomcat/trunk/Stop%20Tomcat.launch&r1=1001386&r2=1002073&rev=1002073&view=diff
==============================================================================
--- tomcat/trunk/Stop Tomcat.launch (original)
+++ tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch Tue Sep 28 09:36:08 2010
@@ -9,5 +9,5 @@
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.catalina.startup.Bootstrap"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="stop"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="tomcat-7.0.x"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcatalina.home=${project_loc:/tomcat-7.0.x/java/org/apache/catalina/startup/Bootstrap.java}"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcatalina.home=${project_loc:/tomcat-7.0.x/java/org/apache/catalina/startup/Bootstrap.java}/output/build"/>
 </launchConfiguration>

Modified: tomcat/trunk/webapps/docs/building.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/building.xml?rev=1002073&r1=1002072&r2=1002073&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/building.xml (original)
+++ tomcat/trunk/webapps/docs/building.xml Tue Sep 28 09:36:08 2010
@@ -161,11 +161,6 @@ and the following steps have been used b
 </p>
 
 <p>
-<b>NOTE:</b> You <b>must</b> complete all the above steps to fetch
-dependency libraries and build Tomcat before you can setup an Eclipse project and start
-using it.
-</p>
-<p>
 <b>NOTE:</b> 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 ref
 under the IDE, and so on.
 </p>
 <p>
-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 
+<code>res/ide-support/eclipse</code> directory of the source tree.
+The instructions below will automatically copy these into the required locations.
+</p>
+<p>
+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.
 <br/>
 <code><br/>
     cd ${tomcat.source}<br/>
-    ant extras<br/>
+    ant ide-eclipse<br/>
 </code>
 </p>
-<p>
-Sample Eclipse project and classpath files are provided in the root directory of the source
tree.
-The sample files are named <code>eclipse.project</code> and <code>eclipse.classpath</code>,
and must
-be copied to <code>.project</code> and <code>.classpath</code> respectively
before proceeding.
-</p>
 
 <p>
 Start Eclipse and create a new Workspace.
@@ -212,21 +207,30 @@ and import the Tomcat project located th
 </p>
 
 <p>
-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 <code>ant extras</code> build
to download 
-these dependencies.
-</p>
-
-<p>
-<code>Start Tomcat</code> and <code>Stop Tomcat</code> launch configurations
are provided in the
-root directory of the source tree and will be available in the <em>Run-&gt;Run
Configurations</em>
-dialog. Use these to start and stop Tomcat from Eclipse. 
+<code>start-tomcat</code> and <code>stop-tomcat</code> launch configurations
are provided in
+<code>res/ide-support/eclipse</code> and will be available in the <em>Run-&gt;Run
Configurations</em>
+dialog. Use these to start and stop Tomcat from Eclipse.
 <br/>If you want to configure these yourself (or are using a different IDE) 
 then use <code>org.apache.catalina.startup.Bootstrap</code> as the main class,
-<code>start</code>/<code>stop</code> as program arguments, and specify
<code>-Dcatalina.home=...</code> 
+<code>start</code>/<code>stop</code> etc. as program arguments, and
specify <code>-Dcatalina.home=...</code> 
 (with the name of your build directory) as VM arguments.
 </p>
 
+<p>
+Tweaking a few formatting preferences will make it much easier to keep consistent with Tomcat

+coding conventions (and have your contributions accepted):
+</p>
+<p>
+<table border="1">
+  <tr><td>Java -&gt; Code Style -> Formatter -&gt; Edit...</td>
+  <td>Tab policy: Spaces only<br/>Tab and Indentation size: 4</td></tr>
+  <tr><td>General -&gt; Editors -> Text Editors</td>
+  <td>Displayed tab width: 2<br/>Insert spaces for tabs<br/>Show whitespace
characters (optional)</td></tr>
+  <tr><td>XML -&gt; XML Files -> Editor</td><td>Indent using
spaces<br/>Indentation size: 2</td></tr>
+  <tr><td>Ant -&gt; Editor -> Formatter</td><td>Tab size:
2<br/>Use tab character instead of spaces: unchecked</td></tr>
+</table>
+</p>
+
 </section>
 
 <section name="Building with other IDEs">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message