Skip to content

Commit 1c4dc27

Browse files
authored
Improve Maven tooling (#1627)
* Improve Maven tooling * Add license, sortpom and spotless Maven plugin configurations similar to other repos * Add license files Signed-off-by: Wouter Born <[email protected]> * Sort POMs and apply Spotless Signed-off-by: Wouter Born <[email protected]> --------- Signed-off-by: Wouter Born <[email protected]>
1 parent eeae654 commit 1c4dc27

File tree

12 files changed

+979
-816
lines changed

12 files changed

+979
-816
lines changed

distributions/openhab-addons/pom.xml

+77-75
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,85 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?><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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
24

3-
<modelVersion>4.0.0</modelVersion>
5+
<modelVersion>4.0.0</modelVersion>
46

5-
<parent>
6-
<groupId>org.openhab.distro</groupId>
7-
<artifactId>pom-distributions</artifactId>
8-
<version>4.2.0-SNAPSHOT</version>
9-
</parent>
7+
<parent>
8+
<groupId>org.openhab.distro</groupId>
9+
<artifactId>pom-distributions</artifactId>
10+
<version>4.2.0-SNAPSHOT</version>
11+
</parent>
1012

11-
<artifactId>openhab-addons</artifactId>
12-
<packaging>kar</packaging>
13+
<artifactId>openhab-addons</artifactId>
14+
<packaging>kar</packaging>
1315

14-
<name>openHAB Add-ons Aggregator</name>
16+
<name>openHAB Add-ons Aggregator</name>
1517

16-
<dependencies>
17-
<dependency>
18-
<groupId>org.openhab.distro</groupId>
19-
<artifactId>addons</artifactId>
20-
<version>${project.version}</version>
21-
<classifier>features</classifier>
22-
<type>xml</type>
23-
</dependency>
24-
<dependency>
25-
<groupId>org.openhab.addons.features.karaf</groupId>
26-
<artifactId>org.openhab.addons.features.karaf.openhab-addons</artifactId>
27-
<version>${project.version}</version>
28-
<classifier>features</classifier>
29-
<type>xml</type>
30-
</dependency>
31-
<dependency>
32-
<groupId>org.openhab.addons.features.karaf</groupId>
33-
<artifactId>openhab-binding-zigbee</artifactId>
34-
<version>${project.version}</version>
35-
<classifier>features</classifier>
36-
<type>xml</type>
37-
</dependency>
38-
<dependency>
39-
<groupId>org.openhab.ui.features</groupId>
40-
<artifactId>org.openhab.ui.features</artifactId>
41-
<version>${project.version}</version>
42-
<classifier>features</classifier>
43-
<type>xml</type>
44-
</dependency>
45-
</dependencies>
18+
<dependencies>
19+
<dependency>
20+
<groupId>org.openhab.distro</groupId>
21+
<artifactId>addons</artifactId>
22+
<version>${project.version}</version>
23+
<classifier>features</classifier>
24+
<type>xml</type>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.openhab.addons.features.karaf</groupId>
28+
<artifactId>org.openhab.addons.features.karaf.openhab-addons</artifactId>
29+
<version>${project.version}</version>
30+
<classifier>features</classifier>
31+
<type>xml</type>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.openhab.addons.features.karaf</groupId>
35+
<artifactId>openhab-binding-zigbee</artifactId>
36+
<version>${project.version}</version>
37+
<classifier>features</classifier>
38+
<type>xml</type>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.openhab.ui.features</groupId>
42+
<artifactId>org.openhab.ui.features</artifactId>
43+
<version>${project.version}</version>
44+
<classifier>features</classifier>
45+
<type>xml</type>
46+
</dependency>
47+
</dependencies>
4648

47-
<build>
48-
<plugins>
49-
<plugin>
50-
<groupId>org.apache.karaf.tooling</groupId>
51-
<artifactId>karaf-maven-plugin</artifactId>
52-
<extensions>true</extensions>
53-
<configuration>
54-
<startLevel>80</startLevel>
55-
<enableGeneration>true</enableGeneration>
56-
<aggregateFeatures>true</aggregateFeatures>
57-
<!-- <resolver>(obr)</resolver> -->
58-
<checkDependencyChange>true</checkDependencyChange>
59-
<failOnDependencyChange>false</failOnDependencyChange>
60-
<logDependencyChanges>true</logDependencyChanges>
61-
<overwriteChangedDependencies>true</overwriteChangedDependencies>
62-
<ignoreDependencyFlag>true</ignoreDependencyFlag>
63-
<archive>
64-
<index>true</index>
65-
<manifestEntries>
66-
<Karaf-Feature-Start>false</Karaf-Feature-Start>
67-
</manifestEntries>
68-
</archive>
69-
</configuration>
70-
<executions>
71-
<execution>
72-
<id>generate-features-file</id>
73-
<phase>generate-resources</phase>
74-
<goals>
75-
<goal>features-generate-descriptor</goal>
76-
</goals>
77-
</execution>
78-
</executions>
79-
</plugin>
80-
</plugins>
81-
</build>
49+
<build>
50+
<plugins>
51+
<plugin>
52+
<groupId>org.apache.karaf.tooling</groupId>
53+
<artifactId>karaf-maven-plugin</artifactId>
54+
<extensions>true</extensions>
55+
<configuration>
56+
<startLevel>80</startLevel>
57+
<enableGeneration>true</enableGeneration>
58+
<aggregateFeatures>true</aggregateFeatures>
59+
<!-- <resolver>(obr)</resolver> -->
60+
<checkDependencyChange>true</checkDependencyChange>
61+
<failOnDependencyChange>false</failOnDependencyChange>
62+
<logDependencyChanges>true</logDependencyChanges>
63+
<overwriteChangedDependencies>true</overwriteChangedDependencies>
64+
<ignoreDependencyFlag>true</ignoreDependencyFlag>
65+
<archive>
66+
<index>true</index>
67+
<manifestEntries>
68+
<Karaf-Feature-Start>false</Karaf-Feature-Start>
69+
</manifestEntries>
70+
</archive>
71+
</configuration>
72+
<executions>
73+
<execution>
74+
<id>generate-features-file</id>
75+
<goals>
76+
<goal>features-generate-descriptor</goal>
77+
</goals>
78+
<phase>generate-resources</phase>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
</plugins>
83+
</build>
8284

8385
</project>

distributions/openhab-demo/pom.xml

+36-34
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?><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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
35

4-
<parent>
5-
<groupId>org.openhab.distro</groupId>
6-
<artifactId>pom-distributions</artifactId>
7-
<version>4.2.0-SNAPSHOT</version>
8-
</parent>
6+
<parent>
7+
<groupId>org.openhab.distro</groupId>
8+
<artifactId>pom-distributions</artifactId>
9+
<version>4.2.0-SNAPSHOT</version>
10+
</parent>
911

10-
<artifactId>openhab-demo</artifactId>
11-
<packaging>pom</packaging>
12+
<artifactId>openhab-demo</artifactId>
13+
<packaging>pom</packaging>
1214

13-
<name>openHAB Demo</name>
15+
<name>openHAB Demo</name>
1416

15-
<build>
16-
<plugins>
17-
<plugin>
18-
<groupId>org.apache.maven.plugins</groupId>
19-
<artifactId>maven-assembly-plugin</artifactId>
20-
<executions>
21-
<execution>
22-
<id>archive</id>
23-
<phase>package</phase>
24-
<goals>
25-
<goal>single</goal>
26-
</goals>
27-
<configuration>
28-
<descriptors>
29-
<descriptor>src/main/descriptors/archive.xml</descriptor>
30-
</descriptors>
31-
<appendAssemblyId>false</appendAssemblyId>
32-
<tarLongFileMode>posix</tarLongFileMode>
33-
</configuration>
34-
</execution>
35-
</executions>
36-
</plugin>
37-
</plugins>
38-
</build>
17+
<build>
18+
<plugins>
19+
<plugin>
20+
<groupId>org.apache.maven.plugins</groupId>
21+
<artifactId>maven-assembly-plugin</artifactId>
22+
<executions>
23+
<execution>
24+
<id>archive</id>
25+
<goals>
26+
<goal>single</goal>
27+
</goals>
28+
<phase>package</phase>
29+
<configuration>
30+
<descriptors>
31+
<descriptor>src/main/descriptors/archive.xml</descriptor>
32+
</descriptors>
33+
<appendAssemblyId>false</appendAssemblyId>
34+
<tarLongFileMode>posix</tarLongFileMode>
35+
</configuration>
36+
</execution>
37+
</executions>
38+
</plugin>
39+
</plugins>
40+
</build>
3941

4042
</project>

distributions/openhab-verify/pom.xml

+72-70
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,80 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?><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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
24

3-
<modelVersion>4.0.0</modelVersion>
5+
<modelVersion>4.0.0</modelVersion>
46

5-
<parent>
6-
<groupId>org.openhab.distro</groupId>
7-
<artifactId>pom-distributions</artifactId>
8-
<version>4.2.0-SNAPSHOT</version>
9-
</parent>
7+
<parent>
8+
<groupId>org.openhab.distro</groupId>
9+
<artifactId>pom-distributions</artifactId>
10+
<version>4.2.0-SNAPSHOT</version>
11+
</parent>
1012

11-
<artifactId>openhab-verify</artifactId>
12-
<packaging>pom</packaging>
13+
<artifactId>openhab-verify</artifactId>
14+
<packaging>pom</packaging>
1315

14-
<name>openHAB Feature Verification</name>
16+
<name>openHAB Feature Verification</name>
1517

16-
<dependencies>
17-
<dependency>
18-
<groupId>org.apache.karaf.features</groupId>
19-
<artifactId>framework</artifactId>
20-
<version>${karaf.version}</version>
21-
<type>kar</type>
22-
<scope>provided</scope>
23-
</dependency>
24-
<dependency>
25-
<groupId>${project.groupId}</groupId>
26-
<artifactId>openhab-addons</artifactId>
27-
<version>${project.version}</version>
28-
<type>kar</type>
29-
<scope>provided</scope>
30-
</dependency>
31-
<dependency>
32-
<groupId>${project.groupId}</groupId>
33-
<artifactId>distro-kar</artifactId>
34-
<version>${project.version}</version>
35-
<type>kar</type>
36-
<scope>provided</scope>
37-
</dependency>
38-
</dependencies>
18+
<dependencies>
19+
<dependency>
20+
<groupId>org.apache.karaf.features</groupId>
21+
<artifactId>framework</artifactId>
22+
<version>${karaf.version}</version>
23+
<type>kar</type>
24+
<scope>provided</scope>
25+
</dependency>
26+
<dependency>
27+
<groupId>${project.groupId}</groupId>
28+
<artifactId>openhab-addons</artifactId>
29+
<version>${project.version}</version>
30+
<type>kar</type>
31+
<scope>provided</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>${project.groupId}</groupId>
35+
<artifactId>distro-kar</artifactId>
36+
<version>${project.version}</version>
37+
<type>kar</type>
38+
<scope>provided</scope>
39+
</dependency>
40+
</dependencies>
3941

40-
<build>
41-
<plugins>
42-
<plugin>
43-
<groupId>org.apache.karaf.tooling</groupId>
44-
<artifactId>karaf-maven-plugin</artifactId>
45-
<executions>
46-
<execution>
47-
<id>verify</id>
48-
<phase>process-resources</phase>
49-
<goals>
50-
<goal>verify</goal>
51-
</goals>
52-
<configuration>
53-
<descriptors>
54-
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor>
55-
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
56-
<descriptor>mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features</descriptor>
57-
<descriptor>mvn:${project.groupId}/addons/${project.version}/xml/features</descriptor>
58-
<descriptor>mvn:${project.groupId}/distro/${project.version}/xml/features</descriptor>
59-
</descriptors>
60-
<distribution>org.apache.karaf.features:framework</distribution>
61-
<javase>${oh.java.version}</javase>
62-
<framework>
63-
<feature>framework</feature>
64-
</framework>
65-
<features>
66-
<feature>openhab-*</feature>
67-
</features>
68-
<verifyTransitive>false</verifyTransitive>
69-
<ignoreMissingConditions>true</ignoreMissingConditions>
70-
<fail>first</fail>
71-
</configuration>
72-
</execution>
73-
</executions>
74-
</plugin>
75-
</plugins>
76-
</build>
42+
<build>
43+
<plugins>
44+
<plugin>
45+
<groupId>org.apache.karaf.tooling</groupId>
46+
<artifactId>karaf-maven-plugin</artifactId>
47+
<executions>
48+
<execution>
49+
<id>verify</id>
50+
<goals>
51+
<goal>verify</goal>
52+
</goals>
53+
<phase>process-resources</phase>
54+
<configuration>
55+
<descriptors>
56+
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor>
57+
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
58+
<descriptor>mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features</descriptor>
59+
<descriptor>mvn:${project.groupId}/addons/${project.version}/xml/features</descriptor>
60+
<descriptor>mvn:${project.groupId}/distro/${project.version}/xml/features</descriptor>
61+
</descriptors>
62+
<distribution>org.apache.karaf.features:framework</distribution>
63+
<javase>${oh.java.version}</javase>
64+
<framework>
65+
<feature>framework</feature>
66+
</framework>
67+
<features>
68+
<feature>openhab-*</feature>
69+
</features>
70+
<verifyTransitive>false</verifyTransitive>
71+
<ignoreMissingConditions>true</ignoreMissingConditions>
72+
<fail>first</fail>
73+
</configuration>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
7779

7880
</project>

0 commit comments

Comments
 (0)