buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Trygve Kalleberg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BUILDR-338) For Scala project, Idea module has incorrect path to Scala library jar
Date Mon, 05 Jul 2010 10:28:49 GMT

    [ https://issues.apache.org/jira/browse/BUILDR-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885172#action_12885172
] 

Karl Trygve Kalleberg commented on BUILDR-338:
----------------------------------------------

Fortunately, this is trivial to fix.

In the file /var/lib/gems/1.8/gems/buildr-1.4.0/lib/buildr/ide/idea.rb,

The code around line 193 should rather read:

               # Libraries
                ext_libs = libs.map {|path| "$MODULE_DIR$/#{relative[path.to_s]}" } +
                    m2_libs.map { |path| path.to_s.sub(m2repo, "$M2_REPO$") }

I.e., by applying the relative[] lambda further up to all non-M2_REPO imports, the Scala libraries
will be imported correct, e.g.:

        <CLASSES>
          <root url="jar://$MODULE_DIR$/../../../../apps/scala-2.8.0-rc7/lib/scala-library.jar!/"/>
        </CLASSES>

I hope this trivial fix can make it into 1.4.1:)


> For Scala project, Idea module has incorrect path to Scala library jar 
> -----------------------------------------------------------------------
>
>                 Key: BUILDR-338
>                 URL: https://issues.apache.org/jira/browse/BUILDR-338
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.5
>            Reporter: Alex Eagle
>
> After running `buildr idea`, I get a module file that includes the scala-library.jar
and scala-compiler.jar. I didn't list those as dependencies of my project, but I do require
buildr/scala, so it makes sense that these are automatically added to the dependency list
internally in buildr in order to compile my project.
> But, in my resulting iml file, the dependencies look like this:
>    <orderEntry type="module-library">
>       <library>
>         <CLASSES>
>           <root url="jar://$MODULE_DIR$//Users/alexeagle/projects/scala-2.7.5.final/lib/scala-library.jar!/"
/
> >
>         </CLASSES>
>         <JAVADOC />
>         <SOURCES>
>           <root url="jar://$MODULE_DIR$//Users/alexeagle/projects/scala-2.7.5.final/lib/scala-library-sources.
> jar!/" />
>         </SOURCES>
>       </library>
>     </orderEntry>
>     <orderEntry type="module-library">
>       <library>
>         <CLASSES>
>           <root url="jar://$MODULE_DIR$//Users/alexeagle/projects/scala-2.7.5.final/lib/scala-compiler.jar!/"

> />
>         </CLASSES>
>         <JAVADOC />
>         <SOURCES>
>           <root url="jar://$MODULE_DIR$//Users/alexeagle/projects/scala-2.7.5.final/lib/scala-compiler-sources
> .jar!/" />
>         </SOURCES>
>       </library>
>     </orderEntry>
> They have an absolute path based on my $SCALA_HOME, but these are incorrectly getting
a prefix of $MODULE_DIR$.
> I'm marking it as major because I have to fix this manually every time I regenerate my
project from a buildfile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message