Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A new file .catalog.xml has been introduced in OFBiz root starting from svn 1326499. This file contains a definition compliant with the Oasis Catalog specification of all schemas used by ofbiz. You can import it in you Eclipse workbench by following the explanation at the Eclipse Import XML catalog section (hint: use the Eclipse Import/XML feature). Note also that the platform:/resource notation is used to identify a resource located in the workspace. The next path segment after "resource" should be the name of a project, which can be followed by the folder and/or file we want to locate. So you might need to change the workspase name part of the path according to your real project name.

Here is an example

 

Eclipse and Gradle

A gradle plug-in exist for eclipse and it is  in the default configuration for the last version of eclipse.

With this plug-in and declare ofbiz as a gradle project, it's possible to view the task list and running them directly by a click, but currently it's not easy to give some parameters values. So it's useful for the basic tasks but not for a full usage of gradle. If you only have a graphical view for the task list, it's more simple to just do (out of eclipse ;-) ./gradlew --gui

After this warning, if you continue to realy want to have ofbiz declare as a Gradle project, you should do 2 steps :

  1. STEP-1 : If you have'nt generate eclipse file (./gradlew eclipse), my advice is to modifying build.gradle before using
    add these lines :
    eclipse {
            project {
              //Eclipse project's comment which appair in Gradle tasks view behind ofbiz
              comment = 'All the main gradle task'
              //Append gradle natures :
              natures 'org.eclipse.buildship.core.gradleprojectnature'
              //Append the gradle build command:
              buildCommand 'org.eclipse.buildship.core.
    
    gradleprojectbuilder'
    
     
  2. STEP-1b : If you have already generate the eclipse file, the .project file should be modified
    You should add two thing :

    1. in <natures> add
              <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
    2. in <buildSpec>
              <buildCommand>
                  <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
                  <arguments/>
              </buildCommand>
  3. STEP-2 : (after the eclipse files generation) you should add a file name org.eclipse.buildship.core.prefs in .settings directory (created by gradle eclipse task)
    the contents of the file should be :

                 build.commands=org.eclipse.jdt.core.javabuilder
                 connection.arguments=
                 connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
                 connection.java.home=null
                 connection.jvm.arguments=
                 connection.project.dir=
                 derived.resources=.gradle,build
                 eclipse.preferences.version=1
                 natures=org.eclipse.jdt.core.javanature
                 project.path=\:

     

  4. You can start eclipse and wait init. You can go to the gradle task view
    Image Added

  5. last warning : do nut use, the eclipse option "convert to gradle project" because it generate a lot of subproject and an error in build path for ofbiz project.