Skip to content

Commit

Permalink
Make the brooklyn server config discoverable by OSGi and downstream p…
Browse files Browse the repository at this point in the history
…rojects

Signed-off-by: Thomas Bouron <thomas.bouron@cloudsoftcorp.com>
  • Loading branch information
tbouron committed Jan 11, 2017
1 parent c982e79 commit 4b800c3
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 1 deletion.
44 changes: 44 additions & 0 deletions karaf/apache-brooklyn/pom.xml
Expand Up @@ -143,6 +143,50 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>brooklyn-dist-config</artifactId>
<version>${project.version}</version>
<classifier>classrename</classifier>
<type>cfg</type>
<outputDirectory>${project.build.directory}/assembly/etc</outputDirectory>
<destFileName>${project.groupId}.classrename.cfg</destFileName>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>brooklyn-dist-config</artifactId>
<version>${project.version}</version>
<classifier>core.catalog.bomscanner</classifier>
<type>cfg</type>
<outputDirectory>${project.build.directory}/assembly/etc</outputDirectory>
<destFileName>${project.groupId}.core.catalog.bomscanner.cfg</destFileName>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>brooklyn-dist-config</artifactId>
<version>${project.version}</version>
<classifier>osgilauncher</classifier>
<type>cfg</type>
<outputDirectory>${project.build.directory}/assembly/etc</outputDirectory>
<destFileName>${project.groupId}.osgilauncher.cfg</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
62 changes: 62 additions & 0 deletions karaf/config/pom.xml
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>brooklyn-dist-karaf</artifactId>
<groupId>org.apache.brooklyn</groupId>
<version>0.11.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>brooklyn-dist-config</artifactId>

<name>Brooklyn Karaf Server Configuration</name>
<description>
Brooklyn Karaf Server Configuration
</description>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifact</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>
${project.basedir}/src/main/resources/org.apache.brooklyn.classrename.cfg
</file>
<type>cfg</type>
<classifier>classrename</classifier>
</artifact>
<artifact>
<file>
${project.basedir}/src/main/resources/org.apache.brooklyn.core.catalog.bomscanner.cfg
</file>
<type>cfg</type>
<classifier>core.catalog.bomscanner</classifier>
</artifact>
<artifact>
<file>
${project.basedir}/src/main/resources/org.apache.brooklyn.osgilauncher.cfg
</file>
<type>cfg</type>
<classifier>osgilauncher</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Expand Up @@ -33,7 +33,6 @@ default.catalog.location=${karaf.etc}/default.catalog.bom
# Location of the local brooklyn.properties file, normally specified at the cli. Overrides properties from the global set.
#localBrooklynPropertiesFile=


# Ignore catalog subsystem failures during startup (default is to continue, so errors can be viewed via the API)
#ignoreCatalogErrors=true

Expand Down
13 changes: 13 additions & 0 deletions karaf/features/src/main/feature/feature.xml
Expand Up @@ -55,7 +55,20 @@
<bundle>mvn:javax.annotation/javax.annotation-api/${cxf.javax.annotation-api.version}</bundle>
</feature>

<feature name="brooklyn-config" version="${project.version}">
<configfile finalname="${karaf.etc}/${groupId}.classrename.cfg" override="false">
mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/classrename
</configfile>
<configfile finalname="${karaf.etc}/${groupId}.core.catalog.bomscanner.cfg" override="false">
mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/core.catalog.bomscanner
</configfile>
<configfile finalname="${karaf.etc}/${groupId}.osgilauncher.cfg" override="false">
mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/osgilauncher
</configfile>
</feature>

<feature name="brooklyn-headless" version="${project.version}" description="All Brooklyn bundles witht the exception of the launcher">
<feature prerequisite="true">brooklyn-config</feature>
<feature prerequisite="true">brooklyn-standard-karaf</feature>
<feature prerequisite="true">brooklyn-guava-optional-deps</feature>
<feature>brooklyn-core</feature>
Expand Down
1 change: 1 addition & 0 deletions karaf/pom.xml
Expand Up @@ -56,6 +56,7 @@
</properties>

<modules>
<module>config</module>
<module>features</module>
<module>apache-brooklyn</module>
<module>itest</module>
Expand Down

0 comments on commit 4b800c3

Please sign in to comment.