<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  
  <parent>
    <groupId>org.lionsoul</groupId>
    <artifactId>jcseg</artifactId>
    <version>2.6.3</version>
  </parent>
  
  <artifactId>jcseg-core</artifactId>
  <packaging>jar</packaging>
  <name>jcseg-core</name>
  <url>http://github.com/lionsoul2014/jcseg</url>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <profiles>
    <profile>
      <id>java8-doclint-disabled</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
    </profile>
  </profiles>
  
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>properties-file-copy</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
            <outputDirectory>${basedir}/target/classes</outputDirectory>
            <resources>          
               <resource>
                  <directory>./</directory>
                  <includes>
                      <include>jcseg.properties</include>
                  </includes>
                  <filtering>true</filtering>
               </resource>
             </resources>              
           </configuration>            
          </execution>
          <execution>
            <id>lexicons-file-copy</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
            <outputDirectory>${basedir}/target/classes/lexicon</outputDirectory>
            <resources>          
               <resource>
                  <directory>../vendors/lexicon</directory>
                  <filtering>true</filtering>
               </resource>
             </resources>              
           </configuration>            
          </execution>
        </executions>
      </plugin>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <!-- <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-compiler-plugin</artifactId>
		<version>3.8.1</version>
		<configuration>
			<source>${maven.compiler.source}</source>
			<target>${maven.compiler.target}</target>
			<skip>true</skip>
		</configuration>
	  </plugin>  -->
      
      <plugin>          
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <additionalOptions>
                <additionalOption>-Xdoclint:none</additionalOption>
              </additionalOptions>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <failOnError>false</failOnError>
        </configuration>
       </plugin>
       
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>org.lionsoul.jcseg.test.JcsegTest</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
