JetBrains IntelliJ IDEA integration

10 views
Skip to first unread message

Dorinel

unread,
Aug 25, 2009, 11:27:41 PM8/25/09
to Lift
I've managed to create simple scala projects in Intellij IDEA, but
when I try to import an existing lift pom.xml file I fail.
It seems that all the libraries from pom.xml are not added to the
project and all the lift classes used in project are marked as syntax
errors.
Have anybody managed to add pom.xml to IDEA?
Also is there a way to download necessary liftweb jars manually to add
them manually to the project as libraries?

Ilya Sergey

unread,
Aug 26, 2009, 4:42:33 AM8/26/09
to lif...@googlegroups.com
Hello.

Normally, there must be no problems, if you point to the existing pom.xml file as a project file (File -> New Project etc.). All libraries should be fetched form the repository automatically. What build of IDEA do you use?

Cheers,
Ilya

2009/8/26 Dorinel <dorinel....@gmail.com>

Indrajit Raychaudhuri

unread,
Aug 26, 2009, 5:43:24 AM8/26/09
to Lift
I have found generating IDEA project (*.ipr) and module (*.iml) files
with mvn idea:idea to be more consistent. It would take care of
downloading the required jars.
You can then proceed and open the project with IDEA. Newer versions
might ask if you want to move to new project format which you can
answer in affirmative.

To Jetbrain's credit, IDEA 9 (still in EAP) does better job of
handling pom.xml though.

Cheers, Indrajit

On Aug 26, 1:42 pm, Ilya Sergey <ilyas...@gmail.com> wrote:
> Hello.
>
> Normally, there must be no problems, if you point to the existing pom.xml
> file as a project file (File -> New Project etc.). All libraries should be
> fetched form the repository automatically. What build of IDEA do you use?
>
> Cheers,
> Ilya
>
> 2009/8/26 Dorinel <dorinel.munte...@gmail.com>

Dorinel

unread,
Aug 26, 2009, 7:18:10 AM8/26/09
to Lift
Hi, Ilya,
Thank you for quick answer.
Yesterday I've upgraded to 8.1.3 yesterday and had the same problem.
I'm running under ubuntu 8.10 and had to manually add mvn path to be
able to compile things with maven from idea, but the libraries are
still not in the project classpath, so the syntax highlighting for
scala is not working (it highlights missing lift libraries)
Will switching to EAP 9 version of idea help me?

On Aug 26, 11:42 am, Ilya Sergey <ilyas...@gmail.com> wrote:
> Hello.
>
> Normally, there must be no problems, if you point to the existing pom.xml
> file as a project file (File -> New Project etc.). All libraries should be
> fetched form the repository automatically. What build of IDEA do you use?
>
> Cheers,
> Ilya
>
> 2009/8/26 Dorinel <dorinel.munte...@gmail.com>

Michel Klijn

unread,
Aug 26, 2009, 9:39:58 AM8/26/09
to Lift
Hi Dorinel,

I had the same problem with Intellj 8.1.3 on mac osx.
In my case even though i had the Maven plugin installed, it wasn't
configured yet for some reason it never ask me to configure it.
As it turns out, the Maven settings are project specific. Configure
them like this:
File -> Template Settings -> search for maven -> click maven -> fill
out maven home dir, maven user settings, and maven repository.

To do the same for only one project go to settings instead of Template
Settings.

Dorinel

unread,
Aug 26, 2009, 8:58:32 AM8/26/09
to Lift
I've found the problem. I was running IDEA under root user (I needed
to debug an application on port allowed only to root some time ago,
and since then the start up script of idea was running under root
user) When I switched to normal user it was able to import pom.xml
file. Hope this help you to support for similar problems (I think
environment variables under root are different than under other users)
And sorry for disturbing you.

On Aug 26, 11:42 am, Ilya Sergey <ilyas...@gmail.com> wrote:
> Hello.
>
> Normally, there must be no problems, if you point to the existing pom.xml
> file as a project file (File -> New Project etc.). All libraries should be
> fetched form the repository automatically. What build of IDEA do you use?
>
> Cheers,
> Ilya
>
> 2009/8/26 Dorinel <dorinel.munte...@gmail.com>

Ilya Sergey

unread,
Aug 26, 2009, 8:43:16 AM8/26/09
to lif...@googlegroups.com
Hi, Dorinel.

Current Scala support in IDEA 9 is targeted to Scala 2.8 whereas lift uses Scala 2.7, so it would be better to stick with IDEA 8 for a while. There are several ways to adjust your project.
1. Create new project from an existing pom.xml file which seems to be not working for you.
2. Create appropriate project libraries manually, fulfill them with necessary jars, which is quite exhausting.
I would experiment with variant one. Could tell, when importing from pom.xml file goes wrong? Does idea create necessary libraries? When is it failing?

Cheers,
Ilya

2009/8/26 Dorinel <dorinel....@gmail.com>

Reply all
Reply to author
Forward
0 new messages