Community
Participate
Working Groups
The following discussion from the mailing list is worth a bug ticket. Expectation is this issue can be resolved with some research into scala project best practices. On observation of of java projects switching package structure (for example to org.locationtech.geomesa) mild alarm was raised on behalf of the geotrellis project written in scala Rob Emanuele: I'm not sure if the switch from the namespace being 'geomesa' to 'org.locationtech.geomesa' was due to a requirement, but I'm hoping not. I'm very against having to change the actual package namespace to 'org.locationtech.geotrellis' for GeoTrellis. Scala packages commonly have short names, ...
This may be a quick ticket, maven central provides pretty clear instructions on groupId based on domain name control. Nothing says the contents of the resulting jar have to follow java conventions - I expect they jar contents can be perfectly happen with shorter scala package names.
Most of the major scala packages don't follow the reverse URL package naming convention. The groupId however does follow the convention, and I think that we definitely need to follow that convention in order to fit in with the maven repository architecture. Here's some popular scala libraries that use the project-name-only approach to package naming: play spray akka dispatch scalaz spire shapeless argonaut monocle slick I believe having LocationTech and Eclipse scala projects following this naming convention will best serve the projects, as it allows them to follow conventions used in the Scala community, rather then seeming like Scala projects trying to fit a Java mold.
So if you are content Rob you can either mark this ticket as resolved, or wait until you actually publish close the issue at that time (i.e. when you know this approach works).
Found the following for reference: * http://docs.scala-lang.org/style/naming-conventions.html They do not seem to match with your expectations... ------ Scala packages should follow the Java package naming conventions: // wrong! package coolness // right! package com.novell.coolness // right, for package object com.novell.coolness package com.novell /** * Provides classes related to coolness */ package object coolness { } ------
I've created some sections in the "namespace" guidance document [1] and took a first crack at the group id. I'll try to edit this document as this develops; feel free to tweak what needs tweaking. [1] https://wiki.eclipse.org/Development_Resources/HOWTO/The_Eclipse_Code_Namespace_Policy
This is true. I'm not sure why the Scala style docs are so out of line with what the community is actually doing. You'd think that if that was the capital-S Standard for scala, on the site that TypeSafe maintains, then projects like Akka and Play, which are TypeSafe projects, would be packaged as com.typesafe.akka com.typesafe.play which they are certainly not. I'm not sure if this the style guide is intentionally trying to go against what the community is doing, or just trying to fit in with Java conventions while knowingly breaking them in their own projects, but this contradiction doesn't seem like it should make us in line with what someone put on a scala doc rather then what the community is actually doing. I'll post something on the scala-lang mailing list to see what their opinion is. (In reply to Jody Garnett from comment #4) > Found the following for reference: > > * http://docs.scala-lang.org/style/naming-conventions.html > > They do not seem to match with your expectations... > > ------ > Scala packages should follow the Java package naming conventions: > > // wrong! > package coolness > // right! > package com.novell.coolness > // right, for package object com.novell.coolness > package com.novell > /** > * Provides classes related to coolness > */ > package object coolness { > } > ------