<?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>com.github.eliayng</groupId>
    <artifactId>compress-maven-plugin</artifactId>
<!--    <version>M1.0.1-releases</version> 
    <packaging>jar</packaging>-->

    <version>1.0.2</version>
    <packaging>maven-plugin</packaging>

    <name>compress-maven-plugin</name>
    <!-- <description>
            <![CDATA[
            1、js、CSS,HTML等的合并压缩操作,合并路径不是pom中配置,但使用相应的项目路径生成合并。XML信息记录在合并。
            2、js、CSS可以选择压缩工具,目前只实现了一个,未实现其他配置,后续更新
            3、编译Java监控和资源文件修改和删除和替换,主要在netbeans工具,如开放maven方法编译的Java类,严重影响效率的发展,
            4,Java编译后可随时打开编译Java文件,使用文本编辑器来完成开发
            5、完成编译JDK的默认配置
            6、默认实现的合并监控url:http://maven.zexingwei.com/nexus/content/repositories/releases/com/njzxw/compress-maven-plugin/M1.0.1-releases/compress-maven-plugin-M1.0.1-releases.jar
            <dependency>
              <groupId>com.njzxw</groupId>
              <artifactId>compress-maven-plugin</artifactId>
              <version>M1.0.1-releases</version>
            </dependency>
            ]]>
    </description> -->
    <description>
		<![CDATA[
		配置监控信息，在web.xml中添加
		<filter>
		  	<description>拦截获取js与css过滤</description>
		  	<filter-name>MergeFilter</filter-name>
		  	<filter-class>com.njzxw.filter.MergeFilter</filter-class>
		  	<init-param>
		  		<!-- js合并输出路径 -->
		  		<param-name>jsDir</param-name>
		  		<param-value>${js.path}</param-value>
		  	</init-param>
		  	<init-param>
		  		<!-- css合并输出路径 -->
		  		<param-name>cssDir</param-name>
		  		<param-value>${css.path}</param-value>
		  	</init-param>
		  </filter>
		  
		  同时添加一个合并js\css对应一个merge.xml，最好放置在同级，如：
		  <merge>
				<group name="sss" >
					<js path="js/common/common.js" />
					<js path="js/common/index.js" />
					<css path="css/common/animate.css" />
					<css path="css/common/normalize.css" />
				</group>
			</merge>
		访问项目：xxx/sss.js
			   xxx/sss.css
			   
		同时配合maven插件：	 compress-maven-plugin结合使用：
		<plugin>
              <groupId>com.github.eliayng</groupId>
              <artifactId>compress-maven-plugin</artifactId>
              <version>1.0.0</version>
              <executions>
                  <execution>
                      <phase>compile</phase>
                      <goals>
                          <goal>compress</goal>
                      </goals>
                  </execution>
              </executions>
              <configuration>
                  <skip>${skipCompress}</skip>
                  <poolNum>50</poolNum>
                  <jsOutDir>${jsOutDir}</jsOutDir>
                  <cssOutDir>${cssOutDir}</cssOutDir>
                  <!--是否监控编译class文件-->
                  <isCompressClass>true</isCompressClass>
                  <!-- 是否复制资源文件 -->
                  <isResourcesCopy>true</isResourcesCopy>
              </configuration>
          </plugin>  
	]]>
    </description>
	
    <url>https://github.com/eliayng/compress-maven-plugin</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <logback>1.2.3</logback>
    </properties>

    <scm>
        <connection>
            scm:git:https://github.com/eliayng/compress-maven-plugin.git
        </connection>
        <developerConnection>
            scm:git:https://github.com/eliayng/compress-maven-plugin.git
        </developerConnection>
        <url>https://github.com/eliayng/compress-maven-plugin</url>
        <tag>v1.0.0</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <name>yang1</name>
            <email>175840715@qq.com</email>
            <organization>personage</organization>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Eliayng License, Version 1.0</name>
            <url>https://github.com/eliayng/compress-maven-plugin/blob/master/LICENSE-1.0.txt</url>
        </license>
    </licenses>

    <build>
        <plugins>
            <!-- <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>nexus-staging-maven-plugin</artifactId>
              <version>1.6.3</version>
              <extensions>true</extensions>
              <configuration>
                <serverId>ossrh</serverId>
                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                <autoReleaseAfterClose>true</autoReleaseAfterClose>
              </configuration>
            </plugin> -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>gpg</executable>
                    <homedir>C:/Users/eliay/AppData/Roaming/gnupg</homedir>
                    <keyname>yang1</keyname>
                    <passphraseServerId>yang1</passphraseServerId>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                    <optimize>false</optimize>
                    <debug>false</debug>
                    <showDeprecation>false</showDeprecation>
                    <showWarnings>false</showWarnings>
                    <!-- <compilerArguments> <verbose /> <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath> 
                    </compilerArguments> -->
                </configuration>
            </plugin>
            <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>
            <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>
                    </execution>
                </executions>
                <configuration>
                    <charset>UTF-8</charset>
                    <encoding>UTF-8</encoding>
                    <docencoding>utf-8</docencoding>
                    <aggregate>true</aggregate>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>2.2.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.yahoo.platform.yui/yuicompressor -->
        <dependency>
            <groupId>com.yahoo.platform.yui</groupId>
            <artifactId>yuicompressor</artifactId>
            <version>2.4.8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.google.javascript/closure-compiler -->
        <dependency>
            <groupId>com.google.javascript</groupId>
            <artifactId>closure-compiler</artifactId>
            <version>v20170423</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/dom4j/dom4j -->
<!--        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
            <scope>provided</scope>
        </dependency>-->

        <!-- https://mvnrepository.com/artifact/org.dom4j/dom4j -->
        <dependency>
            <groupId>org.dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>2.0.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${logback}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-access</artifactId>
            <version>${logback}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.25</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>