Skip to content
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

The amp name for the repository extension amp could be changed #202

Closed
lcabaceira opened this issue Aug 5, 2014 · 7 comments
Closed

The amp name for the repository extension amp could be changed #202

lcabaceira opened this issue Aug 5, 2014 · 7 comments

Comments

@lcabaceira
Copy link

The name "amp" for the repository amp that comes with the all-in-one archetype is misleading.
You end up with a path that contains the word "amp" twice, the first one determines the type of the module(amp module) and the second the name of the module, that in this case is also amp.

src/main/amp/config/alfresco/module/amp

I suggest to use repository-extension to the module name.

@maoo
Copy link
Contributor

maoo commented Aug 5, 2014

Good catch. Still, I don't like the name repository-extension, since extension is a generic word that doesn't add any valuable information.

I'd propose repository-amp or repo-amp or acme-repo-amp

@rgauss
Copy link
Contributor

rgauss commented Aug 5, 2014

The name of that folder should of course match the name of the module itself, and we've been trying to standardize that name to be similar to a package name but with underscores, i.e. com_example_repo_somefunctionality.

@pmonks
Copy link

pmonks commented Aug 5, 2014

Agree with Ray, though there's no need for unusual conventions such as underscores; full stop characters work just fine in folder names - see for example: https://code.google.com/p/alfresco-bulk-filesystem-import/source/browse/?name=4x#hg%2Fsrc%2Fmain%2Famp%2Fconfig%2Falfresco%2Fmodule%2Forg.alfresco.extension.alfresco-bulk-filesystem-import

I don't know where this "full stops must be replaced with something else" belief started, but it's a fairly widespread misunderstanding.

@rgauss
Copy link
Contributor

rgauss commented Aug 5, 2014

I'm pretty sure I've encountered issues with full stops / periods somewhere, though I don't recall the particulars offhand, likely something to with classpath / package confusion. It may have been an issue that has since been fixed.

The documentation is inconsistent on the topic, with this page explicitly saying:

"The convention is to use a reverse domain name (with underscore as the separator)."

yet several other pages use periods as examples.

If we're certain there aren't any issues with periods in the module id / folder name let's go with that.

@pmonks
Copy link

pmonks commented Aug 5, 2014

Good find - that statement in the docs certainly won't be helping put this misconception to rest.

The only oddities I'm aware of are in Eclipse. IIRC it's not possible to create a dot-delimited folder or file in a source folder without Eclipse "exploding it". Certainly I've not encountered any issues with this in Alfresco in the time I've been developing AMPs.

@mindthegab
Copy link
Contributor

Peter,

The very old alfresco sdk versions would follow the broken "dotted" pattern.

The real issue (not anecdotal) is that breaks i18n loading (apart from potentially other classpath resources), because a "folder" with dots becomes an element of the package name / resource classpath uri. And dots are not valid characters for an 'element' of a package name / classpath folder. And while in fact it happened to work for classes, I ran soon into i18n troubles.

That's why from that moment on the sdk only uses ${artifactId} for the folder name and I suggest we leave it that way.

I am though open to better namespacing suggestions.

Sent from my iPhone

On Aug 5, 2014, at 2:13 PM, Peter Monks notifications@github.com wrote:

Good find - that statement in the docs certainly won't be helping put this misconception to rest.

The only oddities I'm aware of are in Eclipse. IIRC it's not possible to create a dot-delimited folder or file in a source folder without Eclipse "exploding it". Certainly I've not encountered any issues with this in Alfresco in the time I've been developing AMPs.


Reply to this email directly or view it on GitHub.

@mindthegab mindthegab added this to the Release-sdk-2.0.0 milestone Aug 21, 2014
@mindthegab
Copy link
Contributor

Now the all-in-one has two amp projects:

  • share-amp
  • repo-amp

So this issue can be closed. Feel free to open another one for the "classpath" folder where the module config should be created (slightly different issue to me)

@mindthegab mindthegab modified the milestones: 2.0.0-beta-1, 2.0.0-beta-3 Sep 9, 2014
@mindthegab mindthegab modified the milestones: 2.0.0-beta-4, 2.0.0 Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants