Hitachi Vantara Pentaho Community Wiki
Child pages
  • Making Pentaho Development Easier with Eclipse Build Natures

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Typically, when you set up a Java project in Eclipse, the Eclipse IDE adds a default Java Build Nature, and the project is configured for default automatic building. Eclipse though is capable of incorporating multiple build natures. Please see the Eclipse Article on Natures for more information about build natures as a technology. This article is focused on utilizing this capability in Pentaho projects to make the development process easier.

...

  1. Right-click on the project in Eclipse and choose P+r+operties Properties on the context menu.
  2. In the left panel, select Builders.
  3. In the right-panel, select +N+ew New...
  4. Select Ant Build and click the OK button
  5. Fill out the tabbed dialog with information as follows:
      Image Removed
      • Name Field - set the name to something meaningful. I suggest, when the project has the common_build.xml, using the name Common Ant Builder. Otherwise, you may wish a name that reflects the project like "API Ant Builder".
      • Main Tab
        • You can select the build file using Browse Workspace, but what gets put in is a hard-coded file reference. Instead, it's better to use variables and set it manually. This is important if the file will be checked into SVN. As an example, use ${project_loc}/common_build.xml or ${project_loc}/build.xml if there's no common_build.xml.
        • In the Base Directory field, instead of the hard-coded project location, change the field to say ${project_loc}.
      • Refresh Tab
        • Select the check-box "Refresh resources upon completion."
        • Select the "The project containing the selected resource
      • Targets Tab
        • For the After a "Clean" box, choose the publish-local target.
        • For the Manual Build box, choose the publish-local target
        • For the During a Clean box, choose the clean-dist and clean-jars targets

Launch Configuration Properties - Main Tab

Image Added

Launch Configuration Properties - Refresh Tab

Image Added

Launch Configuration Properties - Targets Tab

Image Added

Results

If this was successful, you should see a new folder in your project called .externalToolBuilders with one file in it. The file will be named according to what you chose above as the name of the builder. To test that things work for you, you can clean an individual project, and you should also see the Ant script execute the target specified.

...