• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

scalatest/scalatest-maven-plugin: ScalaTest Maven Plugin

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

scalatest/scalatest-maven-plugin

开源软件地址(OpenSource Url):

https://github.com/scalatest/scalatest-maven-plugin

开源编程语言(OpenSource Language):

Java 68.4%

开源软件介绍(OpenSource Introduction):

ScalaTest Maven Plugin

Building ScalaTest Maven Plugin

Maven 3 is used to manage the build process. To build this plugin, please make sure you have the following installed:-

You then clone and checkout master trunk:-

$ git clone git://github.com/scalatest/scalatest-maven-plugin.git

$ cd scalatest-maven-plugin

Finally use the following commands to build for ScalaTest Maven Plugin:

$ mvn clean package

The built output will be available in target/.

Using ScalaTest Maven Plugin

To use the ScalaTest Maven plugin, you need to disable SureFire and enable ScalaTest. Here's an example of how to do this in your pom.xml:

<!-- disable surefire -- >
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.7</version>
  <configuration>
    <skipTests>true</skipTests>
  </configuration>
</plugin>
<!-- enable scalatest -- >
<plugin>
  <groupId>org.scalatest</groupId>
  <artifactId>scalatest-maven-plugin</artifactId>
  <version>2.0.2</version>
  <configuration>
    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
    <junitxml>.</junitxml>
    <filereports>WDF TestSuite.txt</filereports>
  </configuration>
  <executions>
    <execution>
      <id>test</id>
      <goals>
        <goal>test</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Ignore When ScalaTest Not Available

This plugin expects the you to include ScalaTest dependency used by the your project. By default, if you do not include a ScalaTest dependency, this plugin will fail the build, if you would like to ignore or skip running this plugin when ScalaTest is not in the classpath, you can set noScalaTestIgnore to true in configuration like this:

...
<configuration>
  <noScalaTestIgnore>true</noScalaTestIgnore>
</configuration>
...

Deploying to Sonatype

Add the following into settings.xml (please replace username and password):

<servers>
  <server>
    <id>sonatype-nexus-staging</id>
    <username>xxx</username>
    <password>yyy</password>
  </server>
</servers>

Then run the following command:

> mvn clean deploy -Prelease -Dmaven.test.skip=true



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap