New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven: allow specifying a custom groupid/artifactid #6853

Closed
FroMage opened this Issue Jan 5, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@FroMage
Contributor

FroMage commented Jan 5, 2017

This is going to be tricky, but is required to be able to publish Ceylon modules in Maven Central.

For this, we need to be able to specify which group/artifact we belong to, in a more custom way than splitting on the last dot as we do ATM.

For example, the entire distrib in Maven Central has been published using the org.ceylon-lang groupId: https://mvnrepository.com/artifact/org.ceylon-lang

In order to support generating the right pom.xml I need to add some annotation in the language module to describe this on the module descriptor.

But I also probably need to build in somewhere an equivalence so that ceylon.language and maven:"org.ceylon-lang:ceylon.language" are seen as equivalent. I still have to think about this, and how it impacts compile/run-times.

@quintesse

This comment has been minimized.

Contributor

quintesse commented Jan 5, 2017

Perhaps something like an artifact annotation with a group attribute and an optional second prefix attribute? If you don't specify the prefix the entire module name will be used as the artifact name. So for our modules in Maven Central it would simply be:

artifact(group="org.ceylon-lang")

But for situations where you want to split the original module name in two you could do something like:

artifact(group="org.ceylon-lang", prefix="com.redhat.ceylon")

Which would have given us artifacts like org.ceylon-lang:common and org.ceylon-lang:module-resolver.

FroMage added a commit that referenced this issue Jan 13, 2017

FroMage added a commit that referenced this issue Jan 16, 2017

FroMage added a commit to eclipse/ceylon-ide-common that referenced this issue Jan 16, 2017

FroMage added a commit to eclipse/ceylon-ide-intellij that referenced this issue Jan 16, 2017

@gavinking

This comment has been minimized.

Contributor

gavinking commented Jan 17, 2017

Wait. Is org.ceylon-lang really a great group id? I would prefer one without dashes.

@quintesse

This comment has been minimized.

Contributor

quintesse commented Jan 17, 2017

It's what Julien has used for Maven Central since version 1.2.0. It's also what our top level domain is for the website.

@tombentley

This comment has been minimized.

Contributor

tombentley commented Jan 17, 2017

@FroMage

This comment has been minimized.

Contributor

FroMage commented Jan 23, 2017

Funny is that it's not legal as a groupId (see https://maven.apache.org/guides/mini/guide-naming-conventions.html) but it's obviously been accepted.

It does follow https://mvnrepository.com/artifact/org.scala-lang, though.

@gavinking

This comment has been minimized.

Contributor

gavinking commented Feb 9, 2017

See #6872.

@FroMage

This comment has been minimized.

Contributor

FroMage commented Feb 14, 2017

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment