123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
-
- <groupId>com.jfinal</groupId>
- <artifactId>club</artifactId>
- <version>4.8</version>
- <packaging>jar</packaging>
-
-
- <name>jfinal-club</name>
- <url>http://jfinal.com/club</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
- </properties>
-
- <!-- 使用阿里 maven 库 -->
- <repositories>
- <repository>
- <id>ali-maven</id>
- <url>http://maven.aliyun.com/nexus/content/groups/public</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </snapshots>
- </repository>
- </repositories>
- <dependencies>
-
- <!-- jfinal -->
- <dependency>
- <groupId>com.jfinal</groupId>
- <artifactId>jfinal</artifactId>
- <version>4.8</version>
- </dependency>
-
- <!-- jfinal-undertow 开发、部署一体化 web 服务器 -->
- <dependency>
- <groupId>com.jfinal</groupId>
- <artifactId>jfinal-undertow</artifactId>
- <version>2.0</version>
- </dependency>
-
- <!-- 开发 WebSockets 时开启下面的依赖 -->
- <!--
- <dependency>
- <groupId>io.undertow</groupId>
- <artifactId>undertow-websockets-jsr</artifactId>
- <version>2.0.28.Final</version>
- </dependency>
- -->
-
- <!-- junit 单元测试 -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
-
- <!-- 避免控制台输出如下提示信息:
- SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
- 项目中实际上用不到这个 jar 包
- 注意:eclipse 下可以将 scope 设置为 provided
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-nop</artifactId>
- <version>1.7.29</version>
- <!-- 打包前改成 provided,此处使用 compile 仅为支持 IDEA -->
- <scope>compile</scope>
- </dependency>
-
- <!-- druid 数据源连接池 -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>druid</artifactId>
- <version>1.0.29</version>
- </dependency>
-
- <!-- fastjson json 转换 -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>1.2.58</version>
- </dependency>
-
- <!-- log4j 日志 -->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- </dependency>
-
- <!-- mysql 驱动 -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.44</version>
- </dependency>
-
- <!-- cos 文件上传 -->
- <dependency>
- <groupId>com.jfinal</groupId>
- <artifactId>cos</artifactId>
- <version>2019.8</version>
- </dependency>
-
- <!-- ehcache 缓存 -->
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache-core</artifactId>
- <version>2.6.11</version>
- </dependency>
-
- <!-- 邮件发送 -->
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.9</version>
- </dependency>
-
- <!-- 邮件发送 -->
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>1.2</version>
- </dependency>
-
- <!-- jsoup 过滤恶意数据提交 -->
- <dependency>
- <groupId>org.jsoup</groupId>
- <artifactId>jsoup</artifactId>
- <version>1.9.2</version>
- </dependency>
-
- <!-- joda-time 日期、时间变换 -->
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>2.9.3</version>
- </dependency>
-
- <!-- cron4j 任务调度 -->
- <dependency>
- <groupId>it.sauronsoftware.cron4j</groupId>
- <artifactId>cron4j</artifactId>
- <version>2.2.5</version>
- </dependency>
-
- <!-- zxing 二维码生成 -->
- <dependency>
- <groupId>com.google.zxing</groupId>
- <artifactId>javase</artifactId>
- <version>3.2.1</version>
- </dependency>
-
- </dependencies>
-
-
- <build>
- <finalName>jfinal-club</finalName>
-
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.6.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>UTF-8</encoding>
- <!-- java8 保留参数名编译参数 -->
- <compilerArgument>-parameters</compilerArgument>
- <compilerArguments><verbose /></compilerArguments>
- </configuration>
- </plugin>
-
- <!--
- 当项目的 web 资源在 src/main/webapp 下时,需要使用 maven-resources-plugin
- 将 web 资源复制到 jar 包中去,注意打包的时候需要配置 engine:
- me.setBaseTemplatePath("webapp");
- me.setToClassPathSourceFactory();
-
- 如果 web 资源本身就放在 src/main/resources/webapp 之下,则不需要此插件
- -->
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.1.0</version>
- <executions>
- <execution>
- <id>copy-webapp</id>
- <phase>process-sources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <encoding>UTF-8</encoding>
- <outputDirectory>${basedir}/target/classes/webapp</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}/src/main/webapp</directory>
- <includes>
- <!-- <include>**/*.xml</include> -->
- <!-- <include>**/**</include> -->
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.2.1</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <finalName>jfinal-club</finalName>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>com.jfinal.club.common.JFinalClubConfig</mainClass>
- </transformer>
-
- <!--
- 下面的配置支持排除指定文件打包到 jar 之中,可以用于排除需要修改的配置文件以便于在外部的 config 目录下的
- 同名配置文件生效,建议使用 Prop.appendIfExists(xxx_pro.txt) 在外部放一个非同名配置来覆盖开发环境的配置
- 则可以不用使用下面的配置,文档参考:
- http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#DontIncludeResourceTransformer
- -->
- <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
- <resources>
- <!-- <resource>jfinal-club-config-dev.txt</resource> -->
- <!-- <resource>.PDF</resource> -->
- <!-- <resource>READ.md</resource> -->
- </resources>
- </transformer>
- </transformers>
-
- <!--
- 解决 fatjar 的 "java.lang.SecurityException: Invalid signature file digest
- for Manifest main attributes" 问题
- -->
- <filters>
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.DSA</exclude>
- <exclude>META-INF/*.RSA</exclude>
- </excludes>
- </filter>
- </filters>
-
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </project>
|