You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2022/09/09 20:27:03 UTC

[brooklyn-dist] 01/02: instead of a config bundle, let the feature build install the files it needs

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-dist.git

commit c02999f46e981d4587ef2bc263001ee0e9666c50
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Fri Sep 9 16:11:53 2022 +0100

    instead of a config bundle, let the feature build install the files it needs
    
    files from brooklyn-dist-config are now present in the assembly pre-start;
    this makes them more transparent and easier to override.
---
 karaf/config/pom.xml                               | 77 ----------------------
 karaf/features/pom.xml                             | 36 ----------
 karaf/features/src/main/feature/feature.xml        | 23 -------
 .../resources/catalog/catalog-core.bom             |  0
 .../resources/catalog/catalog-templates.bom        |  0
 .../resources/catalog/catalog.bom                  |  0
 .../etc}/org.apache.brooklyn.classrename.cfg       |  0
 .../etc}/org.apache.brooklyn.osgilauncher.cfg      |  0
 .../etc}/org.apache.felix.scr.ScrService.cfg       |  0
 karaf/pom.xml                                      |  1 -
 10 files changed, 137 deletions(-)

diff --git a/karaf/config/pom.xml b/karaf/config/pom.xml
deleted file mode 100644
index 971c168..0000000
--- a/karaf/config/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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>1.1.0-SNAPSHOT</version> <!-- BROOKLYN_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>
-                <version>3.0.0</version>
-                <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.osgilauncher.cfg
-                                    </file>
-                                    <type>cfg</type>
-                                    <classifier>osgilauncher</classifier>
-                                </artifact>
-                                <artifact>
-                                    <file>
-                                        ${project.basedir}/src/main/resources/catalog/catalog.bom
-                                    </file>
-                                    <type>bom</type>
-                                    <classifier>catalog</classifier>
-                                </artifact>
-                                <artifact>
-                                    <file>
-                                        ${project.basedir}/src/main/resources/catalog/catalog-core.bom
-                                    </file>
-                                    <type>bom</type>
-                                    <classifier>catalog-core</classifier>
-                                </artifact>
-                                <artifact>
-                                    <file>
-                                        ${project.basedir}/src/main/resources/catalog/catalog-templates.bom
-                                    </file>
-                                    <type>bom</type>
-                                    <classifier>catalog-templates</classifier>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git a/karaf/features/pom.xml b/karaf/features/pom.xml
index 4fc7d7b..f32c7a4 100644
--- a/karaf/features/pom.xml
+++ b/karaf/features/pom.xml
@@ -115,42 +115,6 @@
 
             </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}/classes/resources/etc</outputDirectory>
-                        <destFileName>${project.groupId}.classrename.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}/classes/resources/etc</outputDirectory>
-                        <destFileName>${project.groupId}.osgilauncher.cfg</destFileName>
-                      </artifactItem>
-                    </artifactItems>
-                  </configuration>
-                </execution>
-              </executions>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
diff --git a/karaf/features/src/main/feature/feature.xml b/karaf/features/src/main/feature/feature.xml
index a598d6b..c1c2a8c 100644
--- a/karaf/features/src/main/feature/feature.xml
+++ b/karaf/features/src/main/feature/feature.xml
@@ -75,33 +75,10 @@
         <bundle>mvn:jakarta.xml.bind/jakarta.xml.bind-api/${jakarta.xml.bind-api.version}</bundle>  <!-- preferred over servicemix jaxb (identical) -->
     </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}.osgilauncher.cfg" override="false">
-            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/osgilauncher
-        </configfile>
-    </feature>
-
-    <feature name="brooklyn-catalog" version="${project.version}">
-        <configfile finalname="${karaf.home}/catalog/catalog.bom" override="false">
-            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog
-        </configfile>
-        <configfile finalname="${karaf.home}/catalog/catalog-core.bom" override="false">
-            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog-core
-        </configfile>
-        <configfile finalname="${karaf.home}/catalog/catalog-templates.bom" override="false">
-            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog-templates
-        </configfile>
-    </feature>
-
     <feature name="brooklyn-headless" version="${project.version}" description="All Brooklyn bundles with the exception of the launcher and actual ui+rest">
         <feature prerequisite="true">brooklyn-startup-features</feature>
         <feature prerequisite="true">brooklyn-essential-deps</feature>
         <feature prerequisite="true">brooklyn-standard-karaf</feature>
-        <feature prerequisite="true">brooklyn-config</feature>
-        <feature prerequisite="true">brooklyn-catalog</feature>
 
         <feature>brooklyn-core</feature>
         <feature>brooklyn-locations-jclouds</feature>
diff --git a/karaf/config/src/main/resources/catalog/catalog-core.bom b/karaf/features/src/main/filtered-resources/resources/catalog/catalog-core.bom
similarity index 100%
rename from karaf/config/src/main/resources/catalog/catalog-core.bom
rename to karaf/features/src/main/filtered-resources/resources/catalog/catalog-core.bom
diff --git a/karaf/config/src/main/resources/catalog/catalog-templates.bom b/karaf/features/src/main/filtered-resources/resources/catalog/catalog-templates.bom
similarity index 100%
rename from karaf/config/src/main/resources/catalog/catalog-templates.bom
rename to karaf/features/src/main/filtered-resources/resources/catalog/catalog-templates.bom
diff --git a/karaf/config/src/main/resources/catalog/catalog.bom b/karaf/features/src/main/filtered-resources/resources/catalog/catalog.bom
similarity index 100%
rename from karaf/config/src/main/resources/catalog/catalog.bom
rename to karaf/features/src/main/filtered-resources/resources/catalog/catalog.bom
diff --git a/karaf/config/src/main/resources/org.apache.brooklyn.classrename.cfg b/karaf/features/src/main/resources/resources/etc/org.apache.brooklyn.classrename.cfg
similarity index 100%
rename from karaf/config/src/main/resources/org.apache.brooklyn.classrename.cfg
rename to karaf/features/src/main/resources/resources/etc/org.apache.brooklyn.classrename.cfg
diff --git a/karaf/config/src/main/resources/org.apache.brooklyn.osgilauncher.cfg b/karaf/features/src/main/resources/resources/etc/org.apache.brooklyn.osgilauncher.cfg
similarity index 100%
rename from karaf/config/src/main/resources/org.apache.brooklyn.osgilauncher.cfg
rename to karaf/features/src/main/resources/resources/etc/org.apache.brooklyn.osgilauncher.cfg
diff --git a/karaf/config/src/main/resources/org.apache.felix.scr.ScrService.cfg b/karaf/features/src/main/resources/resources/etc/org.apache.felix.scr.ScrService.cfg
similarity index 100%
rename from karaf/config/src/main/resources/org.apache.felix.scr.ScrService.cfg
rename to karaf/features/src/main/resources/resources/etc/org.apache.felix.scr.ScrService.cfg
diff --git a/karaf/pom.xml b/karaf/pom.xml
index d3fe2a5..4a1398f 100644
--- a/karaf/pom.xml
+++ b/karaf/pom.xml
@@ -57,7 +57,6 @@
     </properties>
 
     <modules>
-        <module>config</module>
         <module>features</module>
         <module>apache-brooklyn</module>
         <module>itest</module>