OwlFocus

Via


  • 首页

  • 分类

  • 归档

  • 标签

  • 搜索
close
OwlFocus

Maven 常用命令

发表于 2017-03-23 | 分类于 program

Maven 常用命令

mvn 编译

mvn install -Dmaven.test.skip=true

换成 eclipse 项目,执行下面的命令

mvn eclipse:eclipse

OwlFocus

Maven打包时跳过测试类

发表于 2017-03-23 | 分类于 program

Maven打包时跳过测试类

方法

pom.xml中添加如下配置。

1
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <skip>true</skip> </configuration> </plugin>
OwlFocus

Maven 多个war依赖

发表于 2017-03-23 | 分类于 program

Maven 多个war依赖,发布打包项目。

方法

子项目的pom.xml中添加如下配置。

1
2
3
4
5
6
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<attachClasses>true</attachClasses>
</configuration>
</plugin>

父项目的pom.xml中添加如下配置。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<dependency>
<groupId>com.cloudcode</groupId>
<artifactId>cloudcode-server</artifactId>
<version>1.0.0</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.cloudcode</groupId>
<artifactId>cloudcode-server</artifactId>
<version>1.0.0</version>
<type>jar</type>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>

Thx

1…394041…55
ljzhuanjiao@gmail.com

ljzhuanjiao@gmail.com

在快节奏时代,我不能在慢中消亡!!!

163 日志
5 分类
53 标签
© 2016 - 2018 ljzhuanjiao@gmail.com
由 Hexo 强力驱动
主题 - NexT.Pisces