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/07/18 16:59:17 UTC
[brooklyn-dist] branch master updated: copy the config.properties and edit it to allow reading of x509 classes
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
The following commit(s) were added to refs/heads/master by this push:
new cd0487a copy the config.properties and edit it to allow reading of x509 classes
cd0487a is described below
commit cd0487a7fa80b784d277d8454375576c1e194f92
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Mon Jul 18 17:09:35 2022 +0100
copy the config.properties and edit it to allow reading of x509 classes
---
karaf/features/pom.xml | 68 ++++++++++++++++++++++
.../resources/etc/config.properties | 1 +
2 files changed, 69 insertions(+)
diff --git a/karaf/features/pom.xml b/karaf/features/pom.xml
index 8224e1c..615ba52 100644
--- a/karaf/features/pom.xml
+++ b/karaf/features/pom.xml
@@ -55,6 +55,14 @@
<classifier>features</classifier>
<type>xml</type>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>${karaf.version}</version>
+ <type>kar</type>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
@@ -134,6 +142,66 @@
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>${karaf.version}</version>
+ <type>kar</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.basedir}/target/kars</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <useBaseVersion>true</useBaseVersion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <configuration>
+ <exportAntProperties>true</exportAntProperties>
+ <tasks>
+ <echo message="Unpacking KARs to override" />
+ <unzip src="${project.basedir}/target/kars/framework-${karaf.version}.kar" dest="${project.basedir}/target/kars-expanded/"/>
+
+ <!-- then read the contents, so we can set those in the src/main/filtered-resources/ here
+ do replacements and remove license headers as needed -->
+
+ <echo message="Exporting properties for contents of KAR resources to be included in this project's resources" />
+ <loadfile property="kar.config.properties" srcFile="${project.basedir}/target/kars-expanded/resources/etc/config.properties">
+ <filterchain>
+ <tokenfilter>
+ <linetokenizer/>
+ <replaceregex pattern="sun\.misc,(.*)" replace="sun\.misc, sun.security.x509,\1"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
diff --git a/karaf/features/src/main/filtered-resources/resources/etc/config.properties b/karaf/features/src/main/filtered-resources/resources/etc/config.properties
new file mode 100644
index 0000000..15c457a
--- /dev/null
+++ b/karaf/features/src/main/filtered-resources/resources/etc/config.properties
@@ -0,0 +1 @@
+${kar.config.properties}