Andreas Pieber wrote: > > Hey Dan, > > Using mvn clean install eclispe:eclipse works for me in all three > major branches (trunk, 2.2.x, 2.1.x). BUT you have to be careful > during the import of existing projects. Eclipses sees/creates some > projects in xxx/target/xxx which you should not import since you get > duplicated projects otherwise and some other projects. I've done it > wrong the first time and get quite strange problems afterwards (wrong > web project, ...) which creates a lot of "false errors" then. > > Hope this helps, > Kind regards, > Andreas > > On Thu, Mar 31, 2011 at 1:48 AM, Dan Tran <[email protected]> wrote: >> Must be something not right at my eclipse, where 'client project' >> depends on karaf's console which depends on jline with provided scope. >> So I am not sure why m2eclipse does not the import the transitive >> provided scope jline to 'client' project >> >> -D >> >> >> On Wed, Mar 30, 2011 at 3:36 PM, Achim Nierbeck >> <[email protected]> wrote: >>> Hi Dan, >>> >>> what usually helps me is to update dependencies via the maven menu. >>> >>> >>> Regards, Achim >>> >>> Am 31.03.2011 00:33, schrieb Dan Tran: >>>> I have no problem doing a clean from root directory ( I have to turn >>>> off my mirror settings which is currently pointing our internal >>>> corporate Nexus instance ) >>>> >>>> A typical problem is syntax error like karaf-client could not find >>>> 'import jline.Terminal' due to jline.jar not imported , by m2eclipse >>>> perhaps? >>>> >>>> -Dan >>>> >>>> On Wed, Mar 30, 2011 at 3:26 PM, Achim Nierbeck >>>> <[email protected]> wrote: >>>>> Try a clean install on the root project, after that all your maven >>>>> dependencies should be visible to eclipse too >>>>> >>>>> regards, Achim >>>>>> I am able to load Karaf into eclipse using m2eclipse. However, half >>>>>> of >>>>>> the subjects show red marks. is It normal? >>>>>> >>>>>> -Dan >>>>>> >>>>>> On Wed, Mar 30, 2011 at 3:19 PM, Achim Nierbeck >>>>>> <[email protected]> wrote: >>>>>>> Yep, use m2e for working with eclipse. This way youre able to debug >>>>>>> whithout any problems. >>>>>>> >>>>>>> regards, Achim >>>>>>>> I don't use eclipse but I would expect using m2e is more likely to >>>>>>>> work. >>>>>>>> >>>>>>>> david jencks >>>>>>>> >>>>>>>> On Mar 30, 2011, at 3:04 PM, Dan Tran wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I need some advice how to load karaf ( from trunk ) source to >>>>>>>>> Eclipse, >>>>>>>>> but it fails big time when using eclipse:eclipse. >>>>>>>>> >>>>>>>>> How do you do it? >>>>>>>>> >>>>>>>>> -Dan >>>>> >>> >>> >> > Dan,
I've been using eclipse to help with my karaf, smx, and camel development for the past year. Here is how I bring Karaf into Eclipse: 1) using the subversive plugin, I download all of the source into a workspace. 2) using the M2Eclipse plugin, I select File -> Import, and then select "Existing Maven Projects" from the Import window's Maven tree, then select "Next" from the bottom of that window. 3) the "Import Maven projects" window should come up, and in that window, the first entry box is "Root Directory:", on the right of this entry window is a "browse" button. Select Browse, and then go to the root directory of the Karaf project you just checked out from subversion. This directory must have a pom.xml file located inside of it. 4) Once you select a root directory, you'll notice that within the "Projects" window you'll see a tree-node view of the entire Karaf project. Next to this window, there is a button called "Select All", select this, and then look at all of the projects located in the "Projects:" window. They should all be checked. If some are not checked, this is the result of those projects already existing in your workspace. You'll need to either rename, move, or delete them from your file directory. 5) If you have a number of different major projects in your workspace, you should create a "Working set" for your karaf project. Go ahead and check the "Add project(s) to working set" button, and then create a workset or use an existing one. 6) Click the "Finish" button at the bottom of the "Import Maven projects" window. 7) Importing the projects may take some time, so go get lunch, chat up that cute co-worker a couple of aisles over, or continue creating your plan for world domination. 8) The last step, and this is only needed if you plan to build from the command-line and inside of karaf, is to change the build directory for the karaf projects. To do this, right-click on each project, scroll down to the bottom of the list, and click "Properties". 9) In the "Properties for " window, select "Java Build Path" from the tree-node in the left-hand pane of the window. Then, select the "Source" tab from the left-hand pane. 10) In the right-hand pane, you should see a list of all the build-path's in your project. Each of these contain an "Output folder" entry. Select each one, and then change it to /eclipse/target/classes. The idea here is to create an area for Eclipse to build the projects in that is different from where your command-line building is taking place. Ok, after making sure you have done everything you were supposed to do to build Karaf (use jdk 1.6, mvn 2.1 or greater, and making sure princexml is on your patch and that a PRINCE_HOME env variable is set), go ahead and try to let Eclipse compile Karaf! If you get a build failiure from Eclipse, please try to compile from the command-line (mvn clean install -Pmanual). Then, let us know how it worked! Please let me know if this was helpful. v/r, Mike Van (aka Karafman) ----- Karaf Team (Contributor) -- View this message in context: http://karaf.922171.n3.nabble.com/Hooking-up-Karaf-Source-with-Eclipse-tp2755976p2759350.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
