Building Jenkins with NetBeans errors - java

I try to build Jenkins project with netBeans but have the same problem all the time.... Multiples tests fails during the building of project. I put descriptions of some fails.
Running hudson.cli.ConnectionMockTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.138 sec - in hudson.cli.ConnectionMockTest
Running hudson.cli.ConnectionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec - in hudson.cli.ConnectionTest
Running hudson.cli.PrivateKeyProviderTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.655 sec <<< FAILURE! - in hudson.cli.PrivateKeyProviderTest
initializationError(hudson.cli.PrivateKeyProviderTest) Time elapsed: 0.015 sec <<< ERROR!
java.lang.IllegalStateException: Failed to transform class with name hudson.cli.CLI. Reason: java.io.IOException: invalid constant type: 15
at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:207)
at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:145)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:439)
at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:420)
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3508)
at java.lang.Class.annotationData(Class.java:3497)
at java.lang.Class.getAnnotation(Class.java:3402)
at org.junit.internal.MethodSorter.getDeclaredMethods(MethodSorter.java:52)
at org.junit.internal.runners.TestClass.getAnnotatedMethods(TestClass.java:45)
at org.junit.internal.runners.MethodValidator.validateTestMethods(MethodValidator.java:71)
at org.junit.internal.runners.MethodValidator.validateStaticMethods(MethodValidator.java:44)
at org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(MethodValidator.java:50)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.validate(PowerMockJUnit44RunnerDelegateImpl.java:108)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.<init>(PowerMockJUnit44RunnerDelegateImpl.java:70)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:144)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39)
at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:59)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.<init>(AbstractCommonPowerMockRunner.java:32)
at org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Results :
Tests in error:
PrivateKeyProviderTest.initializationError » IllegalState Failed to transform ...
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0
------------------------------------------------------------------------
Reactor Summary:
Jenkins main module ............................... SUCCESS [1.996s]
Jenkins CLI ....................................... FAILURE [11.240s]
Jenkins core ...................................... SKIPPED
Jenkins war ....................................... SKIPPED
Test harness for Jenkins and plugins .............. SKIPPED
Jenkins plugin POM ................................ SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 15.449s
Finished at: Mon Oct 06 09:14:39 EDT 2014
Final Memory: 25M/471M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project cli: There are test failures.
Please refer to C:\Users\ystavcha\Desktop\newClone\jenkins\cli\target\surefire-reports for the individual test results.
-> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

It might be related to Powermock version. Try upgrading the version.

Related

Crashed tests when building a Maven project

I run a Maven user-data project integration tests, with the mvn clean install -Denv="test" -Ddb="h2" command, and they seem to pass all just fine, except that I get some crashed tests with the message: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
The same error also shows up for another project user-rest which is client of the above one. That leads me to think it may not be project related.
The full output console log shows:
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M1:verify (default) # user-data ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:38 min
[INFO] Finished at: 2020-02-08T17:52:22+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M1:verify (default) on project user-data: There are test failures.
[ERROR]
[ERROR] Please refer to /home/stephane/dev/java/projects/user-data/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/stephane/dev/java/projects/user-data && /home/stephane/.sdkman/candidates/java/13.0.2.hs-adpt/bin/java -jar /home/stephane/dev/java/projects/user-data/target/surefire/surefirebooter17442042042677513972.jar /home/stephane/dev/java/projects/user-data/target/surefire 2020-02-08T17-45-27_266-jvmRun1 surefire5026424780409372472tmp surefire_012665318530559224267tmp
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.thalasoft.user.data.it.service.UserServiceTest
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:991)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:837)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
The target/failsafe-reports/com.thalasoft.user.data.it.jpa.UserRepositoryTest.txt file contains:
-------------------------------------------------------------------------------
Test set: com.thalasoft.user.data.it.jpa.UserRepositoryTest
-------------------------------------------------------------------------------
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 263.924 s - in com.thalasoft.user.data.it.jpa.UserRepositoryTest
The target/failsafe-reports/failsafe-summary.xml file contains:
<?xml version="1.0" encoding="UTF-8"?>
<failsafe-summary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.o
rg/surefire/maven-surefire-plugin/xsd/failsafe-summary.xsd" result="254" timeout="false">
<completed>0</completed>
<errors>0</errors>
<failures>0</failures>
<skipped>0</skipped>
<failureMessage>org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly s
aying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /home/stephane/dev/java/projects/user-data && /home/stephane/.sdkman/candidates/java/13.0.2
.hs-adpt/bin/java -jar /home/stephane/dev/java/projects/user-data/target/surefire/surefirebooter17442042042677513972.jar /hom
e/stephane/dev/java/projects/user-data/target/surefire 2020-02-08T17-45-27_266-jvmRun1 surefire5026424780409372472tmp surefir
e_012665318530559224267tmp
Process Exit Code: 0
Crashed tests:
com.thalasoft.user.data.it.service.UserServiceTest
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:991)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:837)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
The directory contains:
11:24 $ ll target/failsafe-reports/
total 32
-rw-rw-r-- 1 stephane stephane 350 févr. 8 17:49 com.thalasoft.user.data.it.jpa.UserRepositoryTest.txt
-rw-rw-r-- 1 stephane stephane 3501 févr. 8 17:52 failsafe-summary.xml
-rw-rw-r-- 1 stephane stephane 23427 févr. 8 17:49 TEST-com.thalasoft.user.data.it.jpa.UserRepositoryTest.xml
I tried under the following JAVA versions:
12.0.2-open
11.0.6-open
13.0.2.j9-adpt
13.0.2.hs-adpt
and always get the same error.
UPDATE: The integration test that was crashing, does not crash if running only that test. The mvn clean install -Denv="test" -Ddb="h2" -Dtest=UserServiceTest command shows:
[INFO] Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M1:verify (default) # user-data ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # user-data ---
[INFO] Installing /home/stephane/dev/java/projects/user-data/target/user-data-0.0.1-SNAPSHOT.jar to /home/stephane/.m2/repository/com/thalasoft/user-data/0.0.1-SNAPSHOT/user-data-0.0.1-SNAPSHOT.jar
[INFO] Installing /home/stephane/dev/java/projects/user-data/pom.xml to /home/stephane/.m2/repository/com/thalasoft/user-data/0.0.1-SNAPSHOT/user-data-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:32 min
[INFO] Finished at: 2020-02-09T11:41:02+01:00
[INFO] ------------------------------------------------------------------------
UPDATE: The same issue remains in the dependent user-rest project, that contains a dependency on the fixed user-data project. I tried adding the same plugin but it did not help. It had a dumpstream file which contains: Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter
✔ ~/dev/java/projects/user-rest [master|✚ 1]
12:00 $ lsb_release -rd
Description: Ubuntu 19.10
Release: 19.10
✔ ~/dev/java/projects/user-rest [master|✚ 1]
12:06 $ mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/stephane/.sdkman/candidates/maven/current
Java version: 13.0.2, vendor: AdoptOpenJDK, runtime: /home/stephane/.sdkman/candidates/java/13.0.2.hs-adpt
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-29-generic", arch: "amd64", family: "unix"
The solution was to use the following property:
<forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
Indeed the tests were so long there would be a time out in the fork.
I was facing the same issue in one of project. I fixed it by upgrading to the latest version of the surefire plugin and by disabling the class loader as suggested in the discussion https://github.com/carlossg/docker-maven/issues/90
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>

Maven skip tests specified in -Dtest

I'm trying to run mvn test on a submodule from the parent module, specifying the tests (actually 1 test) that I want to run.
the command:
mvn -pl :tika-parsers test -DfailIfNoTests=false -Dtest=org.apache.tika.detect.TestContainerAwareDetector
The problem is that for some reason no test is running.
The build report:
...
...
...
[INFO] --- maven-surefire-plugin:2.12:test (default-test) # tika-parsers ---
[INFO] Surefire report directory: C:\Users\user\Code\Python\BugMiner\tested_project\tika\tika-parsers\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
... ... ...
When Im running:
mvn -pl :tika-parsers test
All the tests are running including the one I specified
The build report:
...
...
...
[INFO] --- maven-surefire-plugin:2.12:test (default-test) # tika-parsers ---
[INFO] Surefire report directory: C:\Users\user\Code\Python\BugMiner\tested_project\tika\tika-parsers\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.tika.detect.TestContainerAwareDetector
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.293 sec
Running org.apache.tika.embedder.ExternalEmbedderTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.apache.tika.mime.MimeTypesTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.apache.tika.mime.MimeTypeTest
...
...
...
Can anyone show me what is the proper command?
This is a surefire version 2.12 bug.
Upgrade the surefire plugin in the pom.xml file:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
...
</configuration>
</plugin>
I think your command is good and shall work, try downgrading OR upgrading your surefire version and this shall solve the problem for you.

Apache directory-server maven packaging

I've checked out the latest Apache Directory-server trunk and am trying to get packaging working. I made a trivial change (i.e. added a new class) in protocol-ntp. When I run mvn package in protocol-ntp, the resulting jar in target contains the new class.
However, I'm having trouble getting the new class to be present in the jar containing all the projects. When I run mvn package inside the all folder, it "successfully" packages but the jar file (which does have an updated timestamp) contains only the old projects, without the new class. Running mvn package in the trunk root directory yields the following error:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.directory.ldap.client.template.LdapConnectionTemplateTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.718 sec - in org.apache.directory.ldap.client.template.LdapConnectionTemplateTest
Running org.apache.directory.shared.client.api.AdsSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.378 sec - in org.apache.directory.shared.client.api.AdsSchemaLoaderTest
Running org.apache.directory.shared.client.api.LdapConnectionPoolTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.171 sec - in org.apache.directory.shared.client.api.LdapConnectionPoolTest
Running org.apache.directory.shared.client.api.LdapConnectionTest
Tests run: 13, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 64.625 sec <<< FAILURE! - in org.apache.directory.shared.client.api.LdapConnectionTest
testConnectionWrongHost(org.apache.directory.shared.client.api.LdapConnectionTest) Time elapsed: 30.056 sec <<< FAILURE!
java.lang.AssertionError: Expected exception: org.apache.directory.ldap.client.api.exception.InvalidConnectionException
at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:32)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:391)
at org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:64)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.directory.server.core.integ.FrameworkRunner.run(FrameworkRunner.java:164)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Running org.apache.directory.shared.client.api.LdapSSLConnectionTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.409 sec - in org.apache.directory.shared.client.api.LdapSSLConnectionTest
Running org.apache.directory.shared.client.api.LightweightLdapConnectionPoolTest
Max Active connections =: 8
Tests run: 6, Failures: 0, Errors: 0, Skipped: 5, Time elapsed: 3.851 sec - in org.apache.directory.shared.client.api.LightweightLdapConnectionPoolTest
Running org.apache.directory.shared.client.api.operations.bind.SimpleBindRequestTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.147 sec - in org.apache.directory.shared.client.api.operations.bind.SimpleBindRequestTest
Running org.apache.directory.shared.client.api.operations.ClientAbandonRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.442 sec - in org.apache.directory.shared.client.api.operations.ClientAbandonRequestTest
Running org.apache.directory.shared.client.api.operations.ClientAddRequestTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.067 sec - in org.apache.directory.shared.client.api.operations.ClientAddRequestTest
Running org.apache.directory.shared.client.api.operations.ClientCompareRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.913 sec - in org.apache.directory.shared.client.api.operations.ClientCompareRequestTest
Running org.apache.directory.shared.client.api.operations.ClientDeleteRequestTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 4.525 sec - in org.apache.directory.shared.client.api.operations.ClientDeleteRequestTest
Running org.apache.directory.shared.client.api.operations.ClientExtendedRequestTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.875 sec - in org.apache.directory.shared.client.api.operations.ClientExtendedRequestTest
Running org.apache.directory.shared.client.api.operations.ClientModifyDnRequestTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 4.896 sec - in org.apache.directory.shared.client.api.operations.ClientModifyDnRequestTest
Running org.apache.directory.shared.client.api.operations.ClientModifyRequestTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.234 sec - in org.apache.directory.shared.client.api.operations.ClientModifyRequestTest
Running org.apache.directory.shared.client.api.operations.ConcurrentSearchAndUnbindTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 4.257 sec - in org.apache.directory.shared.client.api.operations.ConcurrentSearchAndUnbindTest
Running org.apache.directory.shared.client.api.operations.GetRootDseTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.234 sec - in org.apache.directory.shared.client.api.operations.GetRootDseTest
Running org.apache.directory.shared.client.api.operations.search.AnonymousClientSearchRequestTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.928 sec - in org.apache.directory.shared.client.api.operations.search.AnonymousClientSearchRequestTest
Running org.apache.directory.shared.client.api.operations.search.ClientSearchRequestTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.169 sec - in org.apache.directory.shared.client.api.operations.search.ClientSearchRequestTest
Running org.apache.directory.shared.client.api.operations.search.OperationWithIndexTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 21.043 sec - in org.apache.directory.shared.client.api.operations.search.OperationWithIndexTest
Running org.apache.directory.shared.client.api.operations.search.SearchRequestReturningAttributesTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.254 sec - in org.apache.directory.shared.client.api.operations.search.SearchRequestReturningAttributesTest
Running org.apache.directory.shared.client.api.operations.search.SearchWithReferralsTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.803 sec - in org.apache.directory.shared.client.api.operations.search.SearchWithReferralsTest
Running org.apache.directory.shared.client.api.ServerSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.399 sec - in org.apache.directory.shared.client.api.ServerSchemaLoaderTest
Running org.apache.directory.shared.client.api.ValidatingLdapConnectionPoolTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.835 sec - in org.apache.directory.shared.client.api.ValidatingLdapConnectionPoolTest
Results :
Failed tests:
LdapConnectionTest.testConnectionWrongHost Expected exception: org.apache.directory.ldap.client.api.exception.InvalidConnectionException
Tests run: 162, Failures: 1, Errors: 0, Skipped: 14
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ApacheDS Protocol Ntp .............................. SUCCESS [ 4.451 s]
[INFO] Apacheds Server Annotations ........................ SUCCESS [ 34.057 s]
[INFO] ApacheDS Server Config ............................. SUCCESS [ 12.769 s]
[INFO] ApacheDS Server JNDI ............................... SUCCESS [ 1.720 s]
[INFO] ApacheDS Test Framework ............................ SUCCESS [01:09 min]
[INFO] ApacheDS All ....................................... SUCCESS [ 3.743 s]
[INFO] ApacheDS Logger Interceptor ........................ SUCCESS [ 1.962 s]
[INFO] ApacheDS Password Hashing Interceptor .............. SUCCESS [ 1.046 s]
[INFO] ApacheDS Core Integration .......................... SUCCESS [14:02 min]
[INFO] ApacheDS Protocol Kerberos Test .................... SUCCESS [ 27.092 s]
[INFO] ApacheDS Server Integration ........................ SUCCESS [10:50 min]
[INFO] ApacheDS DirectoryService-WebApp bridge ............ SUCCESS [ 0.723 s]
[INFO] ApacheDS Jetty HTTP Server Integration ............. SUCCESS [ 1.341 s]
[INFO] ApacheDS Service Builder ........................... SUCCESS [ 3.739 s]
[INFO] Apache Directory LDAP Client API test .............. FAILURE [03:44 min]
[INFO] kerberos-client .................................... SKIPPED
[INFO] ApacheDS Service ................................... SKIPPED
[INFO] ApacheDS Wrapper ................................... SKIPPED
[INFO] ApacheDS Installers Maven Plugin ................... SKIPPED
[INFO] ApacheDS Installers ................................ SKIPPED
[INFO] ApacheDS OSGi Integration Tests .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:21 min
[INFO] Finished at: 2017-04-25T21:53:52-04:00
[INFO] Final Memory: 118M/1407M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ldap-client-test: There are test failures.
[ERROR]
[ERROR] Please refer to /media/DataDrive/Projects/Parclock/git-repos/directory-server/ldap-client-test/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :ldap-client-test
Any ideas on how I can get this working?
I was able to solve the problem by running mvn package in the root project directory with -Dmaven.test.skip=true

Maven can't connect to remote standalone Selenium server

I am working on creating a test suite for a project at work, where we will be testing our application on several operating systems from a central box (all vms). The box with the tests on is a CentOS server utilizing apache-maven for the tests. I am trying to test against a Windows 10 box running selenium-standalone-server but have had no luck so far. Here is the configuration for each box:
CentOS
Apache Maven
IP address - 192.168.4.62
Subnet mask - 255.255.255.0
Sample Test
package com.netsweeper.browsertests;
import static org.junit.Assert.assertEquals;
import java.net.URL;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.*;
import org.openqa.selenium.safari.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.support.ui.*;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
public class ReadyTest {
#Test
public void accessChrome() {
try {
WebDriver driver = new RemoteWebDriver(new URL("http://192.168.4.60:4444/wd/hub"), DesiredCapabilities.chrome());
driver.get("http://google.com");
assertEquals("The page title should equal Google at the start of the test", "Google", driver.getTitle());
driver.close();
driver.quit();
}
catch ( java.net.MalformedURLException e) {
System.out.println("Broken");
}
}
}
Test Output
[root#62 browser_tests]# mvn -Dtest=ReadyTest test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Browser Tests 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # browsertests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /src/client_filter/browser_tests/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # browsertests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # browsertests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /src/client_filter/browser_tests/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # browsertests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # browsertests ---
[INFO] Surefire report directory: /src/client_filter/browser_tests/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.netsweeper.browsertests.ReadyTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.392 sec <<< FAILURE!
accessChrome(com.netsweeper.browsertests.ReadyTest) Time elapsed: 1.325 sec <<< ERROR!
org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
Command duration or timeout: 732 milliseconds
Build info: version: '2.47.1', revision: 'unknown', time: '2015-07-30 11:02:44'
System info: host: '62.4.168.192.in-addr.arpa.support', ip: '192.168.4.62', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-642.1.1.el6.x86_64', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
at com.netsweeper.browsertests.ReadyTest.accessChrome(ReadyTest.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Results :
Tests in error:
accessChrome(com.netsweeper.browsertests.ReadyTest): The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html(..)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.391 s
[INFO] Finished at: 2016-06-16T11:17:21-04:00
[INFO] Final Memory: 16M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project browsertests: There are test failures.
[ERROR]
[ERROR] Please refer to /src/client_filter/browser_tests/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[root#62 browser_tests]#
Windows 10
Selenium Standalone Server
Placed in C:\Users\------\Documents\client_filter\selenium-server-standalone-2.53.0
Started with java -jar selenium-server-standalone-2.53.0 from said directory
Correctly starts running
Chrome Driver
Downloaded and placed in C:\Windows\System32
Starting it from command line works correctly, so it is in $PATH
C:\Users\Kendall Roth\Documents\client_filter> chromedriver.exe
IP address - 192.168.4.60
Netmask - 255.255.255.0
However, the error above seems to indicate that the chromedriver is not in the right place to be found, even though it can be found from anywhere (due to being in path). The error was also displayed in the Windows console, and said the same thing.
I have looked around, but can't find anything that deals with a remote install of the Selenium standalone server. This link unfortunately did not work, but was similar to my issue (albeit on a local scale):
selenium-2-chrome-driver
As it turns out, it was a rather simple fix. Although C:\Windows\ is not in the system path this was where the chromedriver.exe was supposed to go. Placing it here instead of in C:\Windows\System32\ appears to solve the problem. I'm not sure if this is a remote server only thing or if it extends to local standalone instances as well, but this solution worked for us.
I've found that including the chromedriver.exe in the resources folder within the project to be a workable fail-safe so I don't have to rely on a new user or remote server having the executable in the right location within their file system.

Importing Unirest, dependencies issues

So I was trying to import Unirest for java to make simple http requests.
Now I ran into warnings about duplicated dependencies regarding Apache dependencies. I first thought to solve this by adding this to the build.grandle:
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
That did make it run, but still made it crash once I used any of the Unirest features.
So back to google came to this post. The one and only answer pointed to this tutorial which I decided to follow. So I downloaded mvn. First had some trouble with the JAVA_HOME, but set that correctly. then I did like he did: execute mvn clean assembly:assemblyin the master folder of the github dir after editing the pom.xml
However, for me, it didn't generate the .jar files like he has.
What am I doing wrong? Could one please create it for me :)?
I do get a target folder like it should, in cmd it is downloading a bunch of files, but no .jar file.
In the Target folder I have 4 subfolders: classes, maven-status, surefire-reports, test-classes.
Some stack traces:in cmd
Failed tests: testPostRawBody(com.mashape.unirest.test.http.UnirestTest): expe
cted:<'"#[?????]-test-123-0.01090655...> but was:<'"#[?????]-test-123-0.01090655
...>
Tests run: 36, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.502 s
[INFO] Finished at: 2015-05-17T21:46:52+02:00
[INFO] Final Memory: 21M/178M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project unirest-java: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\Ruud\Downloads\unirest-java-master\unirest-java
-master\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
And then in the file it is referring to:
-------------------------------------------------------------------------------
Test set: com.mashape.unirest.test.http.UnirestTest
-------------------------------------------------------------------------------
Tests run: 36, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 17.855 sec <<< FAILURE!
testPostRawBody(com.mashape.unirest.test.http.UnirestTest) Time elapsed: 0.122 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<'"#[?????]-test-123-0.01090655...> but was:<'"#[?????]-test-123-0.01090655...>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at com.mashape.unirest.test.http.UnirestTest.testPostRawBody(UnirestTest.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Running on windows.
I was having same issues with this while trying to build jar file with dependencies. Try running the modified mvn command but skip the tests
mvn clean assembly:assembly -Dmaven.test.skip=true
This worked for me. Also check out https://github.com/Mashape/unirest-java/issues/52

Categories

Resources