Aspire Shell is a Groovy driven console for configuring, testing, and executing any document processing tasks in Aspire.
To start Aspire, execute the "aspiresh.sh" or "aspiresh.bat" script in the "bin" directory.
Set your working directory to your Aspire distribution and then execute "bin/aspiresh.sh" (make sure it has execute permission for your user):
$ cd my-aspire/target/my-aspire-1.0-SNAPSHOT-distribution.dir $ bin/aspiresh.sh ************************************************************************ * * ASPIRE BOOTLOADER * * Bundle id : 10 * * Location : file:bundles/boot/aspire-bootloader-3.1.jar * Maven update policy: always Settings (org.apache.felix.webconsole.internal.servlet.OsgiManager): {password=admin, manager.root=/osgi, username=admin} Maven update policy: always Aspire Console Mode Aspire>
Set your working directory to your Aspire distribution and then execute "bin\aspiresh.bat":
$ cd my-aspire\target\my-aspire-1.0-SNAPSHOT-distribution.dir $ bin\aspiresh.bat Removing Felix-Cache and AppBundle-Cache directories ************************************************************************ * * ASPIRE BOOTLOADER * * Bundle id : 10 * * Location : file:bundles/boot/aspire-bootloader-3.1.jar * Maven update policy: always Settings (org.apache.felix.webconsole.internal.servlet.OsgiManager): {password=admin, manager.root=/osgi, username=admin} Maven update policy: always Aspire Console Mode Aspire>
One of the most powerful features in Aspire Shell is the ability to parse and evaluate Groovy Expressions on the fly, just as GroovyShell does. But not only normal Groovy Expressions but also Groovy Pipelines expressions.
Aspire> 5 + 6 11 Aspire> println "hello world, this is Aspire Shell" hello world, this is Aspire Shell
You can load any component by just typing its configuration:
Example:
Aspire> <component name="FetchUrl" subType="default" factoryName="aspire-fetch-url" /> Aspire> <component name="ExtractText" subType="default" factoryName="aspire-extract-text" /> Aspire>
You can also load components with multiple line configurations:
Aspire> <component name="PostHTTP" subType="default" factoryName="aspire-post-http"> Aspire: <postUrl>http://localhost:8983/solr/update</postUrl> Aspire: <postXsl>config/xsl/aspireToSolr.xsl</postXsl> Aspire: <okayResponse><![CDATA[<int name="status">0</int>]]></okayResponse> Aspire: </component> Aspire>
Each component loaded can be accessed by its name:
Aspire> FetchUrl <component name="FetchUrl" subType="default" factoryName="aspire-fetch-url"/> Aspire> ExtractText <component name="ExtractText" subType="default" factoryName="aspire-extract-text"/> Aspire> PostHTTP <component name="PostHTTP" subType="default" factoryName="aspire-post-http"> <postUrl>http://localhost:8983/solr/update</postUrl> <postXsl>config/xsl/aspireToSolr.xsl</postXsl> <okayResponse><int name="status">0</int></okayResponse> </component> Aspire>