chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r787722 - /websites/staging/chemistry/trunk/content/java/developing/dev-eclipse.html
Date Tue, 29 Mar 2011 20:41:00 GMT
Author: buildbot
Date: Tue Mar 29 20:41:00 2011
New Revision: 787722

Staging update by buildbot


Modified: websites/staging/chemistry/trunk/content/java/developing/dev-eclipse.html
--- websites/staging/chemistry/trunk/content/java/developing/dev-eclipse.html (original)
+++ websites/staging/chemistry/trunk/content/java/developing/dev-eclipse.html Tue Mar 29 20:41:00
@@ -186,8 +186,101 @@ Apache Chemistry - Using Eclipse as Deve
              <div class="wiki-content"><h1 id="using_eclipse">Using Eclipse</h1>
 <p>Please note that you can use maven to generate projects for Eclipse (and other
 development tools) by using mvn <code>eclipse:eclipse</code>. For details see
the maven
+documentation. This mechanism also works for other IDEs than Eclipse.</p>
+<h2 id="debugging">Debugging</h2>
+<h3 id="debugging_a_client">Debugging a client</h3>
+<p>Using the Eclipse debugger for a client application usually
+is straightforward. Just create the launch configuration
+(for example Java stand alone application) and run your 
+project in the debugger.</p>
+<h3 id="debugging_a_server">Debugging a server</h3>
+<p>Using the debugger for server development requires the 
+appropriate setup. This is a bit more tricky than on the 
+client side. There are several ways how to do this. Choose
+whatever works best for your environment. The following 
+sections use Apache Tomcat as servlet container for your
+server development project. The same mechanism works for
+other servlet containers and can easily be adapted
+(e.g. Jetty).</p>
+<h4 id="tomcat_remote_debugging">Tomcat Remote Debugging</h4>
+<p>Build your server and create a .war archive. Deploy your
+archive in Tomcat (e.g. copy it to the webapps directory of 
+the Tomcat installation). Start Tomcat in debugging mode. See 
+<a href="">here</a> for details.
Create in Eclipse a launch configuration
+for remote debugging connecting to your Tomcat.</p>
+<p>There are other options as well. You can skip creating the 
+.war file and configure Tomcat to use your build output 
+directory as web application. See the Tomcat documentation
+for more details.</p>
+<h4 id="eclipse_wdt">Eclipse WDT</h4>
+<p>If you use the Eclipse J2EE distribution or have installed
+the Web Development Tools (WDT) you can run/debug your 
+server directly within your IDE. Unfortunately the 
+integration with maven is not very convenient. You have
+to patch the file <code>pom.xml</code> of your server project so 
+that mvn eclipse:eclipse generates a web application. </p>
+<div class="codehilite"><pre>   <span class="nt">&lt;build&gt;</span>
+    <span class="nt">&lt;plugins&gt;</span>
+      . . . 
+        <span class="nt">&lt;plugin&gt;</span>
+            <span class="nt">&lt;groupId&gt;</span>org.apache.maven.plugins<span
+            <span class="nt">&lt;artifactId&gt;</span>maven-eclipse-plugin<span
+            <span class="nt">&lt;version&gt;</span>2.8<span class="nt">&lt;/version&gt;</span>
+            <span class="nt">&lt;configuration&gt;</span>
+               <span class="nt">&lt;wtpversion&gt;</span>2.0<span
+               <span class="nt">&lt;wtpContextName&gt;</span>inmemory<span
+               <span class="nt">&lt;linkedResources&gt;</span>
+                   <span class="nt">&lt;linkedResource&gt;</span>
+                       <span class="nt">&lt;name&gt;</span>src/main/webapp/WEB-INF/sun-jaxws.xml<span
+                       <span class="nt">&lt;type&gt;</span>1<span
+                       <span class="nt">&lt;location&gt;</span><span
class="cp">${</span><span class="n">basedir</span><span class="cp">}</span>/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/sun-jaxws.xml<span
+                   <span class="nt">&lt;/linkedResource&gt;</span>
+                   <span class="nt">&lt;linkedResource&gt;</span>
+                       <span class="nt">&lt;name&gt;</span>src/main/webapp/WEB-INF/web.xml<span
+                       <span class="nt">&lt;type&gt;</span>1<span
+                       <span class="nt">&lt;location&gt;</span><span
class="cp">${</span><span class="n">basedir</span><span class="cp">}</span>/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/web.xml<span
+                   <span class="nt">&lt;/linkedResource&gt;</span>
+                   <span class="nt">&lt;linkedResource&gt;</span>
+                       <span class="nt">&lt;name&gt;</span>src/main/webapp/WEB-INF/wsdl<span
+                       <span class="nt">&lt;type&gt;</span>2<span
+                       <span class="nt">&lt;location&gt;</span><span
class="cp">${</span><span class="n">basedir</span><span class="cp">}</span>/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/wsdl<span
+                   <span class="nt">&lt;/linkedResource&gt;</span>
+               <span class="nt">&lt;/linkedResources&gt;</span>
+            <span class="nt">&lt;/configuration&gt;</span>          
+        <span class="nt">&lt;/plugin&gt;</span>
+<p>If you don't use maven you have to manually create a dynamic
+web project in Eclipse. In this case <code>inmemory</code> is the
+context root of your server. An address like
+<code>http://localhost:8080/inmemory/atom/</code> should work. What
+still needs to be done manually (even with maven) is to 
+configure all the jars needed to run the server. Open the
+project properties in Eclipse and select Deployment Assembly.
+Add / Project and add the following projects:</p>
+<p>Then Add / Java Build Path Entries and add all the jars 
+<p>This setup allows you to add your server project to an existing
+Server configuration in Eclipse. (If your Server tab is 
+empty you first have to create one). In the Server Tab now
+you can run or debug Tomcat with your server project as a 
+deployed web application. </p>
+<h4 id="the_local_binding">The Local Binding</h4>
+<p>OpenCMIS allows to bypass all AtomPub or SOAP protocols
+and directly connect from a client to server using Java 
+classes within a single JVM and is called the Local
+Binding. This can be convenient is some cases and makes
+debugging very easy. For an example see the unit tests of
+the InMemory server (setup() method).
+in some cases.</p></div>
              <!-- Content -->

View raw message