Skip to content

Commit

Permalink
allow the maven indexer to be configured via config admin
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Oct 11, 2013
1 parent 052a209 commit 93838da
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions hawtio-maven-indexer/pom.xml
Expand Up @@ -116,6 +116,7 @@
<Embed-Transitive>true</Embed-Transitive>
<Bundle-ClassPath>.</Bundle-ClassPath>
<Bundle-Name>${project.description}</Bundle-Name>
<Bundle-Blueprint>OSGI-INF/blueprint/osgi.xml</Bundle-Blueprint>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Import-Package>${fuse.osgi.import}</Import-Package>
<Export-Package>${fuse.osgi.export}</Export-Package>
Expand Down
Expand Up @@ -2,6 +2,15 @@
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0">

<bean id="mavenIndexer" class="io.hawt.maven.indexer.AsyncMavenIndexerFacadeFactory" init-method="init"
destroy-method="destroy" scope="singleton">
<property name="indexDirectory" value="${hawtio.maven.index.dir}"/>
<!--
<property name="repositories" value="${hawtio.maven.index.repos}"/>
-->
</bean>

<!-- non OSGi configuration -->
<ext:property-placeholder>
<ext:default-properties>
<ext:property name="hawtio.maven.index.dir" value=""/>
Expand All @@ -16,12 +25,5 @@
</ext:default-properties>
</ext:property-placeholder>

<bean id="mavenIndexer" class="io.hawt.maven.indexer.AsyncMavenIndexerFacadeFactory" init-method="init"
destroy-method="destroy" scope="singleton">
<property name="indexDirectory" value="${hawtio.maven.index.dir}"/>
<!--
<property name="repositories" value="${hawtio.maven.index.repos}"/>
-->
</bean>
</blueprint>

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">

<bean id="mavenIndexer" class="io.hawt.maven.indexer.AsyncMavenIndexerFacadeFactory" init-method="init"
destroy-method="destroy" scope="singleton">
<property name="indexDirectory" value="${indexDir}"/>
<!--
<property name="repositories" value="${hawtio.maven.index.repos}"/>
-->
</bean>

<!-- OSGi specific Config Admin -->
<ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]" />

<cm:property-placeholder persistent-id="io.hawt.hawtio-maven-indexer" update-strategy="reload">
<cm:default-properties>
<cm:property name="indexDir" value="$[karaf.data]/mavenIndexer"/>
</cm:default-properties>
</cm:property-placeholder>

</blueprint>

0 comments on commit 93838da

Please sign in to comment.