- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我几乎不知道为什么会发生这种情况,但是当我运行时
mvn clean install
或
#Builds with class instrumentation (code coverage)
mvn cobertura:cobertura
一切都工作得很好,直到我对我的 pom.xml 文件做了一个小小的更改,这样它就可以包含我在代码中使用的依赖项类,而不是逐字导入多个类到我的项目中。
这是我运行 maven 时得到的终端/控制台:
SDGL12025ba66:TestCompletenessCompilerRuntime mosawi$ mvn cobertura:cobertura
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building TestCompletenessCompilerRuntime 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> cobertura-maven-plugin:2.7:cobertura (default-cli) > [cobertura]test @ TestCompletenessCompilerRuntime >>>
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/repositories/public/org/slf4j/slf4j-log4j12/1.6.2/slf4j-log4j12-1.6.2.pom
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/repositories/public/org/slf4j/slf4j-log4j12/1.6.2/slf4j-log4j12-1.6.2.pom (2 KB at 14.2 KB/sec)
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/models/model-data-source/2015.1.11-SNAPSHOT/maven-metadata.xml
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/models/model-data-source/2015.1.11-SNAPSHOT/maven-metadata.xml (804 B at 3.1 KB/sec)
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/compilers/decision-map-common/2015.1.11-SNAPSHOT/maven-metadata.xml
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/compilers/decision-map-common/2015.1.11-SNAPSHOT/maven-metadata.xml (809 B at 3.6 KB/sec)
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/models/decision-table-model/2015.1.11-SNAPSHOT/maven-metadata.xml
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/models/decision-table-model/2015.1.11-SNAPSHOT/maven-metadata.xml (807 B at 1.2 KB/sec)
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/compilers/mapping-maven-plugin/2015.1.11-SNAPSHOT/maven-metadata.xml
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/compilers/mapping-maven-plugin/2015.1.11-SNAPSHOT/maven-metadata.xml (810 B at 3.7 KB/sec)
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/models/calc-graph-model/2015.1.11-SNAPSHOT/maven-metadata.xml
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/groups/public/com/generalatomics/ctg/tla/models/calc-graph-model/2015.1.11-SNAPSHOT/maven-metadata.xml (803 B at 2.1 KB/sec)
Downloading: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/repositories/public/org/slf4j/slf4j-log4j12/1.6.2/slf4j-log4j12-1.6.2.jar
Downloaded: http://ctg-cache-repo.corp.generalatomics.net/nexus/content/repositories/public/org/slf4j/slf4j-log4j12/1.6.2/slf4j-log4j12-1.6.2.jar (10 KB at 380.9 KB/sec)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestCompletenessCompilerRuntime ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ TestCompletenessCompilerRuntime ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- cobertura-maven-plugin:2.7:instrument (default-cli) @ TestCompletenessCompilerRuntime ---
[INFO] Cobertura 2.1.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[INFO] Cobertura: Loaded information on 13 classes.
[INFO] Cobertura: Saved information on 13 classes.
[INFO] Cobertura: Saved information on 13 classes.
[ERROR] SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/mosawi/.m2/repository/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/mosawi/.m2/repository/org/slf4j/slf4j-log4j12/1.6.2/slf4j-log4j12-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[INFO] Instrumentation was successful.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ TestCompletenessCompilerRuntime ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 832 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ TestCompletenessCompilerRuntime ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 7 source files to /Users/mosawi/Perforce/mosawi_newTPS/QE/automation/TestCompletenessCompilerRuntime/target/test-classes
[INFO] /Users/mosawi/Perforce/mosawi_newTPS/QE/automation/TestCompletenessCompilerRuntime/src/test/java/com/generalatomics/ctg/tla/compilers/CompilerTest.java: /Users/mosawi/Perforce/mosawi_newTPS/QE/automation/TestCompletenessCompilerRuntime/src/test/java/com/generalatomics/ctg/tla/compilers/CompilerTest.java uses or overrides a deprecated API.
[INFO] /Users/mosawi/Perforce/mosawi_newTPS/QE/automation/TestCompletenessCompilerRuntime/src/test/java/com/generalatomics/ctg/tla/compilers/CompilerTest.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ TestCompletenessCompilerRuntime ---
[INFO] Surefire report directory: /Users/mosawi/Perforce/mosawi_newTPS/QE/automation/TestCompletenessCompilerRuntime/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@7c40bc88
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.32 sec
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] <<< cobertura-maven-plugin:2.7:cobertura (default-cli) < [cobertura]test @ TestCompletenessCompilerRuntime <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.7:cobertura (default-cli) @ TestCompletenessCompilerRuntime ---
[INFO] Cobertura 2.1.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[INFO] Cobertura: Loaded information on 13 classes.
Report time: 249ms
[INFO] Cobertura Report generation was successful.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.421 s
[INFO] Finished at: 2015-08-05T14:06:28-07:00
[INFO] Final Memory: 28M/438M
[INFO] ------------------------------------------------------------------------
SDGL12025ba66:TestCompletenessCompilerRuntime mosawi$
我真的不明白这是什么原因造成的?任何帮助将非常感激。谢谢
您在 slf4j 中看到的错误应该没问题。我以前见过这种情况,所以我确信这不是这里发生的事情的罪魁祸首
编辑:我注意到我的测试似乎是使用 TestNG 执行的,但我使用的是 JUnit:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@7c40bc88
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.32 sec
为什么 mvn clean install 会尝试使用 TestNG 而不是 Junit 来构建或运行我的测试?难道是我添加了新的依赖项?
最佳答案
只是为了指出一点。确保您的测试类位于测试文件夹(包)中,类名称应为 Test*、*Test、*TestCase。
关于java - mvn 构建成功但未执行任何测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31842959/
我正在为我的项目使用 Maven。如果我的项目不使用某些本地资源,这不是问题。 以便我遵循本指南 https://stackoverflow.com/a/61576687/6720896 将我的本地
今天我尝试通过 Maven 使用 site 命令生成报告,在编译阶段遇到了问题。 错误: ParseException in /Users/rajesh/Documents/workspace/mob
这个问题已经有答案了: Mvn install or Mvn package (8 个回答) 已关闭 6 年前。 我是一名新开发人员,一生中从未使用过 eclipse 或 java,我正在尝试做一些事
我知道mvn:package可以用来生成JAR或WAR,mvn:assemble有什么区别吗? 最佳答案 他们是完全不同的。 “package”是一个简单的命令,用于简单/单个项目,您只需创建一个 j
我正在使用 Maven 运行单个测试。 以这两种方式运行它的区别是: mvn -Dtest=DatabaseTest test mvn -Dtest=DatabaseTest surefire:tes
我已经从 svn checkout 了一个项目。我正在尝试使用 Maven 构建项目。 使用 mvn 编译可以很好地构建。 当我尝试命令 mvn package 时,出现以下错误。 [INFO] --
当我使用 Maven 故障安全插件运行集成测试时遇到问题。我有两个类,一个是 TestUnitTest.java,另一个是 TestIntegrationIT.java。在pom.xml中,我配置如下
我有一个测试用例: import org.graph.*; import org.junit.*; public class TestCase_1 { @Test public voi
大家好,我有这两个问题 mvn clean 我收到此警告消息 Some problems were encountered while building the effective model for
Maven的mvn install和mvn verify命令有什么区别? 关键字clean如何修改这些命令? 最佳答案 mvn verify - 如前所述 - 执行 maven 在项目中找到的任何集成
我正在关注 Scala, Eclipse and Maven Integration tutorial . 这真的很有用。 但是有一件事情让我觉得很烦: 我总是需要从 Eclipse 运行两个命令作为
虽然我知道 mvn install -U 用于 update-snapshots 并且它更新了从构建日志中看到的远程存储库中的所有内容,但我无法了解它会强制更新哪一部分。因为据我了解,即使是 mvn
我已经阅读了@ codehaus exec-maven-plugin usage 的文档.我知道 exec:java 允许用户在他们声明的同一个 VM 中执行 java 程序。我是 Maven 的新手
我正在使用树脂服务器开发一个 Java 项目(其中 maven 是构建工具)。我找到了一些不错的 plugins对于 Tomcat,如果我发出 'mvn compile'然后编译文件转到/webapp
我有一个打包为 war 文件(包括几个 jar 文件)的 Web 应用程序。我注意到当我运行 mvn install 时——唯一被编译的项目是那些已经改变的——然后它替换了 war 文件中的这些 ja
这个问题在这里已经有了答案: IDEA JetBrains IntelliJ - Compile error on 'make' but fine when compiled using Maven
mvn clean install和mvn install有什么区别? 最佳答案 clean 在 Maven 中是它自己的构建生命周期阶段(可以被认为是一个 Action 或任务)。 mvn clea
我的团队使用内部团队 Maven 存储库,该存储库是使用 Apache 从开发服务器共享的。我们还在同一台机器上运行 Continuum CI 服务器。 Continuum 中的 Maven 构建以“
我正在尝试执行“mvn install”以从 Dockerfile 创建 war 文件。波纹管是Dockerfile FROM scratch FROM ubuntu:16.04 RUN mkdir
mvn 验证失败并抛出依赖错误。 Dependency convergence error for com.company.concepts:patients:2.4.14-SNAPSHOT path
我是一名优秀的程序员,十分优秀!