...
- You can either allow Eclipse to download OFBiz directly from SVN,
- or you can import an already downloaded copy of OFBiz (from SVN or otherwise) from the filesystem.
Info | ||
---|---|---|
| ||
OFBiz has been split between framework and plugins. It's though still possible for Eclipse to handle the plugins inside the framework by embedding the ofbiz-plugins project inside the ofbiz (ofbiz-framework) project. That's interesting notably if you use Subclipse. |
...
|
...
|
...
...
I have though found it can be erratic, but most of the time it works. There is only 1 drawback. If you run gradlew eclipse your ofbiz project will lose the relation with its ofbiz-plugins sub project because this Gradle task delete and create a new .classpath files which destroy the relation created when following the stackoverflow answer. Then you need to make the steps above again. It's maybe the reason why it can be erratic. We can maybe automate that with Gradle but I'm not sure how. |
Importing OFBiz from the filesystem into Eclipse
...
- Right-click in the Navigator window and click on Import.
- Select "Existing Project into Workspace" and click Next.
- Click Browse and select the directory that contains the ".project" file, then click Finish. When this is complete, a new project named "ofbiz" will now appear in your Navigator. This will not copy the project to Eclipse's workspace directory: it will remain wherever it was before the import. If you want the OFBiz files in your workspace directory, you must move them there before you do the import. If you want to Note that by doing so you will not have the the plugins inside your ofbiz project. If you want that, follow the point 3 info in the "Setting up Eclipse to work with OFBiz is easy." section above.
...
Using SVN from within Eclipse
...
- First you need to install Subclipse
- Bring up the "SVN Repository" panel in Eclipse (Window/Open Perspective/SVN Repository Exploring)
- Right-Click within panel/New/Repository Location
Pick the URL of the one you are interested in at http://svn.apache.org/repos/asf/ofbiz/
eg: http://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk/ - Click on Finish. Now, do the initial checkout.
- Click the "+" next to the new repository
- then Right-Click on trunk and select "Checkout...".
- Select "Check out as project in the workspace" and click on "Finish".
- This will create a new project that you can name as you want and download the OFBiz files directly from SVN. To sync your project with SVN in the future, right-click on the project and click Teams/Synchronize with Repository. Note that by doing so you will not have the the plugins inside your ofbiz project. If you want that, follow the info in the "Setting up Eclipse to work with OFBiz is easy" section above.
...
Using GIT from within Eclipse
...
- From the Eclipse main menu, choose: Window -> Perspective -> Open Perspective -> Other -> Git.
- In the "Git Repositories" window click the "Clone a Git repository" link or the "Clone a Git Repository and add the clone to this view" button from the view's toolbar to start git clone wizard.
- On the first page of the wizard, enter the location of the trunk remote repository, among
https://github.com/apache/ofbiz/ (freezed just before the framework and plugins split, 12 Feb 2017). You can use this one for releases branches.
https://github.com/apache/ofbiz-framework
https://github.com/apache/ofbiz-plugins
and click the "Next" button.
There is no Git repo for the branches which support the released packages, but there are SVN repos at
http://svn.apache.org/repos/asf/ofbiz/branches
- On the first page of the wizard, enter the location of the trunk remote repository, among
- On the next "Branche Selection" page, choose which branches shall be cloned from the remote repository (by default all selected).
Example: Click the "Deselect all" button, choose "release16.11" branch and click the "Next" button. - On the "Local Destination" page, choose the directory where you want to store the repository on the local file system and click the "Finish" button.
If you want the OFBiz files in your Eclipse workspace directory, choose: Browse -> [/location/of/the/eclipse/workspace/directory].
Upon successful completion of the clone operation, the newly cloned repository appears automatically in the list of the Git Repositories perspective. - Open the terminal view from within Eclipse: Window -> Show View -> Other -> Terminal -> Terminal.
- In the "Terminal" window, click the "Open a Terminal" button from the view's toolbar (confirm with "Ok" in the "Launch Terminal" window) to start the terminal.
- In the terminal, open the directory where you stored the repository (i.e. /location/of/the/eclipse/workspace/directory/ofbiz) and run
./gradlew eclipse
(Linux) orgradlew eclipse
(Windows). - In the Git Repositories window, expand the ofbiz repository tree, choose: Working Tree -> right click -> Import Projects -> Finish.
...