- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: SBT and Idea.
Wed, 2012-02-15, 09:09
On Wed, Feb 15, 2012 at 9:05 AM, Edmondo Porcu wrote:
> Dear all,
> I followed the instructions to create an sbt based project in IDEA.
> Everything works fine except that my src/main/ folder is not automatically
> considered by idea as a source folder, and the /src/test is not considered
> as a test folder. Should I manually set that every time I import the
> project in IDEA?
That should definitely work.
Could you publish a small project to demonstrate the problem so we can
take a look.
Include a transcript of your SBT session; the contents of the
generated .iml files; and the versions of SBT and sbt-idea that you're
using.
-jason
Wed, 2012-02-15, 09:31
#2
Re: SBT and Idea.
Hi Edmondo,
On Wed, Feb 15, 2012 at 9:05 AM, Edmondo Porcu wrote:
> Dear all,
> I followed the instructions to create an sbt based project in IDEA.
> Everything works fine except that my src/main/ folder is not automatically
> considered by idea as a source folder, and the /src/test is not considered
> as a test folder. Should I manually set that every time I import the
> project in IDEA?
No, shouldn't have to. I once had a similar problem, when the path to
the project contained (symbolic) links. Not sure what the exact
conditions of the problems were apart from that.
Wed, 2012-02-15, 10:01
#3
Fwd: SBT and Idea.
I am using 0.11.2 sbt, with sbt-idea 1.0.0 . This is what I see in my project.iml after running sbt gen-idea
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Global" />
<option name="compilerLibraryName" value="scala-compiler-2.9.1 (2)" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="scala-library-2.9.1 (2)" level="application" />
</component>
</module>
For some reason, when I right click on the source folder, my list is much shorter ( I can't add a Scala file, but only a scala Script for example) and in the UI the source folder doesn't appear blue as usual.
Thank you for your help
Best Regards
Edmondo
2012/2/15 Jason Zaugg <jzaugg@gmail.com>
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Global" />
<option name="compilerLibraryName" value="scala-compiler-2.9.1 (2)" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="scala-library-2.9.1 (2)" level="application" />
</component>
</module>
For some reason, when I right click on the source folder, my list is much shorter ( I can't add a Scala file, but only a scala Script for example) and in the UI the source folder doesn't appear blue as usual.
Thank you for your help
Best Regards
Edmondo
2012/2/15 Jason Zaugg <jzaugg@gmail.com>
On Wed, Feb 15, 2012 at 9:05 AM, Edmondo Porcu <edmondo.porcu@gmail.com> wrote:
> Dear all,
> I followed the instructions to create an sbt based project in IDEA.
> Everything works fine except that my src/main/ folder is not automatically
> considered by idea as a source folder, and the /src/test is not considered
> as a test folder. Should I manually set that every time I import the
> project in IDEA?
That should definitely work.
Could you publish a small project to demonstrate the problem so we can
take a look.
Include a transcript of your SBT session; the contents of the
generated .iml files; and the versions of SBT and sbt-idea that you're
using.
-jason
Wed, 2012-02-15, 10:11
#4
Re: SBT and Idea.
This is what I see when launching my sbt
[info] Loading project definition from C:\Users\porcu.GOTTEXBROKERS\Documents\Projects\springextension\project
[info] Set current project to springextension (in build file:/C:/Users/porcu.GOTTEXBROKERS/Documents/Projects/springextension/)
> show compile:unmanaged-source-directories
[info] List(C:\Users\porcu.GOTTEXBROKERS\Documents\Projects\springextension\src\main\scala, C:\Users\porcu.GOTTEXBROKERS\Documents\Projects\springextension\src\main\java)
>
Thank you very much
Best Regards
Edmondo
2012/2/15 Edmondo Porcu <edmondo.porcu@gmail.com>
[info] Loading project definition from C:\Users\porcu.GOTTEXBROKERS\Documents\Projects\springextension\project
[info] Set current project to springextension (in build file:/C:/Users/porcu.GOTTEXBROKERS/Documents/Projects/springextension/)
> show compile:unmanaged-source-directories
[info] List(C:\Users\porcu.GOTTEXBROKERS\Documents\Projects\springextension\src\main\scala, C:\Users\porcu.GOTTEXBROKERS\Documents\Projects\springextension\src\main\java)
>
Thank you very much
Best Regards
Edmondo
2012/2/15 Edmondo Porcu <edmondo.porcu@gmail.com>
I am using 0.11.2 sbt, with sbt-idea 1.0.0 . This is what I see in my project.iml after running sbt gen-idea
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Global" />
<option name="compilerLibraryName" value="scala-compiler-2.9.1 (2)" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="scala-library-2.9.1 (2)" level="application" />
</component>
</module>
For some reason, when I right click on the source folder, my list is much shorter ( I can't add a Scala file, but only a scala Script for example) and in the UI the source folder doesn't appear blue as usual.
Thank you for your help
Best Regards
Edmondo
2012/2/15 Jason Zaugg <jzaugg@gmail.com>
On Wed, Feb 15, 2012 at 9:05 AM, Edmondo Porcu <edmondo.porcu@gmail.com> wrote:
> Dear all,
> I followed the instructions to create an sbt based project in IDEA.
> Everything works fine except that my src/main/ folder is not automatically
> considered by idea as a source folder, and the /src/test is not considered
> as a test folder. Should I manually set that every time I import the
> project in IDEA?
That should definitely work.
Could you publish a small project to demonstrate the problem so we can
take a look.
Include a transcript of your SBT session; the contents of the
generated .iml files; and the versions of SBT and sbt-idea that you're
using.
-jason
Wed, 2012-02-15, 10:51
#5
Re: SBT and Idea.
On Wed, Feb 15, 2012 at 10:35 AM, Edmondo Porcu wrote:
> Dear Jason,
> that's probably the source of the problem.
>
> I created a project in idea to obtain the right project structure. I added a
> build.sbt, then sbt-idea to project/plugins.sbt, then I run sbt gen-idea.
> This doesn't work apparently...do you have an easiest way to create a sbt
> project with all the necessary folder structure?
>
> Thank you very much
>
> Edmondo
https://github.com/softprops/np
-jason
I followed the instructions to create an sbt based project in IDEA. Everything works fine except that my src/main/ folder is not automatically considered by idea as a source folder, and the /src/test is not considered as a test folder. Should I manually set that every time I import the project in IDEA?
Thank you very much for your support
Edmondo Porcu