English 中文(简体)
是否有办法与Maven一起进行测试,而没有把我的测试资源复制到目标目录?
原标题:Is there a way to run tests with Maven, without copying all my test resources to the target directory?
  • 时间:2010-08-19 22:07:46
  •  标签:
  • maven-2

我们有800多份测试案例资源档案,即Excel格式。 每当我操作<代码>mvn Clean test的指挥时,他们都重新复制到目标目录上,这在我的机器上大约需要5分钟。

是否有办法设立Maven(最好是通过pom.xml),以便NOT将我们的<代码>测试<<>Resources复制到目标名录,而直接使用src/test/resources?

最佳回答

最容易的是,将你的大型测试资源放在一个单独的模块中,该模块是一劳永逸的,然后使用<条码>测试<>/代码>范围作为依赖进口。

在这种情况下,你必须增加<条码>/弧/主要/资源的资源,而不是<条码>/弧/试验/资源<条码>的资源,以便能够装载。

问题回答

暂无回答




相关问题
Derby gets stuck closing?

I ve got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:...

Execute goal on parent after children complete

I have a multi-module maven project (several levels of nesting). Normally, when I execute a maven build (like mvn install or whatever), maven will run all the goals for the parent project before ...

Including dependencies in a jar with Maven

Is there a way to force maven(2.0.9) to include all the dependencies in a single jar file? I have a project the builds into a single jar file. I want the classes from dependencies to be copied into ...

Java Equivalent of distcc

Distcc makes it easy to distribute a C or C++ compile job across a number of machines, and is a godsend for working with large, frequently-built codebases. An increasing number of our large projects ...

Maven Assembly Problem

I have a maven multiple-module project, which is giving me headaches in the assembly:assembly phase. I have a module which has an assembly defined in it which works fine when I invoke mvn assembly:...

热门标签