<?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>top.snowed</groupId>
    <artifactId>image-pdf</artifactId>
    <version>1.1.0</version>
    <packaging>jar</packaging>
    <name>pdf</name>

    <url>https://github.com/854702200/issue</url>

    <licenses>
        <license>
            <name>GNU General Public License, version 3.0 (GPL-3.0)</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/854702200/issue.git</connection>
        <developerConnection>scm:git:git@github.com:854702200/issue.git</developerConnection>
        <url>https://github.com/854702200/issue</url>
        <tag>HEAD</tag>
    </scm>

    <description>图片转pdf</description>

    <inceptionYear>2024</inceptionYear>

    <developers>
        <developer>
            <id>snowed</id>
            <name>Mr Zou</name>
            <roles>
                <role>Project Manager</role>
                <role>Developer</role>
            </roles>
            <email>854702200@qq.com</email>
            <url>https://www.snowed.top</url>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/854702200/issue/issues</url>
    </issueManagement>

    <dependencies>

        <!-- PDF -->
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itextpdf</artifactId>
            <version>5.5.13.2</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <!--代码混淆-->
            <plugin>
                <groupId>com.github.wvengen</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <version>2.3.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>proguard</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <proguardVersion>6.2.2</proguardVersion>
                    <injar>${project.build.finalName}.jar</injar>
                    <outjar>${project.build.finalName}-proguard.jar</outjar>
                    <libs>
                        <lib>${java.home}/lib/rt.jar</lib>
                        <lib>${java.home}/lib/jce.jar</lib>
                    </libs>
                    <!--保留pom文件等-->
                    <addMavenDescriptor>false</addMavenDescriptor>
                    <!--外部配置文件-->
                    <proguardInclude>${project.basedir}/proguard.pro</proguardInclude>
                    <!--混淆-->
                    <obfuscate>true</obfuscate>
                    <options>
                        <!-- jdk版本-->
                        <option>-target 1.8</option>
                        <!-- 默认是开启的，这里关闭shrink，即不删除没有使用的类/成员-->
                        <option>-dontshrink</option>
                        <!-- 默认是开启的，这里关闭字节码级别的优化-->
                        <option>-dontoptimize</option>
                        <!-- 对于类成员的命名的混淆采取唯一策略-->
                        <option>-useuniqueclassmembernames</option>
                        <!--- 混淆类名之后，对使用Class.forName('className')之类的地方进行相应替代-->
                        <option>-adaptclassstrings</option>
                        <option>-ignorewarnings</option>
                        <!-- 关闭注意和警告-->
                        <option>-dontnote</option>
                        <option>-dontwarn</option>
                        <!-- 不混淆所有特殊的类-->
                        <option>-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
                            SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
                        </option>
                    </options>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.proguard</groupId>
                        <artifactId>proguard-base</artifactId>
                        <version>6.2.2</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!--功能插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <move file="${project.build.directory}\${project.build.finalName}-proguard.jar"
                                      tofile="${project.build.directory}\${project.build.finalName}.jar"
                                      overwrite="true"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.1.0</version>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludeResources>true</excludeResources>
                            <useDefaultExcludes>true</useDefaultExcludes>
                        </configuration>
                    </plugin>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <!-- 改成你自己的路径 -->
                            <executable>D:\GnuPG\bin\gpg.exe</executable>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.4.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>snowed</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>