Scala infrastructure in plugins SDK


I am an Scala enthusiast; I must to admit it :) ! It allows me writing clear and concise code having all the advantages of an extremely powerful type system, functional and object paradigms  among another such things.
But this is not a blog post introducing Scala benefits (you can see a very quick intro to the language but talking about including it in the Plugins SDK so we can use it to develop our new portlets based on Scala.
This is a very quick overview on what you can do with the ongoing work ( I need to make some minor hacking but I hope to be pushing it to master during this week (if the child allows me to do it). Let's get started:
  • You can create a new Scala based portlet by executing the create script: portlet_name porlet_display scala
  • The previous command line execution will create a basic infrastructure with all the artifacts we need: a build.xml file, all the Scala library needed and a simple portlet class.
  • Using the previous build.xml file we can compile Scala code, Java code, use scalac (the single one compiler and the daemon) and make our deployments. This infrastructure will take care of the mixed compilation process if you are using both Java and Scala as your development languages for your new portlet.

I have some more work to do, like including a command in order to allow updating the Scala libraries with a specific version or generating IDE files in an automatic way. The current version is working fine but I hope to improve during this weekend and push it to master.

Short entry; hopefully I will write a more detailed one with some more news: I am working on building an Scala wrapper on top of the Liferay API . . . so stay tunned!! 

Hope you like it!


Great work! I haven't used Scala yet, but I've had a few people in training ask about our support. I'll be sure to point them to this post.
Any plans to also provide a scala portlet archetype in the liferay-maven-plugin project?
Not for the moment (at least for me emoticon )
pretty cool
[...] Liferay is Java-based, but you don't have to be a Java expert to use it or create websites with it. In fact, suppose you are a Scala expert? Miguel demonstrates that even Scala fits into the Liferay... [...] Read More
Great! I'm enjoying learning some Scala and I'd like to have some hands-on with that language developing some portlets. Good work!
Any recent updates on where we are with scala? Will it be added as an option to LDS?
the code is very old, is this reported as a feature in liferay issues? I'd like to see this in the main SDK.

github status: "This branch is 7 commits ahead and 3502 commits behind master".
I did a quick announcement here

We are doing a refactor of the SDK so I haven't pushed it yet but I hope it will be available in the near future.

I will rebase my changes in top of the latest commits of the master branch and update my Github repo
I am just getting into Scala , love it ! For maven users, any plans for a liferay-portlet-scala-archetype ?