How to customize sbt build command in intellij for spark - intellij-idea

I need to add some profiles to the sbt command line: e.g.
sbt -Pyarn -Phadoop-2.4 -Dhadoop.version=2.5.2 assembly
So in Intellij 14 where is the sbt command line configured?

Related

Intellij IDEA no option to import ant build file

I have a project which uses ant build tool and the project uses
IntelliJ IDEA 2021.3.1 (Community Edition)
The most frustrating and infuriating part that I'm experiencing is
a process of importing build.xml file to ant window - it just doesn't
work whatever I try. And I've tried
Importing project from git
Importing project from sources
It just seems that the option to add build.xml file as an ant build file evades me.
The most ridiculous part is when I try to press + in an ant window and add build.xml it
does not allow me to select build.xml it just fails to show build.xml at all... Why?
What have I tried?
I've tried every single option written here
How to import existing Ant build.xml into IntelliJ IDEA
My questions
How to add buil.xml file to Intellij IDEA?
Why I'm failing to add build.xml file as an ant build file while
going though ant window + option?
Why I'm missing an option (right context menu) to add build.xml
as an ant build file?
I've tried to build project using Eclipse and everything was working fine, but Intellij
just ignores ant why? Do I need Ultimate version? Is ant option available only in paid version of Intellij IDEA?
Oh, my dear God, just found out how to import ant build.xml file
First I needed to override build.xml file type (click on an ant build.xml file -> select override file type -> select XML) and then second time I've clicked the right mouse button an extra option showed add as ant build file
showed up.

Use custom script in Intelij IDEA to run sbt shell

Is it possible to run sbt shell in Intelij IDEA using custom script instead of built in sbt or sbt from sbt-launch.jar? Why I need this, for example there is some project which uses custom script to set config file location, VM parameters, and other options for sbt and this script is shared in version control system. And it would be very convenient to just specify for IntelliJ IDEA location of such script.
This is currently not possible. However, to pass project-specific sbt command line parameters to sbt you may place a .sbtopts in your project directory, and likewise a .jvmopts for VM parameters.

Intellij Command Used for "Refrsh SBT Project"

I'm wondering what is the actual sbt command that Intellij is executing when I use "Refresh sbt project" from the sbt window. I would like to understand how the same command can be issued from the sbt shell.
The IntelliJ Scala plugin ships with the sbt-structure sbt plugin, which gets automatically loaded with sbt shell sessions that you start from the IDE. When you enable sbt shell for imports, a refresh simply writes commands similar to these to the sbt shell:
> set org.jetbrains.sbt.StrcutureKeys.sbtStructureOptions in Global := "prettyPrint download"
> */*:dumpStructureTo structure.xml
To actually import the project structure, IntelliJ also runs an additional step which does not happen in sbt.

How run sbt assembly command without tests from command line?

I have read questions: this and that. They suggest to modify sbt file. But I want run sbt clean assembly without tests and do not modify sbt build files. Is it possible with sbt? In maven there is -DskipTest=true parameter, is there analog for sbt?
For any properties you need to change on the command line, prepend them with "set ", and wrap them in quotes.
Example for Windows:
sbt "set test in assembly := {}" clean assembly
Example for Mac:
sbt 'set test in assembly := {}' clean assembly

UnsatisfiedLinkError when running mvn jfx:run with IntelliJ

I have used the Quickstart JavaFX archetype from the JavaFX Maven Plugin to create a Maven JavaFX project.
When running this project from the command line with "mvn jfx:run" everything works fine, but when I try to run it from IntelliJ (12.1.6) by creating a run configuration with "jfx:run" in the command line I get an UnsatisifedLinkError:
java.lang.UnsatisfiedLinkError: com.sun.glass.ui.win.WinApplication._submitForLaterInvocation(Ljava/lang/Runnable;)V
at com.sun.glass.ui.win.WinApplication._submitForLaterInvocation(Native Method)
at com.sun.glass.ui.win.WinApplication.submitForLaterInvocation(WinApplication.java:215)
at com.sun.glass.ui.InvokeLaterDispatcher.run(InvokeLaterDispatcher.java:101)
Any advice for how to fix this?
Adding the JRE /bin directory to the java.libary.path system property seems to work. This property used by the JVM for locating DLLs with native code.
Edit run/debug configuration and set the VM Options of the runner configuration to something like:
-Djava.library.path="C:\Program Files\Java\jdk1.7.0_45\jre\bin"