mvn archetype:generate -DarchetypeGroupId=com.searchtechnologies.aspire -DarchetypeArtifactId=aspire-stage-archetype -DarchetypeVersion=4.0 -DrepositoryId=stPublic
If the above doesn't work, try adding the following argument to the command:
-DarchetypeRepository=http://repository.searchtechnologies.com/artifactory/public
It will prompt you for several input parameters:
Parameter | Description |
---|---|
aspireStageClassName | Enter the name for the Java Class which will be the implementation for your pipeline stage. For example: MyDoSomethingUseful |
aspireStageDescription | This is a user-friendly description of the stage. It will be included in the ComponentFactory.xml configuration file (stored in the component Jar) as well as in the POM file for the Maven project. It is also shown on the Admin page for the project. Usually it is just a sentence or two. |
aspirePOMName | This is a user-friendly name for the stage. It is stored in the POM file. It will be displayed as Maven builds your project, and it will also be shown in the list of Bundles in the OSGi/Apache Felix web console interface for your component's bundle. |
groupId | The Maven group-id for your new pipeline stage. Typically something like "com.searchtechnologies". Should be unique for your organization across all organizations in the world. |
artifactId | The Maven artifact-id for this project. This is the main Maven identifier for your pipeline stage Jar, within the GroupID. This will be used to locate the artifact on the Search Technologies repository and it will also be used to name the Jar File itself. Typically something like "aspire-rdb". |
version | The version number for your new stage. If it ends in "-SNAPSHOT" (for example, "0.5-SNAPSHOT"), then any update you make to the stage will be immediately available to other users of your stage. In other words, the stage is in "active development" and so everyone will receive the latest when they build their projects. If your stage has been "released", then you should use a version such as "1.0" (i.e. without "-SNAPSHOT"). People who download your stage will only receive a single version of it. Updates to a released version of a stage will not be automatically downloaded by people using it. It was officially "released" after all, if you want to create a new version, then you should update the version number. Note that SNAPSHOT versions use up more disk space on the repository, and so should only be used for releases that are actually in the midst of active development. |
3. After entering all of the parameters, you will be prompted to verify your selections.
Enter 'Y', and then Maven will create your new stage for you.
The instructions for adding new stages to an Eclipse project can be found here:
Editing New Stages Inside Eclipse
The aspire component is now a complete and functioning component. Note that it doesn't yet do anything useful, but it can be completely built and installed into Aspire without further modification. This is what we are going to do now.
cd {your stage directory} mvn clean package
{your stage directory} will be the same as the "artifactId" which you specified above when creating the stage
2. Check the Maven output to see that unit tests and the build all complete successfully.
Will be in the "src/main/java" directory.
Will be in "src/test/java".
Will be in src/main/resources. Default resources are automatically provided for you by the stage archetype. These resources include:
These instructions are appropriate when using the <repository type="maven"> setting in your Aspire settings.xml file.
First, make your new component available to Aspire by doing the following:
mvn clean install
Once this is done, you can then add your new stage to your Aspire System XML file:
These updates can be dynamically incorporated into Aspire. Again, first make your new component available to Aspire with "mvn clean install". Once this is done, click on "Check For Updates" on the http://localhost:50505/aspire page. Your new component should now be flagged as "Update Available". Then click on the reload button for your component to load the new binaries into Aspire.
The following instructions are appropriate if you use the <repository type="distribution"> in your Aspire settings.xml file exclusively (i.e. for some reason you are not using the maven repository option in Aspire)
After you have written and unit-tested your pipeline stage, you can use the following steps to use your stage in a new Aspire installation.
Note: Your changes above may be wiped out if you use Maven to rebuild your distribution (which is only a problem if you used the Maven Distribution Archetype to build your distribution in the first place).
For more information about changing your Maven Distribution Project so it includes your new component everytime, see Using The Maven Distribution Archetype.
Instructions: Modify the source code to convert the <title> element to all caps.