darra-opcua-sdk
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>xyz.darra</groupId>
<artifactId>darra-opcua-sdk</artifactId>
<version>0.6.0</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.darra</groupId>
<artifactId>darra-opcua-sdk</artifactId>
<version>0.6.0</version>
<packaging>jar</packaging>
<name>Darra OPC UA Client SDK (Java)</name>
<description>Darra OPC UA Client Java SDK — 基于 JNA 绑定原生 Darra.OpcUa.Core.dll, 六语言对齐 C# 基准</description>
<url>https://opcua.darra.xyz</url>
<properties>
<!-- Java 17 LTS — 启用 record / sealed / pattern matching, 与 C# init-only / record struct 对齐 -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
<comments>完全免费, 商用闭源亦可. 完整条款 https://opcua.darra.xyz/docs/faq/licensing</comments>
</license>
</licenses>
<developers>
<developer>
<id>darra</id>
<name>Darra</name>
<email>jtl1207@darra.xyz</email>
<organization>Darra</organization>
<organizationUrl>https://darra.xyz</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/DarraTechnology/DarraOpcUaClient.git</connection>
<developerConnection>scm:git:ssh://github.com:DarraTechnology/DarraOpcUaClient.git</developerConnection>
<url>https://github.com/DarraTechnology/DarraOpcUaClient/tree/main</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<dependencies>
<!-- JNA: 绑定原生 Darra.OpcUa.Core.dll -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.14.0</version>
</dependency>
<!-- SnakeYAML: scenarios.yaml 解析 (仅 runner 用) -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Source Plugin: 生成 -sources.jar (Maven Central 强制要求) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Javadoc Plugin: 生成 -javadoc.jar (Maven Central 强制要求) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<doclint>none</doclint>
<failOnError>false</failOnError>
<encoding>UTF-8</encoding>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Shade Plugin: 把 SDK + JNA + SnakeYAML 一起打成 fat-jar (runner 用) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>runner</shadedClassifierName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>io.darra.opcua.sdktest.Runner</Main-Class>
</manifestEntries>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!--
release profile: 仅在 mvn -P release deploy 时启用 GPG 签名与 OSSRH 发布插件.
普通本地 build (mvn package) 不会触发 GPG, 避免没装密钥的开发环境卡死.
Maven Central 强制要求所有 artifact (jar / sources / javadoc / pom) 必须 GPG 签名.
-->
<profile>
<id>release</id>
<build>
<plugins>
<!-- GPG Plugin: 签名所有 artifact (Maven Central 强制) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- 关闭交互式 passphrase 提示, 从环境变量 / settings.xml 取 -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Nexus Staging Plugin: 推送到 OSSRH staging 仓库 -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<!-- false = 手动在 Nexus UI 点 close + release; true = 自动 -->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>