Reputation: 2702
First of all, i'm not familiar with Java. I have done some small projects, but never did anything with Play.
I'm using Windows 8.1.
I created a project using activator new prj
and then tried to import it into IntelliJ, using its built-in functionality.
When it finally tries to import, it gives me this stack trace:
Error:Error while importing SBT project:
...
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at sbt.Classpaths$.appRepositories(Defaults.scala:1524)
at sbt.Classpaths$$anonfun$40.apply(Defaults.scala:1040)
at sbt.Classpaths$$anonfun$40.apply(Defaults.scala:1040)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:177)
at sbt.EvaluateSettings$INode.evaluate(INode.scala:135)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:67)
at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:76)
at sbt.EvaluateSettings$$anon$3.run(INode.scala:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[error] java.net.URISyntaxException: Illegal character in authority at index 7: file://${activator.home}/repository
[error] Use 'last' for the full log.
See complete log in C:\Users\Ricardo\AppData\Local\Temp\sbt13.log
Yeah, the error seems pretty obvious: Illegal character in authority at index 7: file://${activator.home}/repository
, because ${activator.home}
is, of course, invalid syntax in a path.
Well, ${activator.home}
looks like a variable. So I may be missing something here. Do I need to set this variable somewhere? How do I do that? In my system variables?
I don't think I should set variables, because I have done this before (creating a project and successfully import it in IntelliJ).
If this is not the problem, how could I possibly solve it?
Upvotes: 3
Views: 1852
Reputation: 416
I had the same problem. Mine seemed to be the space in the user directory name. I took out ${user.home} and replaced it with a hardcoded directory name using the short 8.3 directory name with no spaces (found by DIR /X). Not pretty but it works.
So, in c:\Users\.sbt\repositories, I replaced the line:
activator-launcher-local: file:////${activator.local.repository-${activator.home-${user.home}/.activator}/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
with
activator-launcher-local: file:////${activator.local.repository-${activator.home-C:/Users/BRUCEC~1/.activator}/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
Replace BRUCEC~1 with your shortened user name (unless your name is Bruce C ;} )
Upvotes: 0
Reputation: 1
file://${activator.home}/repository
you mentioned that should be replaced with
file:///${activator.home}/repository
in Windows platform.
In Windows, the file:///
is legal rather than file://
. So, you must modify the 'repositories' file in c:\users\[YourName]\.sbt\ director
, all file://
words should be replaced to file:///
.
It should work since I have the same problem before, and I have fixed it with the above changing. Good luck.
Upvotes: 0
Reputation: 104
I have the same problem. @codegasmer is right, try to do "activator idea" and then "open" the project.
It seems to work, until they fix it.
If you're using activator 1.3 make sure you edit project/build.properties for sbt 0.13.7
Upvotes: 6