How fix IntelliJ Idea plugin "missing package prefix" error?

1,557 views
Skip to first unread message

KajMagnus

unread,
Dec 27, 2012, 6:51:50 AM12/27/12
to simple-b...@googlegroups.com
Hi

I'm telling sbt-idea to generate IntelliJ Idea projects after having added new dependencies to my main project.
There's a sub project, debiki-dao-pgsql, that causes a "missing package prefix" (see below) error that I haven't experienced before.
Does anyone know what the problem might be?

(What package prefix is sbt-idea referring to? Here I found a perhaps related
but I don't have any  source directory entries in module XML files,  as far as I know)

Details below.

Best regards,
KajMagnus

PS. I hope this is the "correct" mailing list? I didn't find any mailing list here: https://github.com/mpeltonen/sbt-idea

sbt.version=0.12.1

[debiki-app-play] $ idea
[info] Trying to create an Idea module debiki-app-play
[info] Trying to create an Idea module debiki-dao-pgsql
[error] missing package prefix
[error] java.lang.IllegalArgumentException
[error] Use 'last' for the full log.
[debiki-app-play] $ last
[info] Trying to create an Idea module debiki-app-play
[debug] Running task... Cancelable: false, check cycles: false
[debug] Running task... Cancelable: false, check cycles: false
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: ))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@19bf8a6)
[debug]         Scala-Tools Maven2 Repository: http://scala-tools.org/repo-releases
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] post 1.3 ivy file: using exact as default matcher
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: com.debiki#debiki-core_2.10;0.0.2-SNAPSHOT))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@7d59869b)
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] post 1.3 ivy file: using exact as default matcher
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: com.debiki#debiki-core_2.10;0.0.2-SNAPSHOT, com.debiki#debiki-tck-dao_2.10;0.0.2-SNAPSHOT))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@59226733)
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] Running task... Cancelable: false, check cycles: false
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: ))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@68903261)
[debug]         Scala-Tools Maven2 Repository: http://scala-tools.org/repo-releases
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] post 1.3 ivy file: using exact as default matcher
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: com.debiki#debiki-core_2.10;0.0.2-SNAPSHOT))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@328f0c95)
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] post 1.3 ivy file: using exact as default matcher
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: com.debiki#debiki-core_2.10;0.0.2-SNAPSHOT, com.debiki#debiki-tck-dao_2.10;0.0.2-SNAPSHOT))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@3e98613b)
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] Running task... Cancelable: false, check cycles: false
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: ))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@728aed09)
[debug]         Scala-Tools Maven2 Repository: http://scala-tools.org/repo-releases
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] post 1.3 ivy file: using exact as default matcher
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: com.debiki#debiki-core_2.10;0.0.2-SNAPSHOT))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@23cd4638)
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] post 1.3 ivy file: using exact as default matcher
[debug] Other repositories:
[debug] Default repositories:
[debug]         Raw(ProjectResolver(inter-project, mapped: com.debiki#debiki-core_2.10;0.0.2-SNAPSHOT, com.debiki#debiki-tck-dao_2.10;0.0.2-SNAPSHOT))
[debug]         FileRepository(local,FileConfiguration(true,None),sbt.Patterns@114379f5)
[debug]         public: http://repo1.maven.org/maven2/
[debug] Using inline dependencies specified in Scala.
[debug] Running task... Cancelable: false, check cycles: false
[debug] Running task... Cancelable: false, check cycles: false
[debug] Running task... Cancelable: false, check cycles: false
[info] Trying to create an Idea module debiki-dao-pgsql
[debug] Running task... Cancelable: false, check cycles: false
[error] missing package prefix
java.lang.IllegalArgumentException
        at com.typesafe.sbtidea.SbtIdeaPlugin$.logErrorAndFail$1(SbtIdeaPlugin.scala:169)
        at com.typesafe.sbtidea.SbtIdeaPlugin$$anonfun$setting$1$1.apply(SbtIdeaPlugin.scala:174)
        at com.typesafe.sbtidea.SbtIdeaPlugin$$anonfun$setting$1$1.apply(SbtIdeaPlugin.scala:174)
        at scala.Option.getOrElse(Option.scala:108)
        at com.typesafe.sbtidea.SbtIdeaPlugin$.setting$1(SbtIdeaPlugin.scala:173)
        at com.typesafe.sbtidea.SbtIdeaPlugin$.projectData(SbtIdeaPlugin.scala:245)
        at com.typesafe.sbtidea.SbtIdeaPlugin$$anonfun$15.apply(SbtIdeaPlugin.scala:99)
        at com.typesafe.sbtidea.SbtIdeaPlugin$$anonfun$15.apply(SbtIdeaPlugin.scala:98)
        at scala.collection.TraversableLike$$anonfun$collect$1.apply(TraversableLike.scala:266)
        at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:178)
        at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:347)
        at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:347)
        at scala.collection.TraversableLike$class.collect(TraversableLike.scala:266)
        at scala.collection.immutable.HashMap.collect(HashMap.scala:38)
        at com.typesafe.sbtidea.SbtIdeaPlugin$.doCommand(SbtIdeaPlugin.scala:98)
        at com.typesafe.sbtidea.SbtIdeaPlugin$$anonfun$ideaCommand$2.apply(SbtIdeaPlugin.scala:53)
        at com.typesafe.sbtidea.SbtIdeaPlugin$$anonfun$ideaCommand$2.apply(SbtIdeaPlugin.scala:53)
        at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
        at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
        at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
        at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
        at sbt.Command$.process(Command.scala:90)
        at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
        at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
        at sbt.State$$anon$2.process(State.scala:170)
        at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
        at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.MainLoop$.next(MainLoop.scala:71)
        at sbt.MainLoop$.run(MainLoop.scala:64)
        at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
        at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
        at sbt.Using.apply(Using.scala:25)
        at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
        at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
        at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
        at sbt.MainLoop$.runLogged(MainLoop.scala:13)
        at sbt.xMain.run(Main.scala:26)
        at xsbt.boot.Launch$.run(Launch.scala:55)
        at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
        at xsbt.boot.Launch$.launch(Launch.scala:69)
        at xsbt.boot.Launch$.apply(Launch.scala:16)
        at xsbt.boot.Boot$.runImpl(Boot.scala:31)
        at xsbt.boot.Boot$.main(Boot.scala:20)
        at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.IllegalArgumentException
[error] Use 'last' for the full log.

KajMagnus

unread,
Dec 27, 2012, 9:52:47 AM12/27/12
to simple-b...@googlegroups.com
Hi again! Now everything works. I added this line:

ideaPackagePrefix := None

to `build.sbt` in my three *sub* projects (located in  modules/<subproject-name>/build.sbt ). But not to the main project.

(I downloaded the sbt-idea source code repo and searched for the "missing package prefix" error message, and eventually found out what to do.)

Weird config option :-)

Best regards, KajMagnus

Reply all
Reply to author
Forward
0 new messages