natives
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.github.cowwoc.requirements</groupId>
<artifactId>natives</artifactId>
<version>8.0.10</version>
</dependency><?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.cowwoc.requirements</groupId>
<artifactId>root</artifactId>
<version>8.0.10</version>
</parent>
<artifactId>natives</artifactId>
<packaging>jar</packaging>
<description>Native component of the Requirements API.</description>
<properties>
<classifier>${platform}</classifier>
<cmake.version>3.26.3-b1</cmake.version>
</properties>
<dependencies>
<dependency>
<groupId>com.github.cowwoc.pouch</groupId>
<artifactId>core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-Xdiags:verbose</arg>
<arg>-Werror</arg>
<arg>-Xlint:all,-module</arg>
<!-- WORKAROUND: https://issues.apache.org/jira/browse/MCOMPILER-368 -->
<arg>-Xpkginfo:always</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/cpp</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<show>public</show>
<doctitle>Requirements Natives Module ${project.version} API</doctitle>
<windowtitle>Requirements Natives Module ${project.version} API</windowtitle>
<additionalOptions>
<!-- https://stackoverflow.com/a/54468139/14731 -->
<option>--override-methods</option>
<option>summary</option>
</additionalOptions>
<excludePackageNames>
com.github.cowwoc.requirements.natives.internal:com.github.cowwoc.requirements.natives.internal.*
</excludePackageNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
<version>${cmake.version}</version>
<executions>
<execution>
<id>cmake-generate</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<sourcePath>${project.build.directory}/sources</sourcePath>
<targetPath>${project.build.directory}/${platform}-${build.type}/cmake</targetPath>
<environmentVariables>
<CMAKE_CLASSIFIER>${cmake.classifier}</CMAKE_CLASSIFIER>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>cmake-compile</id>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<projectDirectory>${project.build.directory}/${platform}-${build.type}/cmake</projectDirectory>
<config>${cmake.config}</config>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/sources</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/cpp</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>create-native-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>${classifier}</classifier>
<classesDirectory>${project.build.directory}/${platform}-${build.type}/cmake/build/
</classesDirectory>
<includes>
<!-- windows -->
<include>*.dll</include>
<include>*.pdb</include>
<!-- linux -->
<include>*.so</include>
<!-- mac -->
<include>*.dylib</include>
</includes>
<outputDirectory>${project.build.directory}/${platform}-${build.type}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<id>3rd-party-licenses</id>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>windows-x86_64-debug</id>
<properties>
<platform>windows-x86_64</platform>
<build.type>debug</build.type>
<cmake.classifier>windows-x86_64</cmake.classifier>
<cmake.config>${build.type}</cmake.config>
</properties>
</profile>
<profile>
<id>windows-x86_64-release</id>
<activation>
<os>
<family>windows</family>
<arch>amd64</arch>
</os>
</activation>
<properties>
<platform>windows-x86_64</platform>
<build.type>release</build.type>
<cmake.classifier>windows-x86_64</cmake.classifier>
<cmake.config>${build.type}</cmake.config>
</properties>
</profile>
<profile>
<id>linux-x86_64-debug</id>
<properties>
<platform>linux-x86_64</platform>
<build.type>debug</build.type>
</properties>
</profile>
<profile>
<id>linux-x86_64-release</id>
<activation>
<os>
<family>linux</family>
<arch>amd64</arch>
</os>
</activation>
<properties>
<platform>linux-x86_64</platform>
<build.type>release</build.type>
<cmake.classifier>linux-x86_64</cmake.classifier>
</properties>
</profile>
<profile>
<id>mac-x86_64-debug</id>
<properties>
<platform>mac-x86_64</platform>
<build.type>debug</build.type>
<cmake.classifier>mac-x86_64</cmake.classifier>
</properties>
</profile>
<profile>
<id>mac-x86_64-release</id>
<activation>
<os>
<family>mac</family>
<arch>x86_64</arch>
</os>
</activation>
<properties>
<platform>mac-x86_64</platform>
<build.type>release</build.type>
<cmake.classifier>mac-x86_64</cmake.classifier>
</properties>
</profile>
</profiles>
</project>