Skip to content

Commit c9976f7

Browse files
authored
[karaf] Fix lifecycle issues during release build. (#22) (#23)
Signed-off-by: Łukasz Dywicki <[email protected]>
1 parent 211bc29 commit c9976f7

File tree

4 files changed

+126
-70
lines changed

4 files changed

+126
-70
lines changed

features/karaf/assembly/pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,6 @@
122122
-->
123123
</blacklistedBundles>
124124
</configuration>
125-
<executions>
126-
<execution>
127-
<id>karaf-feature-verification</id>
128-
<goals>
129-
<goal>verify</goal>
130-
</goals>
131-
<phase>none</phase>
132-
</execution>
133-
</executions>
134125
</plugin>
135126
</plugins>
136127
</build>

features/karaf/opensmarthouse-core/pom.xml

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</parent>
1010

1111
<artifactId>org.opensmarthouse.core.features.karaf.opensmarthouse-core</artifactId>
12-
<packaging>feature</packaging>
12+
<packaging>pom</packaging>
1313

1414
<name>OpenSmartHouse Core | Features | Core</name>
1515
<description>OpenSmartHouse Core Features</description>
@@ -40,7 +40,25 @@
4040
</dependencies>
4141

4242
<build>
43+
<resources>
44+
<resource>
45+
<targetPath>${project.build.directory}/feature</targetPath>
46+
<filtering>true</filtering>
47+
<directory>${project.basedir}/src/main/feature</directory>
48+
</resource>
49+
</resources>
4350
<plugins>
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-resources-plugin</artifactId>
54+
<executions>
55+
<execution>
56+
<goals>
57+
<goal>resources</goal>
58+
</goals>
59+
</execution>
60+
</executions>
61+
</plugin>
4462
<plugin>
4563
<groupId>org.codehaus.mojo</groupId>
4664
<artifactId>build-helper-maven-plugin</artifactId>
@@ -53,6 +71,11 @@
5371
<phase>package</phase>
5472
<configuration>
5573
<artifacts>
74+
<artifact>
75+
<file>${project.build.directory}/feature/feature.xml</file>
76+
<type>xml</type>
77+
<classifier>features</classifier>
78+
</artifact>
5679
<artifact>
5780
<file>${project.build.directory}/feature/feature-compat.xml</file>
5881
<type>xml</type>
@@ -63,10 +86,50 @@
6386
</execution>
6487
</executions>
6588
</plugin>
89+
6690
<plugin>
6791
<groupId>org.apache.karaf.tooling</groupId>
6892
<artifactId>karaf-maven-plugin</artifactId>
6993
<version>${karaf.tooling.version}</version>
94+
<extensions>true</extensions>
95+
<configuration>
96+
<startLevel>80</startLevel>
97+
<aggregateFeatures>true</aggregateFeatures>
98+
<checkDependencyChange>true</checkDependencyChange>
99+
<failOnDependencyChange>false</failOnDependencyChange>
100+
<logDependencyChanges>true</logDependencyChanges>
101+
<overwriteChangedDependencies>true</overwriteChangedDependencies>
102+
</configuration>
103+
<executions>
104+
<execution>
105+
<id>karaf-feature-verification</id>
106+
<goals>
107+
<goal>verify</goal>
108+
</goals>
109+
<phase>process-resources</phase>
110+
<configuration>
111+
<descriptors combine.children="append">
112+
<!-- Apache Karaf -->
113+
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.compile.version}/xml/features</descriptor>
114+
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.compile.version}/xml/features</descriptor>
115+
<!-- Current feature under verification -->
116+
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
117+
</descriptors>
118+
<distribution>org.apache.karaf.features:framework</distribution>
119+
<javase>${osh.java.version}</javase>
120+
<framework>
121+
<feature>framework</feature>
122+
</framework>
123+
<features>
124+
<feature>opensmarthouse-core-*</feature>
125+
<feature>opensmarthouse-runtime-*</feature>
126+
</features>
127+
<verifyTransitive>false</verifyTransitive>
128+
<ignoreMissingConditions>true</ignoreMissingConditions>
129+
<fail>first</fail>
130+
</configuration>
131+
</execution>
132+
</executions>
70133
</plugin>
71134
<plugin>
72135
<groupId>org.codehaus.mojo</groupId>

features/karaf/opensmarthouse-tp/pom.xml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,30 @@
99
</parent>
1010

1111
<artifactId>org.opensmarthouse.core.features.karaf.opensmarthouse-tp</artifactId>
12-
<packaging>feature</packaging>
12+
<packaging>pom</packaging>
1313

1414
<name>OpenSmartHouse Core | Features | Target Platform</name>
1515

1616
<build>
17+
<resources>
18+
<resource>
19+
<targetPath>${project.build.directory}/feature</targetPath>
20+
<filtering>true</filtering>
21+
<directory>${project.basedir}/src/main/feature</directory>
22+
</resource>
23+
</resources>
1724
<plugins>
25+
<plugin>
26+
<groupId>org.apache.maven.plugins</groupId>
27+
<artifactId>maven-resources-plugin</artifactId>
28+
<executions>
29+
<execution>
30+
<goals>
31+
<goal>resources</goal>
32+
</goals>
33+
</execution>
34+
</executions>
35+
</plugin>
1836
<plugin>
1937
<groupId>org.codehaus.mojo</groupId>
2038
<artifactId>build-helper-maven-plugin</artifactId>
@@ -27,6 +45,11 @@
2745
<phase>package</phase>
2846
<configuration>
2947
<artifacts>
48+
<artifact>
49+
<file>${project.build.directory}/feature/feature.xml</file>
50+
<type>xml</type>
51+
<classifier>features</classifier>
52+
</artifact>
3053
<artifact>
3154
<file>${project.build.directory}/feature/feature-compat.xml</file>
3255
<type>xml</type>
@@ -41,6 +64,44 @@
4164
<groupId>org.apache.karaf.tooling</groupId>
4265
<artifactId>karaf-maven-plugin</artifactId>
4366
<version>${karaf.tooling.version}</version>
67+
<extensions>true</extensions>
68+
<configuration>
69+
<startLevel>80</startLevel>
70+
<aggregateFeatures>true</aggregateFeatures>
71+
<checkDependencyChange>true</checkDependencyChange>
72+
<failOnDependencyChange>false</failOnDependencyChange>
73+
<logDependencyChanges>true</logDependencyChanges>
74+
<overwriteChangedDependencies>true</overwriteChangedDependencies>
75+
</configuration>
76+
<executions>
77+
<execution>
78+
<id>karaf-feature-verification</id>
79+
<goals>
80+
<goal>verify</goal>
81+
</goals>
82+
<phase>process-resources</phase>
83+
<configuration>
84+
<descriptors combine.children="append">
85+
<!-- Apache Karaf -->
86+
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.compile.version}/xml/features</descriptor>
87+
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.compile.version}/xml/features</descriptor>
88+
<!-- Current feature under verification -->
89+
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
90+
</descriptors>
91+
<distribution>org.apache.karaf.features:framework</distribution>
92+
<javase>${osh.java.version}</javase>
93+
<framework>
94+
<feature>framework</feature>
95+
</framework>
96+
<features>
97+
<feature>opensmarthouse-tp-*</feature>
98+
</features>
99+
<verifyTransitive>false</verifyTransitive>
100+
<ignoreMissingConditions>true</ignoreMissingConditions>
101+
<fail>first</fail>
102+
</configuration>
103+
</execution>
104+
</executions>
44105
</plugin>
45106
<plugin>
46107
<groupId>org.codehaus.mojo</groupId>

features/karaf/pom.xml

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -50,63 +50,4 @@
5050
</dependency>
5151
</dependencies>
5252

53-
<build>
54-
<pluginManagement>
55-
<plugins>
56-
<plugin>
57-
<groupId>org.apache.karaf.tooling</groupId>
58-
<artifactId>karaf-maven-plugin</artifactId>
59-
<version>${karaf.tooling.version}</version>
60-
<extensions>true</extensions>
61-
<configuration>
62-
<startLevel>80</startLevel>
63-
<aggregateFeatures>true</aggregateFeatures>
64-
<checkDependencyChange>true</checkDependencyChange>
65-
<failOnDependencyChange>false</failOnDependencyChange>
66-
<logDependencyChanges>true</logDependencyChanges>
67-
<overwriteChangedDependencies>true</overwriteChangedDependencies>
68-
</configuration>
69-
<executions>
70-
<execution>
71-
<id>compile</id>
72-
<goals>
73-
<goal>features-generate-descriptor</goal>
74-
</goals>
75-
<phase>generate-resources</phase>
76-
</execution>
77-
<execution>
78-
<id>karaf-feature-verification</id>
79-
<goals>
80-
<goal>verify</goal>
81-
</goals>
82-
<phase>process-resources</phase>
83-
<configuration>
84-
<descriptors combine.children="append">
85-
<!-- Apache Karaf -->
86-
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.compile.version}/xml/features</descriptor>
87-
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.compile.version}/xml/features</descriptor>
88-
<!-- Current feature under verification -->
89-
<descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
90-
</descriptors>
91-
<distribution>org.apache.karaf.features:framework</distribution>
92-
<javase>${osh.java.version}</javase>
93-
<framework>
94-
<feature>framework</feature>
95-
</framework>
96-
<features>
97-
<feature>opensmarthouse.tp-*</feature>
98-
<feature>opensmarthouse-core-*</feature>
99-
<feature>opensmarthouse-runtime-*</feature>
100-
</features>
101-
<verifyTransitive>false</verifyTransitive>
102-
<ignoreMissingConditions>true</ignoreMissingConditions>
103-
<fail>first</fail>
104-
</configuration>
105-
</execution>
106-
</executions>
107-
</plugin>
108-
</plugins>
109-
</pluginManagement>
110-
</build>
111-
11253
</project>

0 commit comments

Comments
 (0)