Author: chirino
Date: Wed Sep 20 05:50:59 2006
New Revision: 448192
URL: http://svn.apache.org/viewvc?view=rev&rev=448192
Log:
Latest export from confluence
Modified:
incubator/servicemix/site/sm30ug/importing-servicemix-into-eclipse.html
Modified:
incubator/servicemix/site/sm30ug/importing-servicemix-into-eclipse.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/importing-servicemix-into-eclipse.html?view=diff&rev=448192&r1=448191&r2=448192
==============================================================================
--- incubator/servicemix/site/sm30ug/importing-servicemix-into-eclipse.html
(original)
+++ incubator/servicemix/site/sm30ug/importing-servicemix-into-eclipse.html Wed
Sep 20 05:50:59 2006
@@ -55,7 +55,7 @@
<H2><A
name="ImportingServiceMixintoEclipse-PreparingtheFilesforEclipse"></A>Preparing
the Files for Eclipse</H2>
<OL>
- <LI>Grab the sources from <A href="../SM/source.html"
title="Source">svn</A>or <SPAN class="nobr"><A
href="http://servicemix.org/Download" title="Visit page outside Confluence"
rel="nofollow">download<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> servicemix
source distribution.
+ <LI>Grab the sources from <A href="../SM/source.html"
title="Source">svn</A> or <SPAN class="nobr"><A
href="http://servicemix.org/Download" title="Visit page outside Confluence"
rel="nofollow">download<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> servicemix
source distribution.
<BR clear="all"></LI>
<LI>Open a command line and change to the source root folder. Execute
the following Maven 2 command to ready the project for Eclipse. It will take
around two minutes.
<DIV class="code"><DIV class="codeContent">
@@ -91,14 +91,13 @@
<BR clear="all">
<BR clear="all"> <IMG src="importing-servicemix-into-eclipse.data/Import.png"
align="absmiddle" border="0"><BR clear="all">
</LI>
- <LI>Browse for the root directory, which is the directory in which you
downloaded ServiceMix. "Select All" the files in the Import
pop-up window. They are probably already pre-selected for you (check box is
checked). Un-checking the option "Copy projects into workspace"
allows you to automatically always edit the current version of the SVN checkout
folder, thus avoiding an import after each SVN update. Click "Finish"
in the Import window; the import takes around three minutes.
+ <LI>Browse for the root directory (into which you downloaded
ServiceMix). "Select All" the projects in the
"Import" pop-up window - they are probably already
pre-selected for you (check boxes are checked). Un-checking the option
"Copy projects into workspace" allows you to automatically always
edit the current version of the SVN checkout folder, thus avoiding an import
after each SVN update. Click "Finish" in the "Import"
window; the import takes around three minutes.
<BR clear="all">
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/Import_SelectAll.png"
align="absmiddle" border="0"><BR clear="all">
</LI>
- <LI>From the "Windows" menu and click
"Preferences"<BR>
-The Preferences window will pop-up.<BR>
-Click on the "Java" plus sign and change to "Compiler".<BR>
-Compiler compliance level must be 5.0, pull down menu and select.<BR>
+ <LI>In the menu bar, open "Windows" and click
"Preferences"<BR>
+The "Preferences" window will pop-up.<BR>
+Click on the "Java" plus sign and change to "Compiler".
Compiler compliance level must be 5.0; select this option in the pull down
menu.<BR>
Check the "Use default compliance settings" box.
<BR clear="all">
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/JDK_Compliance.JPG"
align="absmiddle" border="0"><BR clear="all">
@@ -115,9 +114,7 @@
<BR clear="all">
A pop-up appears.<BR>
Enter the Name: M2_REPO<BR>
-Enter the Path of your local maven repository, usually located in <your
home directory>\.m2, for example:<BR>
-C:\Documents and Settings\exjobb\.m2\repository
-<BR clear="all">
+Enter the Path of your local maven repository, usually located in <your
home directory>\.m2, for example: <EM>C:\Documents and
Settings\exjobb\.m2\repository</EM><BR clear="all">
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/eclipse-m2-repo-variable.PNG"
align="absmiddle" border="0"><BR clear="all">
</LI>
@@ -129,9 +126,7 @@
<P>Now you can run an example:</P>
<OL>
- <LI>In the Package Explorer find the Main class, which should be
located in: servicemix-core/src/main/java/<BR>
-under org.apache.servicemix/Main.java.<BR>
-Double click on the main() method.
+ <LI>In the Package Explorer find the Main class, which should be
located in <EM>org.apache.servicemix/Main.java</EM> under
<EM>servicemix-core/src/main/java/</EM> and double click on the main()
method.
<BR clear="all">
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/PackageMainJava.png"
align="absmiddle" border="0"><BR clear="all">
</LI>
@@ -139,16 +134,14 @@
<BR clear="all">
<BR clear="all"> <IMG src="importing-servicemix-into-eclipse.data/RunRun.JPG"
align="absmiddle" border="0"><BR clear="all">
</LI>
- <LI>You will get a Run window pop-up, from there select Java
Application.
+ <LI>You will get a "Run" window pop-up, from there select
"Java Application".
<OL>
- <LI>Click on New button in botton left (Eclipse <3.2) or the
icon in the top left (Eclipse v3.2)</LI>
+ <LI>Click on New button in botton left (Eclipse <v3.2) or
the icon in the top left (Eclipse v3.2)</LI>
<LI>Name the Project: any name you like, for example if you
want to run the FilePoller / FileBinding application call it
"filepoller", so it's easy for you to remember what this run
configuration does.</LI>
<LI>Click on "<B>Arguments</B>" tab:
<OL>
<LI>In the "Program Arguments" box enter
<TT>servicemix.xml</TT></LI>
- <LI>In the Working Directory enter the path of your
example. Such as<BR>
-S:\apache-servicemix\src\main\release\examples\file-binding<BR>
-where S:\ is assumed as your servicemix root directory.<BR>
+ <LI>In the Working Directory enter the path of your
example. Such as
<EM>S:\apache-servicemix\src\main\release\examples\file-binding</EM> where S:\
is assumed as your servicemix root directory.<BR>
You can use the "File System..." button to browse for your directory.
<BR clear="all">
@@ -157,9 +150,11 @@
<BR clear="all"></LI>
</OL>
</LI>
- <LI>Click on the tab "<B>Classpath</B>" to give
Eclipse needed information on where to search for executable files. This
description sticks to the file-binding example, but a similar procedure will be
needed for most examples and your own code as well. There are three main ways
to add classes to the classpath:
+ <LI>Click on the tab "<B>Classpath</B>" to give
Eclipse needed information on where to search for executable files.<BR>
+This description sticks to the file-binding example, but a similar procedure
will be needed for most examples and your own code as well.<BR>
+There are three main ways to add classes to the classpath:
<OL>
- <LI>You can add other projects of the workbench. Doing
this will make the file-binding example run.
+ <LI>You can <B>add other projects of the workbench</B>.
Doing this will make the file-binding example run.
<OL>
<LI>Click "User Entries"</LI>
<LI>Click "Add Projects" and click
the checkbox(es) in front of the project(s) that are required. For convenience
reasons you may click "Select All".
@@ -175,7 +170,7 @@
</LI>
</OL>
</LI>
- <LI>You can add JARs and classes that are stored within
a classpath environment variable. This is not required for the file-binding
example, but possible, e.g. if you want to run a specific ServiceMix version
from a JAR for bug reproduction or the like - this case is used for the
following description. Often, this way is used to reference depenedencies Maven
downloads automatically for you.
+ <LI>You can <B>add JARs and classes</B> that are stored
within a path contained in the classpath environment variable. This is not
required for the file-binding example, but possible, e.g. if you want to run a
specific ServiceMix version from a JAR for bug reproduction - this case is used
for the following description. Often, this way is used to reference
dependencies Maven downloads automatically for you.
<OL>
<LI>Click "User Entries"</LI>
<LI>Click "Advanced", "Add
Classpath Variables" and "OK"
@@ -194,7 +189,7 @@
<BR clear="all">
<BR clear="all">
-In case you want to reference a dependency, proceed in the same way. In case
you do not know which package you shall select, see below.
+In case you want to reference a dependency, proceed in the same way. In case
you do not know which package you shall select, see below at <A
href="#ImportingServiceMixintoEclipse-Troubleshooting" title="Troubleshooting
on Importing ServiceMix into Eclipse">Troubleshooting</A>.
<BR clear="all">
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/Classpath%20-%20Advanced%20Options%20-%20Variable%20-%20Extend.png"
align="absmiddle" border="0"><BR clear="all">
@@ -203,7 +198,7 @@
<LI>Click "OK"</LI>
</OL>
</LI>
- <LI>You can add arbitrary folders to the classpath.
This is usually only needed for your own code. To explain the workflow,
let's assume you did not add any projects, thus your file-binding example
does not run and the console window contains this message:
+ <LI>You can <B>add arbitrary folders</B> to the
classpath. This is usually only needed for your own code. To explain the
workflow, let's assume you did not add any projects, thus your
file-binding example does not run but thows errors and the console window
contains this message:
<DIV class="preformatted"><DIV class="preformattedContent">
<PRE>Error 'Bean class [org.apache.servicemix.components.file.FileWriter]
not found'
</PRE>
@@ -216,11 +211,10 @@
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/Classpath%20-%20Advanced%20Options%20ext%20folder.png"
align="absmiddle" border="0"><BR clear="all">
<BR clear="all"></LI>
- <LI>When S:\ is your servicemix root directory,
select/enter<BR>
-<EM>S:\servicemix-components\target\classes</EM><BR clear="all">
+ <LI>When S:\ is your servicemix root directory,
select/enter <EM>S:\servicemix-components\target\classes</EM><BR clear="all">
<BR clear="all">
-Why this directory? Well, have a closer look at the error message presented
above. The package <EM>org.apache.servicemix.components</EM> indicates the
location of the missing bean <EM>FileWriter</EM> is
<EM>servicemix-components</EM>, and as we need an executable file, the
<EM>target\classes</EM> subdirectory is where to look. Of course we shall proof
that <EM>FileWriter</EM> really is located here, so execute <EM>dir /s
FileWriter.class</EM> in the given directory and watch the output.
+Why this directory? Well, have a closer look at the error message presented
above. The package <EM>org.apache.servicemix.components</EM> indicates the
location of the missing bean <EM>FileWriter</EM> is
<EM>servicemix-components</EM>, and as we need an executable file, the
<EM>target\classes</EM> subdirectory is where to look. Of course we shall proof
that <EM>FileWriter</EM> really is located here, so execute <EM>dir /s
FileWriter.class</EM> in the given directory and watch the output. For further
hints, see below at <A href="#ImportingServiceMixintoEclipse-Troubleshooting"
title="Troubleshooting on Importing ServiceMix into
Eclipse">Troubleshooting</A>.
<BR clear="all">
<BR clear="all"> <IMG
src="importing-servicemix-into-eclipse.data/Classpath%20-%20Advanced%20Options%20-%20external%20folder.png"
align="absmiddle" border="0"><BR clear="all">
@@ -256,7 +250,7 @@
<H3><A
name="ImportingServiceMixintoEclipse-Lengthyerrormessages%28stacktrace%29"></A>Lengthy
error messages (stack trace)</H3>
-<P>Scan the messages in the console window from top to bottom until you find
one stating a missing component, indicated by a package name - in case
it's a "<EM>java.lang.NoClassDefFoundError</EM>" or
"<EM>java.lang.ClassNotFoundException</EM>", the missing class is
printed directly after that error string, whereas for instance "<EM>Error
creating bean with name</EM>" is demanding slightly more search.</P>
+<P>Scan the messages in the console window from top to bottom until you find
one stating a missing component, indicated by a package name - in case
it's a "<EM>java.lang.NoClassDefFoundError</EM>" or
"<EM>java.lang.ClassNotFoundException</EM>", the missing class is
printed directly after that error string, whereas for instance "<EM>Error
creating bean with name</EM>" is demanding slightly more search in order
to find out the missing component.</P>
<P>Messages may look like one of the following</P>
<DIV class="preformatted"><DIV class="preformattedContent">
@@ -268,11 +262,11 @@
<PRE>java.lang.ClassNotFoundException: org.quartz.SimpleTrigger
</PRE>
</DIV></DIV>
-<P>First extract the package name from the error message, so
<EM>org.apache.servicemix.components</EM> respectivly <EM>org.quartz</EM> for
the above examples.</P>
+<P>First extract the package name from the error message, so
<EM>org.apache.servicemix.components</EM> respectively <EM>org.quartz</EM> for
the above examples.</P>
<P>Now, you have to choose the appropriate procedure:</P>
<UL>
- <LI>Build the class / project. See "One or two lines of error
messages" above.</LI>
+ <LI>Build the class / project. "One or two lines of error
messages" above gives some hints.</LI>
<LI>Add the required library to the classpath like stated above for
"Add Classpath Variables". Look in the Maven repository for a folder
matching the missing package. Sometimes the top level domain (org, com, de and
the like) is omitted, so package <EM>org.quartz</EM> may be placed in folder
<EM>quartz</EM>. Then choose a JAR containing executable bytecode classes, so
not the <EM>quartz-1.5.1-sources.jar</EM> but <EM>quartz-1.5.1.jar</EM></LI>
<LI>Add the required library to the classpath like stated above for
"Add External Folder". The package indicates the location of the
missing bean <EM>FileWriter</EM> is <EM>servicemix-components</EM>, and as we
need an executable file, the <EM>target\classes</EM> subdirectory is where to
look. Of course we shall proof that <EM>FileWriter</EM> really is located here,
so execute <EM>dir /s FileWriter.class</EM> in the given directory and watch
the output.</LI>
</UL>
@@ -287,13 +281,13 @@
</DIV>
<DIV id="site-footer">
Added by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=georg_dembowski">Georg
Dembowski</A>,
- last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=georg_dembowski">Georg
Dembowski</A> on Sep 19, 2006
- (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=13740&originalId=13759">view
change</A>)
+ last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=georg_dembowski">Georg
Dembowski</A> on Sep 20, 2006
+ (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=13740&originalId=13770">view
change</A>)
<SPAN id="show" class="inline-control-link"><A href=""
onclick="showComment(); return false;">show comment</A></SPAN>
<SPAN id="hide" class="inline-control-link" style="display:none;"><A
href="" onclick="hideComment(); return false;">hide comment</A></SPAN>
<DIV id="versionComment" class="noteMacro" style="display:none;
padding: 5px;">
<B>Comment:</B>
- indention problem fixed<BR>
+ try to add local links<BR>
<SPAN class="smalltext"><A
href="http://goopen.org/confluence/pages/viewpreviouspageversions.action?pageId=13740">View
page history</A></SPAN>
</DIV>