-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Why does package naming violate Maven groupId? #97
Comments
You make it sound like a moral or legal issue. Lol. Maven groupid naming isn't a formal spec that can be "violated". It is a It is possible to have a package conflict. But dagger is an unusual name, Regards, On Nov 8, 2012, at 8:54, Werner Keil notifications@github.com wrote: While the POM contains a common groupId "com.squareup" and artifactId — |
We anticipate forks. Suppose Google's fork of dagger used |
Fascinating, so would com.google.dagger use exactly the same package?! |
@keilw yeah, the exact same package! Scary right? The upside is that forkers won't need to fork their dependencies and their dependencies' dependencies in order to change their internal imports from As I understand it smart tools like Maven make it easy to express concepts like |
Sure people did all kinds of strange things in Maven, remember those SpringSource OSGi-enabled Maven artifacts, which were repackaged into something like "com.springsource.org.apache.commons.logging";-D So while OSGi has means of telling Dagger 0.9 and 1.0 apart even if both were in the same classpath, Maven itself isn't smart enough to do so. |
The argument "we anticipate forks" for a simplistic namespace like As a "platform building guy" i like to spread the open for extension but Speaking of OSGi, using Attribute Matching, OSGii subsystems or Capability Toni Menzel | Founder | Rebaze GmbH On Thu, Nov 8, 2012 at 4:02 PM, Werner Keil notifications@github.comwrote:
|
+1 |
The decision to go with a nonconvential package name was not made lightly! We had a very conventional package name for Guice and lived to regret it. In particular:
I've seen few practical drawbacks of this approach. |
Fully agree. I just said its a nice angle that hasn't spread yet. I know Toni Menzel | Founder | Rebaze GmbH On Thu, Nov 8, 2012 at 4:42 PM, Jesse Wilson notifications@github.comwrote:
|
Yeah, beside trying to seem what it isn't (a "standard" like "java." or #javax." packages) it has the side-effect, that it hides which company is behind it, at least on a Java level. Whether intentional or not, I don't know, Bob though he doesn't seem involved in Dagger is (former) Spec Lead of 330 after he left Google, but unlike Guice JSRs are always supposed to be vendor-neutral. If some of you may keep maintaining these projects even after eventually leaving Square, let's see, at least Twitter in some cases seems a bit like a "Rotating Door" for developers;-) |
On 8 Nov 2012, at 11:05, Werner Keil wrote:
I am employed by Google and contributing to Dagger as part of my day Put another way - Square is putting dollars behind this in the form of This is beyond the scope of this conversation - de-jure vs. de-facto |
Thanks for the input, I know, some of it may even be worth more a blog or something. |
I know this issue has been put to rest for a while. But, It seems to me that it would have been preferable to just purchase us.dagger instead of violating the convention. Interesting discussion happening here as well https://www.reddit.com/r/java/comments/5sh96o/packaging_java_is_it_time_to_stop_beginning_with/ |
We won't be doing this. |
Wow after 4 1/2 years ;-) Thanks for feedback nevertheless. A few highly regarded projects like FitNesse also don't give a damn about the package name or artifactId. |
The groupId and artifactId follow convention which are much more important (as do all our single package name projects). |
If it's just an internal, project-specific package and library, I certainly agree. If it contains public API or SPI to be used by other projects or products that's a different story. |
While the POM contains a common groupId "com.squareup" and artifactId "dagger", the package name is simply "dagger".
This is highly uncommon and adds risk of package name or dependency clashes you'd avoid, if the package was properly named.
The text was updated successfully, but these errors were encountered: