defargs
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>io.github.thirty30ww</groupId>
<artifactId>defargs</artifactId>
<version>1.0.5</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>
<groupId>io.github.thirty30ww</groupId>
<artifactId>defargs</artifactId>
<version>1.0.5</version>
<packaging>jar</packaging>
<!-- 必需的项目信息 -->
<name>DefArgs</name>
<description>基于 Javac Tree API 的编译期注解处理器,通过 @DefaultValue 注解实现 Java 方法的默认参数功能。编译时自动生成重载方法,让调用者可以省略带默认值的参数,简化代码编写。</description>
<url>https://github.com/thirty30ww/defargs</url>
<!-- 许可证信息 -->
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<!-- 开发者信息 -->
<developers>
<developer>
<id>thirty30ww</id>
<name>Merrick</name>
<email>2834379272@qq.com</email>
</developer>
</developers>
<!-- SCM 信息 -->
<scm>
<connection>scm:git:git://github.com/thirty30ww/defargs.git</connection>
<developerConnection>scm:git:ssh://github.com:thirty30ww/defargs.git</developerConnection>
<url>https://github.com/thirty30ww/defargs/tree/main</url>
</scm>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- 自动注册注解处理器 -->
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- 发布配置 - 使用新的 Central Portal -->
<distributionManagement>
<repository>
<id>central</id>
<url>https://central.sonatype.com/api/v1/publisher</url>
</repository>
</distributionManagement>
<build>
<plugins>
<!-- 编译插件(必需)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
<compilerArgs>
<!-- 编译 processor 源代码时需要 import javac 内部类 -->
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
<!-- Central Publishing 插件(新版 Maven Central)-->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.4.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
</build>
<!-- 发布配置文件(仅在发布时激活)-->
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- 生成源码 jar(Maven Central 必需)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 生成 Javadoc jar(Maven Central 必需)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<!-- 忽略 Javadoc 错误,确保能成功生成 jar -->
<doclint>none</doclint>
<failOnError>false</failOnError>
<quiet>true</quiet>
<additionalOptions>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</additionalOption>
<additionalOption>--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED</additionalOption>
</additionalOptions>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- GPG 签名插件(Maven Central 必需)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<!-- 支持 CI 环境的 GPG 配置 -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>