Hi Pontus

That helped a lot, thank you very much. I succeeded with your desciption with 
the subversive plugin as well, but had to install another additional plugin for 
the integration with the m2plugin. I try to update the wiki page "Setting up 
Eclipse IDE" with this in the next few days.

After having the code in eclipse there are some more questions to work 
productive with sling:
What are the best practice by now:
- to debug sling (and self made bundles) with eclipse?
- to explore/modify the jcr (webdav is not sufficent)

best regards
mike


> -----Ursprüngliche Nachricht-----
> Von: Pontus Amberg [mailto:[email protected]]
> Gesendet: Montag, 13. April 2009 22:29
> An: [email protected]
> Betreff: Re: Problems to build in eclipse
>
>
> Hi Mike.
>
> I'm using the almost the same config as you but subclipse instead of
> subversive and the easiest way
> I've found to get and build Sling in Eclipse is to use the
> "import..."
> option the the File menu. I also turn
> of the automatic build in Eclipse and instead use a run
> configuration to
> build Sling.
>
> First create a new Workspace
> 1. Menu: File->Switch Workspace->Other...
> 2. Enter a path for the new workspace and click OK
>
> When Eclipse has restarted its time to adjust some configs
> 1. Turn off automatic build (Menu: Project->Build Automatically)
> 2. Menu: Window->Preferences
> 3. In the preferences dialog select Java->Compiler->Errors/Warnings
> 4. Expand the "Deprecated and restricted API" and change  "Forbidden
> references (access rules)" from "Error" to "Warning"
> 5. Click OK
>
> Now its time to fetch the Sling source
> 1. Menu: File->Import
> 2. In the Import wizard select Maven->"Check out Maven
> Projects from SCM"
> 3. Click next
> 4. In the "SCM URL" field pick "SVN" and enter the url
> "http://svn.apache.org/repos/asf/incubator/sling/trunk";
> 5. Click Finish
>
> Eclipse will now start to download the source and import the Maven
> projects. You might
> encounter some "Problem Occured" dialogs about "An internal error..."
> but just click OK
> on those and let Eclipse continue with the import.
>
> When I've used Import to fetch Sling something in
> sling-builder seem to
> get a bit messed up but that can
> simply be fixed with revert.
> 1. In the Project Explorer right click on the "sling-builder" project
> and select the Team->Revert... menu
> 2. A couple of changes (9 in my case) will be displayed
> 3. Click OK
>
> Now its time to create a new run config used to build Sling
> 1. Make sure you're in the Java perspective (Menu:
> Window->Open Perspective)
> 2. Menu: Run->Run Configurations...
> 3. In the Run Configurationa dialog right click on "Maven Build" and
> select "New"
> 4. Change Name to "Build Sling"
> 5. Click "Browse Workspace..." and select "sling-builder"
> 6. Enter "clean install" in Goals
> 7. Click on the JRE tab
> 8. Enter "-Xmx256m -XX:MaxPermSize=128m" in "VM arguments"
> 11. Click Apply
> 12. Click Run
>
> This should build Sling.
>
> /Pontus

Reply via email to