On Saturday, March 24, 2018 at 10:30:10 AM UTC+1, Mincong Huang wrote: > > Hi, > > I'd like to have a clarification about the naming convention for ported > GWT modules. Because I'm porting the module `gwt-safecss` and > `gwt-animation`. When I go to Vertispan repository [1], the available > modules do not use the same rule for the group ID and artifact ID. This is > a pain when you reference them as dependencies. Here're 5 rules that I > found. >
This is a subject we briefly discussed last week in our steering committee meeting, acknowledging the issue. > *Rule 1:* > Use "org.gwtproject" + module name as group id; module name with "gwt-" > prefix as artifact id. This rule is used by `gwt-http`: > > GROUP_ID: org.gwtproject.$MODULE > ARTIFACT_ID: gwt-$MODULE > > *Rule 2:* > Use "org.gwtproject" + module name as group id; module name without "gwt-" > prefix as artifact id. This rule is used by `gwt-event`, `gwt-place`, > `gwt-safehtml`, `gwt-storage`, `gwt-timer`: > > GROUP_ID: org.gwtproject.$MODULE > ARTIFACT_ID: $MODULE > gwt-events actually falls in rule 1. > *Rule 3:* > Use "org.gwtproject" as group id; module name with "gwt-" prefix as > artifact id. This rule is used by `gwt-xhr`: > > GROUP_ID: org.gwtproject > ARTIFACT_ID: gwt-$MODULE > > *Rule 4:* > Use "org.gwtproject" as group id; module name without "gwt-" prefix as > artifact id. This rule is used by `gwt-json`, `gwt-typedarrays`, `gwt-xml`, > `gwt-xhr`: > > GROUP_ID: org.gwtproject > ARTIFACT_ID: $MODULE > > *Rule 5:* > Other rules: `gwt-window`, `gwt-history`. > Those fall (almost) in rule 1, with an additional "user" in groupId: org.gwtproject.user.$MODULE:gwt-$MODULE > I suggest we apply rule 4 to all the modules. It means always using > "org.gwtproject` as group id, and use `gwt-` + module name as artifact id. > There're several benefits. It helps people to find all the artifacts via > the same group id. It also keeps consistency for the generated JAR files: > each of them contains a "gwt-" prefix, thus they are GWT artifacts. > My rule of thumb was to use a "subgroup" of "org.gwtproject" when there was several artifacts, as can be seen in gwt-events and gwt-places. For other cases, I'm always hesitating between bare "org.gwtproject" and a subgroup. Fwiw, we settled on always using a subgroup (IIRC; Colin, please correct me if I misremember). This means rule 1 or 2 rather than 3 or 4. And I would tend to agree with using a "gwt-" prefix for artifact IDs, though if you read the artifact name as being groupId+artifactId, then that prefix would be redundant with the "org.gwtproject" prefix of the groupId. Compare, for example - org.gwtproject:http vs org.gwtproject:gwt-http vs org.gwtproject.http:http vs org.gwtproject.http:gwt-http - org.gwtproject:logical-event vs org.gwtproject:gwt-logical-event vs org.gwtproject.event:logical vs org.gwtproject.event:logical-event vs org.gwtproject.event.gwt-logical-event (this goes with "event" and "compat" artifacts) -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/ac6913ab-7240-4fcb-8d5b-4a48085089b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
