surefire

Why isn't Drools working with Java 8?

不羁岁月 提交于 2019-11-30 17:14:18
I just installed the final version of Java 8. When I try to build my project with Maven, many tests fail if I use Java 8, but pass fine with Java 7. I've tried running it via the command line with JAVA_HOME set to C:\Program Files\Java\jdk1.8.0 and via Eclipse with jdk1.8.0 selected as the default JRE in Installed JREs. Both fail. Note that the tests that fail all use Drools 6 (and its dependencies). Here is the output: ------------------------------------------------------------------------------- Test set: com.local.lds.rules.LocmChiTest ------------------------------------------------------

maven surefire reporting plugin configuration

穿精又带淫゛_ 提交于 2019-11-30 08:36:07
问题 I have a multi-module maven project. The parent pom.xml is simply a way to reference common information for the 4 subprojects. I have quite a few JUnit tests that run and I also have the Parent Project set up for Project WebSite using the maven-info-reports-plugin . I have the maven-surefire-report-plugin configured in the parent and it generates the target/site/surefire-report.html file in each of the subprojects with the correct information. My problem is when I run my project website via

TestNG surefire, run suite with maven command line

守給你的承諾、 提交于 2019-11-30 04:30:07
问题 Is it possible to run a predefined xml suite from the command line through maven? I am able to run a class or a particular test. But I am unable to run a suite. Here is what I am running from the command line: --> mvn -Dtest=TestCircle#mytest -Denvironment=test -Dbrowser=firefox -DscreenShotDirectory=/Users/jeremy/temp test I do have a suite defined, which runs nicely through intelliJ, but I am not sure how to invoke the suite.xml file. Or for example, after the tests have run, testng creates

Why isn't Drools working with Java 8?

↘锁芯ラ 提交于 2019-11-30 00:42:30
问题 I just installed the final version of Java 8. When I try to build my project with Maven, many tests fail if I use Java 8, but pass fine with Java 7. I've tried running it via the command line with JAVA_HOME set to C:\Program Files\Java\jdk1.8.0 and via Eclipse with jdk1.8.0 selected as the default JRE in Installed JREs. Both fail. Note that the tests that fail all use Drools 6 (and its dependencies). Here is the output: -------------------------------------------------------------------------

Maven 2.1.0 not passing on system properties to Java virtual machine

余生颓废 提交于 2019-11-29 22:11:29
We use the command line to pass on system properties to the Java virtual machine when running our Hudson builds on a Linux box. It used to work quite well in 2.0.9 by since we upgraded to 2.1.0 it has stopped working altogether. The system properties just never make it to the Java virtual machine. I have created a small test project and indeed it does not work at all. This should work just fine with Maven 2.0.9: mvn2.0.9 -Dsystem.test.property=test test But this will fail: mvn2.1 -Dsystem.test.property=test test The Java code simply does this assertTrue( System.getProperty("system.test

mvn test fails because of Surefire JDK version?

余生颓废 提交于 2019-11-29 10:54:55
I am trying to run mvn test on my project. The project itself compiles and installs but man test fails with the following output: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project udms-server: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: There was an error in the forked process [ERROR] java.lang.UnsupportedClassVersionError: some/project/Event : Unsupported major.minor version 52.0 [ERROR] at java.lang.ClassLoader.defineClass1(Native Method) [ERROR] at java.lang.ClassLoader

Maven 2.1.0 not passing on system properties to Java virtual machine

坚强是说给别人听的谎言 提交于 2019-11-28 18:38:20
问题 We use the command line to pass on system properties to the Java virtual machine when running our Hudson builds on a Linux box. It used to work quite well in 2.0.9 by since we upgraded to 2.1.0 it has stopped working altogether. The system properties just never make it to the Java virtual machine. I have created a small test project and indeed it does not work at all. This should work just fine with Maven 2.0.9: mvn2.0.9 -Dsystem.test.property=test test But this will fail: mvn2.1 -Dsystem

Make maven's surefire show stacktrace in console

纵然是瞬间 提交于 2019-11-28 16:56:29
I'd like to see the stacktrace of unit tests in the console. Does surefire support this? You can use the following command to see the stack trace on console instead of report files in the target/surefire-reports folder: mvn -Dsurefire.useFile=false test h7r A related problem that I found is that surefire in recent versions apparently sets trimStackTrace to true by default (rendering most stack trace in failed tests useless), which is quite inconvenient. Setting -DtrimStackTrace=false or defining <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId>

Is there a way to skip only a single test in maven?

倖福魔咒の 提交于 2019-11-28 16:29:15
I would like to skip only a single test while launching mvn install . Is there a way to do that ? With junit 4, I add an @Ignore annotation when I want to do that. This would work for you, unless you want to only sometimes ignore the test, or only ignore it when the build runs from maven. If this is the case, then I would ask "Why?" Tests should be consistent, they should be portable, and they should always pass. If a specific test is problematic I would consider re-writing it, removing it entirely, or moving it to a different test suite or project. You can specify an exclusion pattern to

Maven reporting and site generation for multiple module project

时间秒杀一切 提交于 2019-11-28 10:14:24
I am trying to get project with submodules to test and generate reports correctly, but have got some problems. I have the following project structure: parent |-test1 |-test2 and the pom.xml for parent looks like this: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>parent</groupId> <artifactId>parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>test1