Editing New Stages Inside Eclipse

From wiki.searchtechnologies.com
Jump to: navigation, search

For Information on Aspire 3.1 Click Here

It is more than possible to edit and test new components with Eclipse. However, it is recommended to create the component outside of Eclipse, but then to import it into the Eclipse workspace.

  1. Use the Aspire/Maven archetype (aspire-stage-archetype) to create a new pipeline stage. See Creating a New Pipeline Stage for more details.
    • We recommend creating the new stage within your Eclipse workspace directory. (It's just simpler that way.)
  2. Once the stage has been created, move the folder for the Maven project to your Eclipse workspace.
  3. In Eclipse, execute the File/Import... command.
  4. Choose Maven/Materialize Maven Projects for the import source.
  5. When asked for "Maven Artifacts to Import", remove all artifacts from the list (if any).
  6. Click "Finish."
  7. You should now be given the opportunity to browse for your new stage project. Click "Browse..." to browse for your "Root Directory:"
  8. Once located, the "Projects:" list should show the Pom file for your new stage. Make sure it's selected.
  9. Click "Finish."

Your new stage should now be imported into Eclipse and available for Unit Testing. Locate the JUnit test for your component (under src/test/java), and then right-click on the unit test and select "Run As/JUnit Test" to run the unit test.

Known issues

In newer versions of Eclipse (Indigo) after clicking "Finish" the import may fail with a Null Pointer Exception due compatibility issues in the Maven plugin. To fix, open the project POM and modify add versions to the following plugins:


After updating the POM, try to import again.