-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Hello,
I have picked a sub project (jpa-jpa-converter) and renamed the test file form EmployeeRepositoryTest
to EmployeeRepositoryIT
. Thus it will be driven by the maven-failsafe-plugin
with the command failsafe:integration-test
.
First question is: Why isn't that the default in the whole repository? Isn't integration testing the goal of the whole thing? I would expect all integration tests to be run seperated from my normal unit tests.
Second Question: When I now start the tests explicitly then I receive an error that is stating almost nothing to me:
cd /home/thomas/ablage/javaee7-samples/jpa/jpa-converter; JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 M2_HOME=/home/thomas/software/apache-maven-3 /home/thomas/software/apache-maven-3/bin/mvn -Pwildfly-managed-arquillian failsafe:integration-test
Scanning for projects...
Some problems were encountered while building the effective model for org.javaee7:jpa-jpa-converter:jar:1.0-SNAPSHOT
'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ org.javaee7:samples-parent:1.0-SNAPSHOT, /home/thomas/ablage/javaee7-samples/pom.xml, line 468, column 29
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.
------------------------------------------------------------------------
Building Java EE 7 Sample: jpa-converter 1.0-SNAPSHOT
------------------------------------------------------------------------
--- maven-failsafe-plugin:2.19.1:integration-test (default-cli) @ jpa-jpa-converter ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.javaee7.jpa.converter.EmployeeRepositoryIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.561 sec <<< FAILURE! - in org.javaee7.jpa.converter.EmployeeRepositoryIT
org.javaee7.jpa.converter.EmployeeRepositoryIT Time elapsed: 0.56 sec <<< ERROR!
org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
Caused by: java.lang.NullPointerException
Results :
Tests in error:
EmployeeRepositoryIT.org.javaee7.jpa.converter.EmployeeRepositoryIT » Lifecycle
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 3.333 s
Finished at: 2016-01-29T09:06:04+01:00
Final Memory: 21M/302M
------------------------------------------------------------------------
So the essence of this is org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container Caused by: java.lang.NullPointerException
The same test runs fine when executed by surefire:test
.