]
Matous Jobanek updated ARQ-2154:
--------------------------------
Fix Version/s: drone_2.5.0
phantomjs download and extraction remains without effect if Maven is
started in a parent or aggregator project
--------------------------------------------------------------------------------------------------------------
Key: ARQ-2154
URL:
https://issues.jboss.org/browse/ARQ-2154
Project: Arquillian
Issue Type: Bug
Affects Versions: 1.1.14.Final
Reporter: Karl-Philipp Richter
Assignee: Matous Jobanek
Fix For: drone_2.5.0
Arquillian Spacelift and Arquillian Drone Webdriver don't resolve the directory where
to findd the downloaded Selenium driver for phantomjs consistently. They seem to use the
working directory which isn't changed if Maven is started in an aggregator project
root and the Maven basedir property so that the `@Deployment` method fails due to
{code:java}
java.lang.IllegalStateException: Something bad happened when Drone was trying to download
and prepare a binary. For more information see the cause.
at
org.jboss.arquillian.drone.webdriver.binary.handler.AbstractBinaryHandler.checkAndSetBinary(AbstractBinaryHandler.java:62)
at
org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.getCapabilities(PhantomJSDriverFactory.java:99)
at
org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:72)
at
org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:37)
at
org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:127)
at
org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:38)
at
org.jboss.arquillian.drone.impl.DroneConfigurator$1.createInstance(DroneConfigurator.java:112)
at
org.jboss.arquillian.drone.impl.CachingCallableImpl.call(CachingCallableImpl.java:44)
at
org.jboss.arquillian.core.impl.threading.ThreadedExecutorService$ContextualCallable.call(ThreadedExecutorService.java:88)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.arquillian.spacelift.execution.ExecutionException: Execution of a task
failed. Unable to execute task UntarTool
at
org.arquillian.spacelift.execution.ExecutionException.prependMessage(ExecutionException.java:63)
at
org.arquillian.spacelift.execution.impl.FutureBasedExecution.unwrapException(FutureBasedExecution.java:71)
at
org.arquillian.spacelift.execution.impl.FutureBasedExecution.await(FutureBasedExecution.java:130)
at
org.jboss.arquillian.drone.webdriver.binary.BinaryFilesUtils.extract(BinaryFilesUtils.java:58)
at
org.jboss.arquillian.drone.webdriver.binary.handler.PhantomJSDriverBinaryHandler.prepare(PhantomJSDriverBinaryHandler.java:43)
at
org.jboss.arquillian.drone.webdriver.binary.handler.AbstractBinaryHandler.downloadAndPrepare(AbstractBinaryHandler.java:226)
at
org.jboss.arquillian.drone.webdriver.binary.handler.AbstractBinaryHandler.downloadAndPrepare(AbstractBinaryHandler.java:208)
at
org.jboss.arquillian.drone.webdriver.binary.handler.AbstractBinaryHandler.downloadAndPrepare(AbstractBinaryHandler.java:175)
at
org.jboss.arquillian.drone.webdriver.binary.handler.AbstractBinaryHandler.checkAndSetBinary(AbstractBinaryHandler.java:60)
... 12 more
Caused by: java.io.FileNotFoundException:
target/drone/1c947d57fce2f21ce0b43fe2ed7cd361/phantomjs-2.1.1-linux-x86_64/examples/colorwheel.js
(No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at
org.arquillian.spacelift.task.archive.UncompressTool.process(UncompressTool.java:118)
at org.arquillian.spacelift.task.archive.UncompressTool.process(UncompressTool.java:36)
at org.arquillian.spacelift.task.Task.run(Task.java:100)
at org.arquillian.spacelift.task.Task$1.call(Task.java:71)
... 4 more
{code}
I don't know how this usecase is specified in the requirements specification. If
it's unspecified, maybe there's a way to make both invokations of Maven in the
project and its parent or aggregator work. In case this is not supported it'd be nice
to fail with a clear feedback similar to `the invokation of Maven has to take place in the
project containing the Arquillian @Deployment method, see [documentation link] for an
explanation` since it took me for example several days and 100 stackoverflow bounty points
to figure out what the exception above is meaning.
I provided
https://gitlab.com/krichter/gitlab-ci-file-creation-aggregator/ referencing
https://gitlab.com/krichter/gitlab-ci-file-creation as module which demonstrates the
issue, e.g. at
https://gitlab.com/krichter/gitlab-ci-file-creation-aggregator/-/jobs/408.... It
performs the compilation skipping integration tests and then runs `mvn verify` in the
submodule's directory which succeeds and then in the aggregator directory which fails
(see `.gitlab-ci.yml`). The essence of these three calls is to invoke `mvn install` in the
aggregator directory which should succeed, but doesn't.
I asked
https://stackoverflow.com/questions/47217087/why-does-my-arquillian-drone...
for support which might contain more details.