You can edit and test new components with Eclipse. However, it is recommended that you create the component outside of Eclipse and 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.
  2. After you create the stage, move the folder for the Maven project to your Eclipse Workspace.
  3. In Eclipse, go to File > Import.
  4. Choose Maven/Materialize Maven Projects for the import source.
  5. In 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 locate your Root Directory:
  8. 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.

  1. Locate the JUnit test for your component under src/test/java.
  2. Right-click on the unit test and select Run As/JUnit Test.

Known issues

Null Pointer Exception

In newer versions of Eclipse, after clicking Finish, the import may fail with a Null Pointer Exception due to compatibility issues in the Maven plugin.

  1. To fix, open the project POM and modify or add versions to the following plugins.
  2. After updating the POM, try to import again.
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>

<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>

maven-bundle-plugin Error

Eclipse may reporti a problem in the pom.xml file at the start of the maven-bundle-plugin block that looks like this:

Error(s) found in manifest configuration (org.apache.felix:maven-bundle-plugin:2.3.7:bundle:default-bundle:package)

If so, build the stage from the command-line once: mvn clean install.

 

  • No labels