Open bindulaxminarayan opened 4 years ago
I have the same issue.
Maybe a misconfiguration on my side?. it seems that it creates a directory and a file with the same name.
It seems to be here, in
List(PrettyPlugin,
HtmlPlugin(cucumberDir),
JsonPlugin(new File(cucumberDir, "cucumber.json")),
JunitPlugin(new File(cucumberDir, "junit-report.xml"))
)
I resolved this issue using
CucumberPlugin.mainClass := "io.cucumber.core.cli.Main"
CucumberPlugin.plugin := {
import com.waioeka.sbt.Plugin._
val cucumberDir = CucumberPlugin.cucumberTestReports.value
List(
HtmlPlugin(new File(cucumberDir, "cucumber.html")),
JsonPlugin(new File(cucumberDir, "cucumber.json")),
JunitPlugin(new File(cucumberDir, "junit-report.xml"))
)
}
thanks, I've been waiting to update any Scala stuff for 3.0 :)
That is correct! Would be great to put this into the configuration plugin.
We had the same issue. Maybe we could get rid of this Values Class - with that we could get rid of additional import required. Would be more then happy to open an MR for that issue Thanks @gedeh for workaround!
Thanks, I could have a look later today and try to make a PR for this
Hi all, thanks for all the recent updates, they look great. I can see that #17 has been merged, and with it an update to the plugin version to 0.3.0
, but as far as I can tell this version hasn't been published anywhere. Is it possible to release this new version please?
Yeah @lewismj I also still cant see the newer version in Maven central. I thought it was on queue or something
From the looks of it, it seems need him to run sbt publish
with the username and password properly set https://github.com/sbt/sbt-cucumber/blob/master/build.sbt#L16
Looks like something is missing here because in maven repo last version is 0.2.1
I've not looked at this for a while. sbt is broken with homebrew at the moment.
I think I may be able to publish this. Apologies, lot going on with work - and knee deep in C++ refactoring/analytics and other bits and pieces. Half my MacBook Pro screen is dead and this is the only PC with whatever passwords are hidden by system.
I've been looking at some graph stuff in Haskell tbh, but I think I'll give Scala 3 a go - seems to have improved a bit, finally its out. Both as a hobby and in work, the time to get Scala 3 out really doesn't help sell it, I,e, why adopt 'now' if the language is going to change 'soon' and 'soon' etc...
Anyway, new version should be out soon ish.
Published. When I get some time off, I'll look to overhaul this - and make it Scala 3 compliant.
Many thanks! @lewismj the scala-3-migrate-plugin is a great tool for make the Scala 3 migration fluent and painless :)
May take a bit of time for the latest publish to sync, but 0.3.1 should be there tomorrow. I need to get back into some Scala stuff, so will upgrade to Scala 3 and might look at any other fixes.
Thanks @lewismj 🎉
I am seeing error: Jul 23, 2020 4:14:12 PM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main Exception in thread "main" java.lang.IllegalArgumentException: Couldn't create a file output stream for /Users/tester/cucumber-tests/target/test-reports/cucumber. Make sure the the file isn't a directory. The details are in the stack trace below: at io.cucumber.core.plugin.PluginFactory.createFileOutputStream(PluginFactory.java:209) at io.cucumber.core.plugin.PluginFactory.openStream(PluginFactory.java:197) | => rat io.cucumber.core.plugin.PluginFactory.convert(PluginFactory.java:164) | => rat io.cucumber.core.plugin.PluginFactory.instantiate(PluginFactory.java:97) at io.cucumber.core.plugin.PluginFactory.create(PluginFactory.java:62) at io.cucumber.core.plugin.Plugins.createPlugins(Plugins.java:32) at io.cucumber.core.plugin.Plugins.(Plugins.java:25)
at io.cucumber.core.runtime.Runtime$Builder.build(Runtime.java:171)
at io.cucumber.core.cli.Main.run(Main.java:76)
at cucumber.api.cli.Main.run(Main.java:30)
at cucumber.api.cli.Main.main(Main.java:15)
Caused by: java.io.FileNotFoundException: /Users/tester/cucumber-tests/target/test-reports/cucumber (Is a directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:162)
at io.cucumber.core.plugin.PluginFactory.createFileOutputStream(PluginFactory.java:207)
... 10 more
[error] java.lang.IllegalStateException: Cucumber did not succeed and returned error =1
[error] at com.waioeka.sbt.CucumberPlugin$.$anonfun$projectSettings$6(CucumberPlugin.scala:113)
[error] at com.waioeka.sbt.CucumberPlugin$.$anonfun$projectSettings$6$adapted(CucumberPlugin.scala:88)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (cucumber) java.lang.IllegalStateException: Cucumber did not succeed and returned error =1