buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Donald (JIRA)" <>
Subject [jira] [Commented] (BUILDR-696) "buildr idea" should leave the existing project files alone if they exist
Date Thu, 05 Jun 2014 00:38:01 GMT


Peter Donald commented on BUILDR-696:

Hi, Sorry that the idea extension does not meet your needs. Lets see if we can make it do
what you need.

In terms of misconfiguring the project SDK, we do not experience that here. The idea extension
derives the project sdk version from either what you explicitly set it to (i.e. project.ipr.jdk_version
= "1.7" or project.ipr.jdk_version = "1.7") or the source language version as specified in
buildfile (i.e. compile.options.source = "1.7"). And it should correctly create the jdk version
from that. If that is not working for you could you attach a simple example where this is

The reason that all the SDK modules are specified is because IDEA will detect when you are
using certain ruby switchers (i.e. rbenv) and can override the root project sdk from that.
So some users used to end up with a "rbenv: jruby-1.7.2" as the project SDK which would break
all their modules. If we can fix the misconfiguring the project SDK issue do you see this
as an ongoing issue?

The idea extension while default will merge in configurations it manages (ie module lists,
dependencies etc) to any project file on the file system so anything you have not configured
via buildr should be maintained. Unfortunately idea:clean will still delete the existing projects.
So what many people do is copy their existing project file with the settings they want to
keep to a separate location and use it as a template (i.e. ipr.template = 'tasks/project.ipr.xml')
and that way you get the best of both worlds. You get to keep the settings that buildr does
not manage but can still rebuild the project on a whim.

If those things don't help you maybe we can figure out something that does.

I am just leaving for a couple of weeks holiday but hopefully we can continue this conversation
when I get back.

> "buildr idea" should leave the existing project files alone if they exist
> -------------------------------------------------------------------------
>                 Key: BUILDR-696
>                 URL:
>             Project: Buildr
>          Issue Type: Improvement
>          Components: IDE
>         Environment: buildr 1.4.17
>            Reporter: Trejkaz
>              Labels: idea
> If I run "buildr idea", buildr clobbers a lot of existing project files.
> This is undesirable because:
> * My project contains a lot of configuration like code style, copyright notices and code
inspections which I would rather keep.
> * It sets the project SDK to a version ("7") which doesn't follow IDEA's default naming
scheme ("1.7") - so I have to rename it back every time.
> * It sets the SDK for all modules explicitly, though it would be better if it left that
as the default project SDK for any modules which are the same (which is surely the case for
most projects.) Since it does set it explicitly, I have to rename all the modules SDKs back
> It's also a bit dated that it is generating the single .ipr file. I think it should be
using the newer .idea directory format, which also makes it easier to have it modify only
the files where it should know better (modules.xml and the .iml files.)

This message was sent by Atlassian JIRA

View raw message