<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>com.it.Preview</groupId> -->
  
  <groupId>com.github.Caesaryun</groupId>
  <artifactId>PreviewFile</artifactId>
  <version>1.0.2</version>
  <packaging>jar</packaging>

  <name>PreviewFile</name>
  <description>For easy Preview</description>
  <url>http://github.com/Caesaryun/PreviewOfficeFile</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4j.version>1.6.6</slf4j.version>  
    <log4j.version>1.2.12</log4j.version>
    <maven.compiler.source>9</maven.compiler.source>
    <maven.compiler.target>9</maven.compiler.target>
  </properties>
  

    <!-- 配置developers  -->
   <developers>
          <developer>
              <name>Wang Fayun</name>
              <email>2517069503@qq.com</email>
          </developer>
   </developers>
  
   <!-- 配置scm与申请issue时的git等保持一致-->
    <!--<scm>
        <connection>https://github.com/Caesaryun/PreviewOfficeFile.git</connection>
        <developerConnection>https://github.com/Caesaryun/PreviewOfficeFile.git</developerConnection>
        <url>https://github.com/Caesaryun/PreviewOfficeFile</url>
    </scm> -->
    
     <scm>
         <connection>scm:git:git://github.com/Caesaryun/PreviewOfficeFile.git</connection>
         <developerConnection>scm:git:ssh://github.com/Caesaryun/PreviewOfficeFile.git</developerConnection>
         <url>http://github.com/Caesaryun/PreviewOfficeFile/tree/common-master</url>
      </scm>
    
     <!-- 配置Licenses  -->
   <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>
             <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
         </license>
   </licenses>
   
   
   
   
 
   <!-- 解决将依赖包也一并打入jar包  <finalName>preview-officefile-1.0</finalName>-->
    <profiles>
    
            <profile>
            <id>release</id>
        <build>
        
         <plugins>
              <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${maven.compiler.source}</source> <!-- jdk版本 -->
                    <target>${maven.compiler.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <showWarnings>true</showWarnings>     
                </configuration>
              </plugin>
              
              <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.it.Preview.App</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>.</Class-Path>
                        </manifestEntries>
                    </archive>
                   
                   <!--  <descriptorRefs>
                          <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>   --> 
                </configuration>
                
                
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                           <descriptors>
                              <descriptor>assembly.xml</descriptor>
                           </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

              <!-- 配置打包上传到sonatype及maven中央仓库 -->
              <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
              </plugin>
              <!-- 生成的javadoc，关闭doclint，避免注解检查不通过 -->
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
           <!-- maven GPG用于加密等配置 -->
               <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!--Nexus Staging Maven插件是将组件部署到OSSRH并将其发布到Central Repository的推荐方法
                  <serverId>sonatype-yunpreview</serverId>  -->
             <!--  <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>sonatype-nexus-staging</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/content/groups/staging/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>   -->

         </plugins>
    
    </build>
    </profile>
    </profiles>
    
     <distributionManagement>
     
               <repository>
              
                   <id>sonatype-yun</id>
                   <name>Stage repository</name>
                   <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                
               </repository>
               
              <snapshotRepository>
                   <id>sonatype-yun</id>
                   <name>Snapshots repository</name>
                   <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
              </snapshotRepository>
              
     </distributionManagement> 

  <dependencies>
  
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
         <scope>test</scope>
       </dependency>
        
        
            
            <!-- 导入文件转换的操作，这个是后面可能会加上的操作的包 -->
                  <dependency>
                     <groupId>org.jodconverter</groupId>
                     <artifactId>jodconverter-local</artifactId>
                     <version>4.2.0</version>
                  </dependency>
             
       
        <!-- log4j的依赖   
         <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
         </dependency>

        <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-api</artifactId>
           <version>${slf4j.version}</version>
        </dependency>

        <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-log4j12</artifactId>
           <version>${slf4j.version}</version>
        </dependency> -->  
        
        
         <!-- 本地jar也一并打入其中 -->
         <dependency>
               <groupId>ok</groupId>
               <artifactId>ok</artifactId>
               <version>2.2.2</version>
               <scope>system</scope>
               <systemPath>${project.basedir}/lib/jodconverter-2.2.2.jar</systemPath>
         </dependency>
        
           <!-- 引入 hutool，其还能够带有SecureUtil工具-->
             <dependency>
               <groupId>cn.hutool</groupId>
               <artifactId>hutool-all</artifactId>
               <version>4.5.15</version>
             </dependency>
         
        
           
  </dependencies>
  
  
  
</project>
