Editing New Stages Inside Eclipse (Aspire 2)
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.
- Use the Aspire/Maven archetype (aspire-stage-archetype) to create a new pipeline stage. See Creating a New Pipeline Stage (Aspire 2) for more details.
- We recommend creating the new stage within your Eclipse workspace directory. (It's just simpler that way.)
- Once the stage has been created, move the folder for the Maven project to your Eclipse workspace.
- In Eclipse, execute the File/Import... command.
- Choose Maven/Materialize Maven Projects for the import source.
- When asked for "Maven Artifacts to Import", remove all artifacts from the list (if any).
- Click "Finish."
- You should now be given the opportunity to browse for your new stage project. Click "Browse..." to browse for your "Root Directory:"
- Once located, the "Projects:" list should show the Pom file for your new stage. Make sure it's selected.
- 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.
Null Pointer Exception
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 or add versions to the following plugins:
After updating the POM, try to import again.
If Eclipse is reporting 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)
Build the stage from the command-line once: mvn clean install