openhab-core/pom.xml
Wouter Born 0a755e8f08
Use HTTPS with website URL in pom.xml (#3256)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 21:43:38 +01:00

828 lines
28 KiB
XML

<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab</groupId>
<artifactId>openhab-super-pom</artifactId>
<version>[1.0, 2.0)</version>
</parent>
<groupId>org.openhab.core</groupId>
<artifactId>org.openhab.core.reactor</artifactId>
<version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>openHAB Core</name>
<description>This project contains the core components of openHAB</description>
<organization>
<name>openHAB.org</name>
<url>https://www.openhab.org</url>
</organization>
<licenses>
<license>
<name>Eclipse Public License 2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
</license>
</licenses>
<modules>
<module>bom</module>
<module>bundles</module>
<module>features</module>
<module>tools</module>
<module>itests</module>
</modules>
<scm>
<connection>scm:git:https://github.com/openhab/openhab-core.git</connection>
<developerConnection>scm:git:https://github.com/openhab/openhab-core.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/openhab/openhab-core</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/openhab/openhab-core/issues</url>
</issueManagement>
<distributionManagement>
<repository>
<id>jfrog-release</id>
<url>${oh.repo.distBaseUrl}/libs-release-local</url>
</repository>
<snapshotRepository>
<id>jfrog</id>
<url>${oh.repo.snapshotBaseUrl}/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<oh.java.version>17</oh.java.version>
<maven.compiler.source>${oh.java.version}</maven.compiler.source>
<maven.compiler.target>${oh.java.version}</maven.compiler.target>
<maven.compiler.compilerVersion>${oh.java.version}</maven.compiler.compilerVersion>
<bnd.version>6.4.0</bnd.version>
<commons.net.version>3.7.2</commons.net.version>
<eea.version>2.3.0</eea.version>
<karaf.compile.version>4.3.0</karaf.compile.version>
<karaf.tooling.version>4.3.7</karaf.tooling.version>
<sat.version>0.13.0</sat.version>
<slf4j.version>1.7.32</slf4j.version>
<xtext.version>2.29.0</xtext.version>
<spotless.version>2.28.0</spotless.version>
<spotless.eclipse.version>4.21.0</spotless.eclipse.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.compile</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.compile-model</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.runtime</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.test</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!-- BEG: bnd -->
<!-- Use the bnd-maven-plugin and assemble the symbolic names -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<bnd><![CDATA[Bundle-SymbolicName: ${project.artifactId}
Automatic-Module-Name: ${def;bsn}
Import-Package: \\
io.swagger.v3.oas.annotations.*;resolution:=optional,\\
javax.annotation.security.*;resolution:=optional,\\
org.eclipse.jdt.annotation.*;resolution:=optional,\\
org.openhab.core.automation.annotation.*;resolution:=optional,\\
com.google.common.*;version="14.0",\\
*
-exportcontents: \\
!*.internal.*,\\
!*.impl.*, \\
org.openhab.*,\\
org.openhab.core.*
-noimportjava: true
-sources: false
-contract: *
-includeresource: -${.}/NOTICE, -${.}/*.xsd
-fixupmessages: \\
'Unused Import-Package instructions';is:=ignore,\\
'Unused Export-Package instructions';is:=ignore]]></bnd>
<!-- Bundle-SymbolicName: ${project.groupId}.${project.artifactId} -->
<skipIfEmpty>true</skipIfEmpty>
</configuration>
<executions>
<execution>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Required to make the maven-jar-plugin pick up the bnd generated manifest. Also avoid packaging empty Jars -->
<!-- Moved... -->
<!-- Setup the indexer for running and testing -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-indexer-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<localURLs>REQUIRED</localURLs>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>index</id>
<goals>
<goal>index</goal>
</goals>
<configuration>
<indexName>${project.artifactId}</indexName>
</configuration>
</execution>
<execution>
<id>test-index</id>
<goals>
<goal>index</goal>
</goals>
<configuration>
<indexName>${project.artifactId}</indexName>
<outputFile>${project.build.directory}/test-index.xml</outputFile>
<scopes>
<scope>test</scope>
</scopes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Define the version of the resolver plugin we use -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<failOnChanges>false</failOnChanges>
<bndruns/>
</configuration>
<executions>
<execution>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Define the version of the export plugin we use -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-export-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<resolve>true</resolve>
<failOnChanges>true</failOnChanges>
</configuration>
<executions>
<execution>
<goals>
<goal>export</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Define the version of the testing plugin that we use -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-testing-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<goals>
<goal>testing</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Define the version of the baseline plugin we use and avoid failing when no baseline jar exists. -->
<!-- (for example before the first release) -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<failOnMissing>false</failOnMissing>
</configuration>
<executions>
<execution>
<goals>
<goal>baseline</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- END: bnd -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<compilerId>eclipse</compilerId>
<compilerArguments>
<annotationpath>CLASSPATH</annotationpath>
<classpath>${project.build.directory}/dependency</classpath>
</compilerArguments>
<compilerArgs>
<arg>-err:+nullAnnot(org.eclipse.jdt.annotation.Nullable|org.eclipse.jdt.annotation.NonNull|org.eclipse.jdt.annotation.NonNullByDefault),+inheritNullAnnot,+nullAnnotConflict,-nullUncheckedConversion</arg>
<arg>-warn:+null,+inheritNullAnnot,+nullAnnotConflict,-nullUncheckedConversion,+nullAnnotRedundant,+nullDereference</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.30.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<failOnError>!${quality.skip}</failOnError>
<doclint>none</doclint>
<excludePackageNames>*.internal,*.internal.*</excludePackageNames>
<!-- The search function is broken without the workaround below -->
<!-- See: https://stackoverflow.com/questions/52326318/maven-javadoc-search-redirects-to-undefined-url -->
<additionalJOption>--allow-script-in-comments</additionalJOption>
<bottom>
<![CDATA[
<script>
if (typeof useModuleDirectories !== 'undefined') {
useModuleDirectories = false;
}
</script>
]]>
</bottom>
</configuration>
<dependencies>
<!-- This newer version fixes issues with resolving tech.units:indriya packages -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-java</artifactId>
<version>1.0.7</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<preparationGoals>clean install</preparationGoals>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<argLine>
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
</argLine>
<systemPropertyVariables>
<junit.jupiter.execution.timeout.default>15 m</junit.jupiter.execution.timeout.default>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>${xtext.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>xtend-install-debug-info</goal>
<goal>testCompile</goal>
<goal>xtend-test-install-debug-info</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/xtend-gen</outputDirectory>
<testOutputDirectory>${basedir}/xtend-gen</testOutputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<basedir>${basedir}</basedir>
<header>licenses/epl-2.0/header.txt</header>
<quiet>false</quiet>
<failIfMissing>true</failIfMissing>
<strictCheck>true</strictCheck>
<aggregate>true</aggregate>
<mapping>
<groovy>JAVADOC_STYLE</groovy>
<mwe2>JAVADOC_STYLE</mwe2>
<xtend>JAVADOC_STYLE</xtend>
<xml>xml-header-style</xml>
</mapping>
<headerDefinitions>
<headerDefinition>licenses/epl-2.0/xml-header-style.xml</headerDefinition>
</headerDefinitions>
<includes>
<include>**/archetype/**/*.groovy</include>
<include>**/org/openhab/core/**/*.java</include>
<include>**/org/openhab/core/**/*.mwe2</include>
<include>**/org/openhab/core/**/*.xtend</include>
<include>**/org/openhab/**/*.java</include>
<include>**/org.openhab.core.semantics/**/*.groovy</include>
<include>**/feature.xml</include>
<include>**/OSGI-INF/*.xml</include>
</includes>
<excludes>
<exclude>target/**</exclude>
<exclude>**/pom.xml</exclude>
<exclude>_*.java</exclude>
<exclude>**/archetype/**/feature.xml</exclude>
</excludes>
<useDefaultExcludes>true</useDefaultExcludes>
<properties>
<year>2022</year>
</properties>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openhab.core.tools</groupId>
<artifactId>i18n-maven-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.openhab.tools.sat</groupId>
<artifactId>sat-plugin</artifactId>
<version>${sat.version}</version>
<configuration>
<pmdFilter>${basedirRoot}/tools/static-code-analysis/pmd/suppressions.properties</pmdFilter>
<checkstyleProperties>${basedirRoot}/tools/static-code-analysis/checkstyle/ruleset.properties</checkstyleProperties>
<checkstyleFilter>${basedirRoot}/tools/static-code-analysis/checkstyle/suppressions.xml</checkstyleFilter>
<spotbugsExclude>${basedirRoot}/tools/static-code-analysis/spotbugs/suppressions.xml</spotbugsExclude>
</configuration>
<executions>
<execution>
<id>sat-all</id>
<goals>
<goal>checkstyle</goal>
<goal>pmd</goal>
<goal>spotbugs</goal>
<goal>report</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>2.10.0</version>
<configuration>
<predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
<createBackupFile>false</createBackupFile>
<keepBlankLines>true</keepBlankLines>
</configuration>
<executions>
<execution>
<id>sortpom-verify</id>
<goals>
<goal>verify</goal>
</goals>
<phase>verify</phase>
<configuration>
<verifyFail>Stop</verifyFail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<java>
<eclipse>
<file>openhab_codestyle.xml</file>
<version>${spotless.eclipse.version}</version>
</eclipse>
<removeUnusedImports/>
<importOrder>
<file>openhab.importorder</file>
</importOrder>
<endWithNewline/>
</java>
<formats>
<format>
<!-- *.xml -->
<includes>
<include>src/**/*.xml</include>
</includes>
<excludes>
<exclude>**/feature.xml</exclude>
<exclude>**/pom.xml</exclude>
</excludes>
<eclipseWtp>
<type>XML</type>
<files>
<file>openhab_wst_xml_files.prefs</file>
</files>
<version>${spotless.eclipse.version}</version>
</eclipseWtp>
<trimTrailingWhitespace/>
<endWithNewline/>
</format>
<format>
<!-- feature.xml -->
<includes>
<include>**/src/main/feature/feature.xml</include>
</includes>
<eclipseWtp>
<type>XML</type>
<files>
<file>openhab_wst_feature_file.prefs</file>
</files>
<version>${spotless.eclipse.version}</version>
</eclipseWtp>
<trimTrailingWhitespace/>
<endWithNewline/>
</format>
<format>
<!-- pom.xml -->
<includes>
<include>pom.xml</include>
</includes>
<eclipseWtp>
<type>XML</type>
<files>
<file>openhab_wst_pom_file.prefs</file>
</files>
<version>${spotless.eclipse.version}</version>
</eclipseWtp>
<trimTrailingWhitespace/>
<endWithNewline/>
</format>
</formats>
</configuration>
<dependencies>
<dependency>
<groupId>org.openhab.tools</groupId>
<artifactId>openhab-codestyle</artifactId>
<version>${sat.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>codestyle_check</id>
<goals>
<goal>check</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>directories</id>
<goals>
<goal>highest-basedir</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>basedirRoot</property>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[17.0,18.0)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.openhab.tools.sat</groupId>
<artifactId>sat-extension</artifactId>
<version>${sat.version}</version>
</extension>
</extensions>
</build>
<profiles>
<profile>
<id>eclipse-m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<!-- This plugin's configuration is used to store Eclipse m2e settings only. -->
<!-- It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<versionRange>[4.2.1,)</versionRange>
<goals>
<goal>features-generate-descriptor</goal>
<goal>verify</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<versionRange>[1.4.0,)</versionRange>
<goals>
<goal>java</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-indexer-maven-plugin</artifactId>
<versionRange>[3.1.0,)</versionRange>
<goals>
<goal>index</goal>
<goal>local-index</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>highest-basedir</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>skip-check</id>
<activation>
<property>
<name>skipChecks</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.openhab.tools.sat</groupId>
<artifactId>sat-plugin</artifactId>
<version>${sat.version}</version>
<executions>
<execution>
<id>sat-all</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>check-bundles</id>
<activation>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openhab.tools.sat</groupId>
<artifactId>sat-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>with-bnd-resolver-resolve</id>
<activation>
<property>
<name>withResolver</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<goals>
<goal>resolve</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>