Below is an example of a set of configurations using AppBundles. Note that this is not a "live" configuration, merely a set of components and AppBundles. Therefore, whilst the configuration loads, it is possible that pipelines and events are not configured correctly to communicate with other pipelines.

These are mostly included to show the use of properties in AppBundles as well as to show how AppBundles can be used within other AppBundles and applications.

Remember that most AppBundles are loaded by the System Administration user interface as top-level applications. Therefore, the examples below, while perfectly functional, represent less common use cases for AppBundles.

On this page:

AppBundle Pipeline


The following system file is contained in an appBundle deployed as com.searchtechnologies.aspire:example-abPipeline:1.0-SNAPSHOT. This AppBundle contains a number of components creating a pipeline.

 <?xml version="1.0" encoding="UTF-8"?>
 <application name="ExampleAppBundlePipeline">
   <components>
 
     <component name="FetchUrl" subType="default" factoryName="aspire-fetch-url">
       <prop1>${prop1}</prop1>
       <prop2>${prop2}</prop2>
       <prop3>${prop3}</prop3>
       <prop4>${prop4}</prop4>
       <prop5>${prop5}</prop5>
       <propAll>${prop1}/${prop2}/${prop3}/${prop4}/${prop5}</propAll>
       <home>${aspire.home}</home>
     </component>
 
     <component name="ExtractText" subType="default" factoryName="aspire-extract-text" />
 
     <component name="ExtractDomain" subType="default" factoryName="aspire-extract-domain" />
 
     <component name="PrintToFile" subType="printToError" factoryName="aspire-tools">
       <outputFile>exampleDebug.out</outputFile>
     </component>        
   </components>
 
   <pipelines>
     <pipeline name="doc-process" default="true">
       <stages>
         <stage component="FetchUrl" />
         <stage component="ExtractText" />
         <stage component="ExtractDomain" />
         <stage component="PrintToFile" />
       </stages>
     </pipeline>
   </pipelines>
 </application>

AppBundle

The following system file is contained in an AppBundle deployed as com.searchtechnologies.aspire:example-appBundle:1.0-SNAPSHOT. This AppBundle contains a feedOne component and utilizes the AppBundle pipeline above.

 <?xml version="1.0" encoding="UTF-8"?>
 <application name="ExampleAppBundle">
 
   <components>
     <component name="FeedOne" subType="feedOne" factoryName="aspire-tools">
       <branches>
         <branch event="onPublish" pipelineManager="StandardPipeManager" />
       </branches>
     </component>
 
     <component name="AppBundlePipeline" appBundle="com.searchtechnologies.aspire:example-abPipeline:1.0-SNAPSHOT">
       <properties>
         <property name="prop1">prop1-appBundle</property>
         <property name="prop2">prop2-appBundle</property>
         <property name="prop4">prop4-appBundle</property>
       </properties>
     </component>  
   </components>
 </application>

Distribution

The system file below is from a distribution that uses the two AppBundles above.

 <?xml version="1.0" encoding="UTF-8"?>
 <application name="ExampleDistributionWithAppBundles">
   
   <components>
     <component name="AB1" appBundle="com.searchtechnologies.aspire:example-appBundle:1.0-SNAPSHOT">
       <properties>
         <property name="prop1">prop1-system</property>
         <property name="prop2">prop2-system</property>
         <property name="prop3">prop3-system</property>
       </properties>
     </component>
 
     <component name="AB2" appBundle="com.searchtechnologies.aspire:example-appBundle:1.0-SNAPSHOT"/>
 
     <component name="abPipeManager" appBundle="com.searchtechnologies.aspire:example-abPipeline:1.0-SNAPSHOT">
       <properties>
         <property name="prop1">prop1-system</property>
         <property name="prop5">prop5-system</property>
         <property name="prop4">prop4-system</property>
       </properties>
     </component>
   </components>
 </application>

This distribution has the following settings file:

 <settings>
   <configAdmin>
     <properties pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
       <property name="username">admin</property>
       <property name="password">admin</property>
       <property name="manager.root">/osgi</property>
     </properties>
   </configAdmin>
 
   <autoStart>
     <application config="config/system.xml"/>
   </autoStart>
 
   <properties>
     <property name="prop1">prop1-settings</property>
     <property name="prop2">prop2-settings</property>
     <property name="prop3">prop3-settings</property>
   </properties>
 
   <repositories>
     <repository type="distribution">
       <directory>bundles/aspire</directory>
     </repository>
 
     <repository type="maven">
       <defaultVersion>0.5-SNAPSHOT</defaultVersion>
       <remoteRepositories>
         <remoteRepository>
           <id>stPublic</id>
           <url>http://repositories.searchtechnologies.com:8080/archiva/repository/public/</url>
           <user><USER></user>
           <password><PASSWORD></password>
         </remoteRepository>
       </remoteRepositories>
     </repository>
 
   </repositories>
 </settings>
  • No labels