Table of Contents |
---|
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):
Code Block |
---|
$ 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.2.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":
Code Block |
---|
$ 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.2.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.
Code Block |
---|
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:
Code Block |
---|
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:
Code Block |
---|
Aspire>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> |
Code Block |
Each component loaded can be accessed by its name:
Code Block |
---|
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> |
Code Block |
---|