Policy on package namespaces (internal and open source)? #145
Replies: 3 comments 3 replies
-
That's an interesting question. Java docs say it's up to you to resolve it. But if it's going to look like a real OSS project, it doesn't seem like you'd want to embed the company domain into the namespace identifier. You have a bit of an easier decision if you've created an "organization" for your open source projects (domain, website, other project infrastructure like chat channels, mailing lists, etc.) that is outside your company - then that should inform what naming to use. I can see where that's not always practical to have done, especially in the early stages... |
Beta Was this translation helpful? Give feedback.
-
You could go with a |
Beta Was this translation helpful? Give feedback.
-
Naming conventions on Maven Central resolve around two important identifiers: groupId and artifactId. So differentiation on the project-level is facilitated through the artifactId. So it seems to me that there is a choice to be made for the groupId. I like @jlprat suggestion of |
Beta Was this translation helpful? Give feedback.
-
We intend to publish packages of our open source projects to repositories like Maven Central. Especially in the Java world the namespaces in which packages reside is important. The most obvious namespace would be
com.company.project
like for instance Zalando does withorg.zalando
https://search.maven.org/search?q=g:org.zalando But at the moment already we have our internal packages that reside in this most obvious namespace.Ideally I'd like to separate the namespaces of the internal and external versions of the packages. Because even though they might have the same version, they can originate from different build infrastructure and be slightly different. Also naming conflicts can introduce issues with internal package repository mirrors.
What are typical ways organizations deal with this issue of namespacing? I thought of some options myself:
com.company.opensource.project
org.company.project
(org
instead ofcom
) orcom.companyopensource.project
(I see some like this search for open source on Maven Central)com.company.newprojectname
local.company.project
such that the public facing domain and namespace get cleared up for external usage.I very much like to know what kind of policy you have in place for package namespacing and how you would deal with existing practices.
Beta Was this translation helpful? Give feedback.
All reactions