Scala IDEA and activator build the same project separately - scala

I'm using IntellIj IDEA + scala + play2 plugins to develop my Play! application.
I enabled 'Auto make' option on IDEA and after the build is finished in IDEA, and when I try to run the application in activator console, it does the another build process on the console.
How can I make these two environment to share the build environment?

Related

How to debug kotlin spring boot app in Eclipse?

I'm trying to complete this tutorial. App created on this page with gradle, kotlin, java 12, war, dependencies as described on tutorial by first link.
In a nutshell, all works fine, app build by gradle works, app starts, I can open gradle app in IntelliJ IDEA and start and debug works.
Next I want to compare kotlin app development in Eclipse. I can run app with this run configuration:
App starts normally and works.
But in debug configuration there is no Gradle project option:
How to make proper debug configuration with possibility to debug kotlin files too?
Right click on project name -> Gradle -> Refresh gradle project did the trick.
Kotlin runtime library appears in libraries, java app or spring boot app debug now works, and breakpoint can be set.

How do I run unit tests against Akka Actors using Ant?

I am in a project environment where Apache Ant is used exclusively to build, test, and deploy production application. I do not have control or influence over this, and it will not change. (ie. I cannot just switch to SBT for this application.)
I have inherited a Scala 2.9.3 application that I am upgrading to Scala 2.12.4. I'm also adding SBT and IDE (Intelli-J) support for LOCAL development, build, testing purposes.
I have everything working building, testing, running locally using ANT, SBT, and the IDE. I'm using scalatest 2.12.3 for most unit tests. But I've run into a problem trying to integrate the Akka Test Kit : https://doc.akka.io/docs/akka/2.5/testing.html
I am unable to create an Ant taskdef for running the tests.
How do I run unit tests against Akka Actors using Ant?
I can provide source code, as needed.
But I don't know how that will help, so please be specific if you want/need to see something.
Thanks!

Live debugging a Spring boot project in eclipse

I am trying to create a Spring boot based MVC application using eclipse.
I created a starter template from spring's starter website and i have imported the maven package into eclipse.
I created a controller and a view and I am able to run the application by going to "debug as" or "run as" and selecting Java Application and then selecting the spring boot application main method from the list.
However with this approach, Eclipse does not seem to auto build my changes in my java classes nor the changes in my template views. (I use Thymeleaf btw) on the fly even though "auto build" is switched on in eclipse.
This forces me to stop the application in eclipse and re run the application for every small change i make and its very difficult.
Is this the only way on eclipse or is there a better way for eclipse would auto build the java and template files on the way so that I can code and debug simultaneously.
Eclipse is most likely compiling because that's what Eclipse does, but maybe you need to install the dev tools so that you get live reloading enabled.

Build tool for Scala web application development

While working with Scala frameworks such as Play! and Lift I was really amazed how these frameworks manage to create a full development stack from the source code up to the web application container (Jetty).
Right now I'm trying to configure a project on my own with the following features:
Automatic deployment on Tomcat 7 (I'm not using Jetty as I require JEE6 support)
WAR file packaging
Is it possible to do it with a build tool such as SBT or Maven?
Note: My goal is to create my own project structure, not using an existing framework (even though I'm taking some ideas from them).
There is a web plugin for SBT:
https://github.com/JamesEarlDouglas/xsbt-web-plugin
It gives you war packaging, but not automatic deployment (other than on Jetty, which it integrates, but which you don't have to use).
That said, I'd like to see a fork of that plugin that removes the Jetty dependency and adds an automatic external deployment option. Shouldn't be too hard to do.

Launching OSGi from IDEA

I develop scala application using IntelliJ IDEA. I'd like my application modules to be OSGi bundles.
In Eclipse it is possible to create a project which is both scala project and plug-in project. Eclipse also supports launching of Equinox platform and provides great configuration tool of which bundles to start and how. But I can't use Eclipse because of poor and slow scala plugin, so I need to use IntelliJ IDEA.
In IDEA I tried Osmorc for running OSGi but this solution is very immature and doesn't work well. What are the other ways of launching and configuring an OSGi application from IDEA?
Not an exact answer, but one possibility would be to:
set up a scala project with sbt and Intellij
use bnd4sbt (It enables you to create OSGi bundles for your SBT projects)
use scalamodules (a domain specific language for OSGi development)
(All thanks to the work of WeigleWilczek, including Heiko Seeberger who contributes here)
All the OSGi frameworks can be launched as standard Java processes. For example to launch Felix:
java -jar path/to/felix.jar
To launch Equinox:
java -jar path/to/org.eclipse.osgi_version.jar
And so on.
Unfortunately the initial configuration differs substantially between framework implementations. For Felix you need a config.properties file, which is typically in the conf directory of the Felix installation directory (or you can set the felix.config.properties system property to point it elsewhere).
I'm using PAX runner from inside Intellij IDEA to provision (deploy) OSGI bundles to Apache Felix and run the framework, but this is very annoying: I have to run "mvn install" first, then stop the running pax provisioning session, then restart it - for every change I make in the bundle. There got to be be a better way...