首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

在pom文件中test case类间的依赖怎么配置

2012-08-14 
在pom文件中test case类间的依赖如何配置如果app-bs中的test case类需要用到exa-client中test case的类:1.

在pom文件中test case类间的依赖如何配置
如果app-bs中的test case类需要用到exa-client中test case的类:
1. 把exa-client的test case打包放到repository目录中.
在exa-client的pom文件中增加下面配置:
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

2. 在app-bs的pom文件中增加对exa-client test case依赖.

    <dependency> <!-- reuse src/test/java code from exa-client -->
      <groupId>exa</groupId>
      <artifactId>exa-client</artifactId>
      <version>${exa.platform.version}</version>
      <scope>test</scope>
      <classifier>tests</classifier>     <!-- for example, the build test jar is named "exa-client-2.4.0-SNAPSHOT-tests.jar"-->
    </dependency>

热点排行