geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > How to Develop Geronimo Eclipse Plugin in Eclipse
Date Fri, 11 Feb 2011 00:10:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/How+to+Develop+Geronimo+Eclipse+Plugin+in+Eclipse">How
to Develop Geronimo Eclipse Plugin in Eclipse</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~tedkirby">Ted
Kirby</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >!figure6.png!\\ \\ \\ <br>#
Select Ok. This will set up the target platform for our GEP development. <br></td></tr>
            <tr><td class="diff-unchanged" >!figure7.png! \\ \\ <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">#
If you are going to use the free OSGi tooling available from http://www.ibm.com/developerworks/rational/downloads/10/rationaldevtoolsforosgiapplications.html,
<br>then download the plugins from the link on that page (currently http://public.dhe.ibm.com/ibmdl/export/pub/software/rational/OSGiAppTools),
<br>and add them to your target platform by location. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Import the source code
in your Eclipse Workspace <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/How+to+Build+Geronimo+Eclipse+Plugin+from+Source"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/How+to+Build+Geronimo+Eclipse+Plugin+from+Source">How
to Build Geronimo Eclipse Plugin from Source</a>&nbsp;</td><td width='33%'
class='ScrollbarParent'><sup><a href="/confluence/display/GMOxDOC30/Apache+Geronimo+Development+Tools+Project"><img
border='0' align='middle' src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Apache+Geronimo+Development+Tools+Project">Apache Geronimo
Development Tools Project</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;<a
href="/confluence/display/GMOxDOC30/How+to+get+daily+Geronimo+Eclipse+Plugin+builds">How
to get daily Geronimo Eclipse Plugin builds</a></td><td class='ScrollbarNextIcon'><a
href="/confluence/display/GMOxDOC30/How+to+get+daily+Geronimo+Eclipse+Plugin+builds"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
<ol>
	<li>Build GEP using Maven.  See <a href="/confluence/display/GMOxDOC30/How+to+Build+Geronimo+Eclipse+Plugin+from+Source"
title="How to Build Geronimo Eclipse Plugin from Source">How to Build Geronimo Eclipse
Plugin from Source</a> for details.  The projects are now ready to be imported into
your Eclipse workspace.</li>
	<li>Launch a clean installation of Eclipse Helios SR1 (See <a href="http://cwiki.apache.org/confluence/display/GMOxDOC21/Apache+Geronimo+Development+Tools+Project#ApacheGeronimoDevelopmentToolsProject-Prerequisites"
class="external-link" rel="nofollow">this page</a> for details).</li>
	<li>Follow these steps blow to complete the configuration of Eclipse for GEP development:
<div>
<ul>
    <li><a href='#HowtoDevelopGeronimoEclipsePlugininEclipse-SetJavaInstalledJREtoJava6'>Set
Java Installed JRE to Java 6</a></li>
    <li><a href='#HowtoDevelopGeronimoEclipsePlugininEclipse-SettheClassPathvariable'>Set
the ClassPath variable</a></li>
    <li><a href='#HowtoDevelopGeronimoEclipsePlugininEclipse-Setthetargetplatform'>Set
the target platform</a></li>
    <li><a href='#HowtoDevelopGeronimoEclipsePlugininEclipse-ImportthesourcecodeinyourEclipseWorkspace'>Import
the source code in your Eclipse Workspace</a></li>
    <li><a href='#HowtoDevelopGeronimoEclipsePlugininEclipse-RunandDebugConfigurations'>Run
and Debug Configurations</a></li>
</ul></div></li>
</ol>


<h3><a name="HowtoDevelopGeronimoEclipsePlugininEclipse-SetJavaInstalledJREtoJava6"></a>Set
Java Installed JRE to Java 6</h3>
<ol>
	<li>Select <b>Window-&gt;Preferences</b></li>
	<li>Select <b>Java-&gt;Installed JREs</b>.</li>
	<li>Ensure you have a Java 6 JRE selected.</li>
	<li>Select <b>Java-&gt;Compiler</b>.</li>
	<li>Ensure you have Compiler compliance level 1.6 selected.
	<ul>
		<li>Doing this avoids about 8 errors like:<br/>
<tt>The method getServerPluginManager() of type GeronimoServer must override a superclass
method</tt>	<br/>
errors, and should be done to match the Java 6 JRE we are using.</li>
	</ul>
	</li>
</ol>


<h3><a name="HowtoDevelopGeronimoEclipsePlugininEclipse-SettheClassPathvariable"></a>Set
the ClassPath variable</h3>
<ol>
	<li>Select <b>Window-&gt;Preferences</b> as ahown in the figure.<br
class="atl-forced-newline" /> <br class="atl-forced-newline" /> <br class="atl-forced-newline"
/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure1.png?version=1&amp;modificationDate=1222050836000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>Select <b>Java-&gt;Build Path-&gt;Classpath Variables</b>.
Select New.<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure2.png?version=1&amp;modificationDate=1222050836000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>Enter the location of your m2repo. My m2repo is located at <b>C:/m2repo</b>.
Select Ok.
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
*Name:* M2_REPO
*Path:* C:\m2repo
</pre>
</div></div>
<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure3.png?version=1&amp;modificationDate=1222050836000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></p></li>
	<li>Once done you can see M2_REPO added to your list of ClassPath variables.<br
class="atl-forced-newline" /> <br class="atl-forced-newline" /> <br class="atl-forced-newline"
/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure4.png?version=1&amp;modificationDate=1222050836000"
style="border: 0px solid black" /></span></li>
</ol>


<h3><a name="HowtoDevelopGeronimoEclipsePlugininEclipse-Setthetargetplatform"></a>Set
the target platform</h3>
<p>An excerpt from the Eclipse help about Target Platform says "Target Platform refers
to the platform against which you are developing and testing your plug-ins. The target platform
encompasses the location of the target, the list of plug-ins constituting the target, the
target environment and launching arguments."<br/>
The following steps need to be performed while configuring the target platform for GEP development.</p>
<ol>
	<li>Select <b>Window-&gt;Preferences</b>.<br class="atl-forced-newline"
/> <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure5.png?version=1&amp;modificationDate=1222050836000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>On the next screen select <b>Plug-in Development-&gt;Target Platform</b>.
Browse to <b>&lt;Local_M2_Repo&gt;/eclipse/eclipse</b>. Select Apply.
	<ul>
		<li><b>Note:</b> menus change in Helios SR1.  Use these steps for Helios
SR1:</li>
	</ul>
	<ol>
		<li>Click Add... target platform</li>
		<li>Next</li>
		<li>Add...</li>
		<li>Select Directory, click Next</li>
		<li>Put your <b>&lt;M2_REPO&gt;/eclipse/eclipse</b> in location.
 (You can use Browse...)</li>
		<li>Click Finish</li>
		<li>Give is a name like <b>M2_REPO&gt;/eclipse/eclipse</b>, and click
Finish.</li>
		<li>Make sure your new platform is selected.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure6.png?version=1&amp;modificationDate=1222050863000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	</ol>
	</li>
	<li>Select Ok. This will set up the target platform for our GEP development.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure7.png?version=1&amp;modificationDate=1222050863000"
style="border: 0px solid black" /></span> <br class="atl-forced-newline" />
<br class="atl-forced-newline" /></li>
	<li>If you are going to use the free OSGi tooling available from <a href="http://www.ibm.com/developerworks/rational/downloads/10/rationaldevtoolsforosgiapplications.html"
class="external-link" rel="nofollow">http://www.ibm.com/developerworks/rational/downloads/10/rationaldevtoolsforosgiapplications.html</a>,<br/>
then download the plugins from the link on that page (currently <a href="http://public.dhe.ibm.com/ibmdl/export/pub/software/rational/OSGiAppTools"
class="external-link" rel="nofollow">http://public.dhe.ibm.com/ibmdl/export/pub/software/rational/OSGiAppTools</a>),<br/>
and add them to your target platform by location.</li>
</ol>


<h3><a name="HowtoDevelopGeronimoEclipsePlugininEclipse-ImportthesourcecodeinyourEclipseWorkspace"></a>Import
the source code in your Eclipse Workspace</h3>
<p>Next step is to import the source code for plug-ins to your workspace. This is the
code with which you will be playing all the time.</p>
<ol>
	<li>Right Click under <b>Project Explorer</b> and Select <b>Import-&gt;Import..</b>.<br
class="atl-forced-newline" /> <br class="atl-forced-newline" /> <br class="atl-forced-newline"
/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure8.png?version=1&amp;modificationDate=1222050863000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>On the next window select <b>General-&gt;Existing Projects into Workspace</b>.
Select <b>Next</b>.<br class="atl-forced-newline" /> <br class="atl-forced-newline"
/> <br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure9.png?version=1&amp;modificationDate=1222050863000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>On the import projects window Browse to <b>&lt;GEP_Source_Home&gt;/trunk</b>.
Select Finish.<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure10.png?version=1&amp;modificationDate=1222050863000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
In case there are some errors try fixing those (consider it as your first step towards working
with GEP! <img class="emoticon" src="/confluence/images/icons/emoticons/smile.gif" height="20"
width="20" align="absmiddle" alt="" border="0"/> ) or else use the <a href="http://geronimo.apache.org/mailing-lists.html"
class="external-link" rel="nofollow">Geronimo mailing lists</a>.  See <a href="/confluence/display/GMOxDOC30/How+to+open+a+bug+for+Geronimo+Eclipse+Plugin"
title="How to open a bug for Geronimo Eclipse Plugin">How to open a bug for Geronimo Eclipse
Plugin</a> for details.</li>
</ol>


<h3><a name="HowtoDevelopGeronimoEclipsePlugininEclipse-RunandDebugConfigurations"></a>Run
and Debug Configurations</h3>
<p>Before you can start running and debusing your code, set up your debug and run configurations.</p>
<ol>
	<li>Select <b>Run-&gt;Run Configurations</b>.<br class="atl-forced-newline"
/> <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure11.png?version=1&amp;modificationDate=1222050894000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>On the <b>Run Configurations</b> window Select <b>Eclipse Application</b>
and Select <b>New</b> button on the top left.<br class="atl-forced-newline"
/> <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure12.png?version=1&amp;modificationDate=1222050894000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>Name the new configuration as <b>GEP_DEVELOPMENT</b>.  Also, change
the workspace location name from <b>runtime-New_location</b> to <b>runtime-GEP_Development</b>.
 Select Apply.<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure13.png?version=1&amp;modificationDate=1222050894000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>Next select the Arguments tab for your <b>GEP_Development</b> run configuration
and set the VM arguments as follows
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
-Xms256m -Xmx256m -XX:MaxPermSize=128m
</pre>
</div></div>
<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure14.png?version=1&amp;modificationDate=1222050894000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></p></li>
	<li>Next select the tracing tab and select the top most 4 jars. See figure below. Select
Apply and Run.<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
<br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure15.png?version=1&amp;modificationDate=1222050893000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>This will launch a new Eclipse window which is nothing but <b>Eclipse + &lt;Your_Plugin_Code&gt;</b>.
You can modify the code and each time you can launch your Eclipse Configuration to test the
modifications in code.<br class="atl-forced-newline" /> <br class="atl-forced-newline"
/> <br class="atl-forced-newline" />
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645304/figure16.png?version=1&amp;modificationDate=1222050904000"
style="border: 0px solid black" /></span><br class="atl-forced-newline" />
<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
	<li>TO Debug the code change to Debug Perspective in eclipse and Select <b>Run-&gt;Debug
Configurations</b>. Select Debug.</li>
</ol>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/How+to+Develop+Geronimo+Eclipse+Plugin+in+Eclipse">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645304&revisedVersion=6&originalVersion=5">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/How+to+Develop+Geronimo+Eclipse+Plugin+in+Eclipse?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message