<projectxmlns="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>data-monitor-service</groupId>
<artifactId>data-monitor-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>data-monitor-service</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>com.xxx.data.monitor.Application</start-class>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- 整合mysql
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
-->
<!--
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.21</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<!-- json -->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.2.2</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</dependency>
<!-- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.2</version>
</dependency> -->
</dependencies>
<!-- jar 可以正常打包 -->
<build>
<finalName>${name}</finalName>
<!-- 将项目代码与依赖打成一个包 -->
<!--
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.4.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>${start-class}</mainClass>
<fork>true</fork>
</configuration>
</plugin>
</plugins> -->
<!-- 将项目代码与依赖分开打包 -->
<plugins>
<!-- 指定启动类,将依赖打成外部jar包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<!-- 是否要把第三方jar加入到类构建路径 -->
<addClasspath>true</addClasspath>
<!-- 外部依赖jar包的最终位置 -->
<classpathPrefix>lib/</classpathPrefix>
<!-- 项目启动类 -->
<mainClass>${start-class}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!--拷贝依赖到jar外面的lib目录-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-lib</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>target/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
相关推荐
maven打包 maven打jar包详细步骤
Maven打包,指定classes路径打包到WebContent/WEB-INF中
自己整理的maven打包出现错误的解决办法、含有截图等 附带maven搭建私服等资料
sprintboot maven 打包分离lib jar 资源文件 properties xml yml 详细信息查看我的博客 https://mp.csdn.net/postedit/80274087 java -jar -cp 启动
idea新建maven web项目.zip Jetbrains IntelliJ IDEA创建基于maven打包工具的WEB网站项目 本项目使用的是SSM框架spring mvc,spring, mybatis.用maven打包成jar
当前案例中包含一整套的代码和word文档,非常适合新手... 主要是通过maven打包加载不同环境的properties文件 然后将对于的属性绑定到指定的实体对象中;然后通过调用接口可以看到加载不同环境控制台打印的内容是不一样的
jasperreport 用maven打包后找不到字体解决方案 net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font
maven打包源码配置
当前案例中包含一整套的代码和word文档,非常适合新手代码简单易懂; 主要是通过maven打包配合springboot application.properties文件配置实现通过打包来完成加载不同环境的配置内容;
这是一个springboot+maven写的demo,主要演示springboot项目通过maven插件,将依赖与配置文件打包到jar包外部,实现灵活的项目管理.仅供参考学习
maven 打包 部署到tomcat 删除的jar包,无法访问jsp的情况
工程运行环境有研发,测试和生产,不同的运行环境配置不同,maven 打包时指定文件目录,使用指定的文件夹下的配置文件。
maven打包使用yui压缩css和js文件
NULL 博文链接:https://skyteam.iteye.com/blog/1896973
maven打包dubbo服务接口(maven-assembly-plugin)
Maven 打包资源. 与文章配套食用. Maven 打包实战 https://blog.csdn.net/u010416101/article/details/88539238
allatori第二代Java代码混淆器Maven打包配置,依赖库,以及配置文件。示例运行,可行。
maven打包main方法作为起动程序在maven框架下,写的main方法需要打包在jdk环境运行 文档主要描述打包的方法
NULL 博文链接:https://yizhilong28.iteye.com/blog/1146830
使用Maven打包spark项目