十一、Spring Cloud包管理

一、 使用 io.spring.platform

 
<parent> 
<groupId>io.spring.platformgroupId> 
<artifactId>platform-bomartifactId> 
<version>Brussels-SR1version> 
<relativePath/> 
parent> 

说明:spring io 是一个版本聚合管理应用,只是一个 pom 文件。
1、 帮助我们有效地管理各种 jar 的依赖,避免版本之间冲突。
2、 按需引用,所有的 jar 都是 100%开源。
3、 建议 JDK7 以上版本使用

二、 注意事项

<build> 
  <plugins> 
   <plugin> 
    <groupId>org.springframework.bootgroupId> 
    <artifactId>spring-boot-maven-pluginartifactId> 
    <executions> 
     <execution> 
      <goals> 
       <goal>repackagegoal> 
      goals> 
     execution> 
    executions> 
    <configuration> 
     <executable>trueexecutable> 
    configuration> 
   plugin> 
  plugins> 
 build> 

说明:打包的项目要添加以上插件参数。

三、 打包:

mvn clean package -pl spring-cloud-consumer -am 

说明:针对某个项目打包
-pl 构建制定的模块,模块间用逗号分隔
-am 同时构建所列模块的依赖模块

你可能感兴趣的:(Spring,Cloud)