[xwiki-devs] [contrib] Automated tests and changing module IDs
Hi, I want to write automated tests for some contrib applications, but I need you help on some questions. == Prb 1. Folder Structure + Changing IDs == Currently the majority of applications don't have modules. Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId. When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas) Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID. Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources == Prb 2. Naming standards == We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId. Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ? Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules? Thanks, Caty
Hi Caty and devs, We could not change the name of the package and only encapsulate it in a parent POM ('application-forum-package' or 'application-forum-extension' or something else) like the following. application-forum-package/ + pom.xml + application-forum/ | + pom.xml | + src/ + application-forum-test/ | + pom.xml | + application-forum-test-pageobjects/ | | + pom.xml | | + src/ | + application-forum-test-tests/ | | + pom.xml | | + src/ What do you think? Of course, it doesn't solve the problem of homogenization of application's names. On 18/03/2015 19:28, Ecaterina Moraru (Valica) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
Thanks, Caty _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
On Wed, Mar 18, 2015 at 11:11 PM, Jean SIMARD <[email protected]> wrote:
Hi Caty and devs,
We could not change the name of the package and only encapsulate it in a parent POM ('application-forum-package' or 'application-forum-extension' or something else) like the following.
and why not more explicitly application-forum-parent :) I done so for the farm-tools application, and found this not that bad, since this package is never shown or installed, it is just a parent for building after all.
application-forum-package/ + pom.xml + application-forum/ | + pom.xml | + src/ + application-forum-test/ | + pom.xml | + application-forum-test-pageobjects/ | | + pom.xml | | + src/ | + application-forum-test-tests/ | | + pom.xml | | + src/
What do you think? Of course, it doesn't solve the problem of homogenization of application's names.
On 18/03/2015 19:28, Ecaterina Moraru (Valica) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
Thanks, Caty _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
Hi Denis, On 19 Mar 2015 at 08:53:40, Denis Gervalle ([email protected](mailto:[email protected])) wrote:
On Wed, Mar 18, 2015 at 11:11 PM, Jean SIMARD wrote:
Hi Caty and devs,
We could not change the name of the package and only encapsulate it in a parent POM ('application-forum-package' or 'application-forum-extension' or something else) like the following.
and why not more explicitly application-forum-parent :) I done so for the farm-tools application, and found this not that bad, since this package is never shown or installed, it is just a parent for building after all.
Sorry but I’m -1 to that because: * 99% of our modules already follow the convention of using: xwiki-platform-faq |_ xwiki-platform-faq-ui |_ xwiki-platform-faq-test * It’s already been agreed, see http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes... I prefer to fix 1% of modules to get homogeneity than change 99% of others or to have 2 rules. Now I’d love that we start discussing what we can do to offer better relocation. Even if we had what you propose we would still need to move stuff around (like move from platform to contrib later on), so we won’t escape having the need to improve our relocation mechanism for finding upgrades. Thanks -Vincent
application-forum-package/ + pom.xml + application-forum/ | + pom.xml | + src/ + application-forum-test/ | + pom.xml | + application-forum-test-pageobjects/ | | + pom.xml | | + src/ | + application-forum-test-tests/ | | + pom.xml | | + src/
What do you think? Of course, it doesn't solve the problem of homogenization of application's names.
On 18/03/2015 19:28, Ecaterina Moraru (Valica) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
Thanks, Caty _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Caty, See below. On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id? The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib.<shortprojetname>.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example: xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors. Thanks -Vincent
Hi Vincent, I'd like to have more precision on the "relocation" you're talking about. For example, we have this at the moment + application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar] We'd like to transform the hierarchy of Maven modules/submodules into the following structure + application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/ But now, I'm looking at relocation guide on Maven https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a... and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following? + application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content) pom.xml ----- <project> <modelVersion>4.0.0</modelVersion> <groupId>org.xwiki.contrib.forum</groupId> <artifactId>application-forum</artifactId> <version>1.9.3</version> <distributionManagement> <relocation> <artifactId>application-forum-ui</artifactId> </relocation> </distributionManagement> </project> ----- Thanks, On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib.<shortprojetname>.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id. On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD <[email protected]> wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml ----- <project> <modelVersion>4.0.0</modelVersion> <groupId>org.xwiki.contrib.forum</groupId> <artifactId>application-forum</artifactId> <version>1.9.3</version> <distributionManagement> <relocation> <artifactId>application-forum-ui</artifactId> </relocation> </distributionManagement> </project> -----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib.<shortprojetname>.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file? Sincerely, On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD <[email protected]> wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml ----- <project> <modelVersion>4.0.0</modelVersion> <groupId>org.xwiki.contrib.forum</groupId> <artifactId>application-forum</artifactId> <version>1.9.3</version> <distributionManagement> <relocation> <artifactId>application-forum-ui</artifactId> </relocation> </distributionManagement> </project> -----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib.<shortprojetname>.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
Hi Jean, On 19 Mar 2015 at 10:46:22, Jean SIMARD ([email protected](mailto:[email protected])) wrote:
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file?
Yes I wasn’t talking about Maven Relocation but about XWiki’s EM relocation (aka alias or extension features). This is how to indicate a relocation in our pom.xml: <properties> <xwiki.extension.features> <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions --> org.xwiki.platform:xwiki-platform-workspace-template-features </xwiki.extension.features> </properties> Thanks -Vincent PS: Side note: I’ve never understood why Thomas decided to use the “features” terminology for relocation. Maybe you can explain what you had in mind Thomas? :)
Sincerely,
On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml -----
4.0.0 org.xwiki.contrib.forum application-forum 1.9.3
application-forum-ui
-----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib..
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
OK, thank you for the precision. Just one last question on this topic: is this relocation will cause any problem since the module [application-forum] we are moving into a submodule [application-forum-ui] will still exists (because [application-forum] will be now the parent POM, not the XAR anymore). Another way of saying it, we transform the original XAR groupId/artifactId into a POM (and the sources of the XAR are moved into another groupId/artifactId). Thanks, On 19/03/2015 10:54, [email protected] wrote:
Hi Jean,
On 19 Mar 2015 at 10:46:22, Jean SIMARD ([email protected](mailto:[email protected])) wrote:
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file?
Yes I wasn’t talking about Maven Relocation but about XWiki’s EM relocation (aka alias or extension features).
This is how to indicate a relocation in our pom.xml:
<properties> <xwiki.extension.features> <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions --> org.xwiki.platform:xwiki-platform-workspace-template-features </xwiki.extension.features> </properties>
Thanks -Vincent
PS: Side note: I’ve never understood why Thomas decided to use the “features” terminology for relocation. Maybe you can explain what you had in mind Thomas? :)
Sincerely,
On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml -----
4.0.0 org.xwiki.contrib.forum application-forum 1.9.3
application-forum-ui
-----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib..
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
Technically it should not cause any issue. The only think I can think of is some people expecting this id to be a XAR and trying to installi it. On Thu, Mar 19, 2015 at 11:15 AM, Jean SIMARD <[email protected]> wrote:
OK, thank you for the precision. Just one last question on this topic: is this relocation will cause any problem since the module [application-forum] we are moving into a submodule [application-forum-ui] will still exists (because [application-forum] will be now the parent POM, not the XAR anymore). Another way of saying it, we transform the original XAR groupId/artifactId into a POM (and the sources of the XAR are moved into another groupId/artifactId).
Thanks,
On 19/03/2015 10:54, [email protected] wrote:
Hi Jean,
On 19 Mar 2015 at 10:46:22, Jean SIMARD ([email protected](mailto:[email protected])) wrote:
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file?
Yes I wasn’t talking about Maven Relocation but about XWiki’s EM relocation (aka alias or extension features).
This is how to indicate a relocation in our pom.xml:
<properties> <xwiki.extension.features> <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions --> org.xwiki.platform:xwiki-platform-workspace-template-features </xwiki.extension.features> </properties>
Thanks -Vincent
PS: Side note: I’ve never understood why Thomas decided to use the “features” terminology for relocation. Maybe you can explain what you had in mind Thomas? :)
Sincerely,
On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml -----
4.0.0 org.xwiki.contrib.forum application-forum 1.9.3
application-forum-ui
-----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
> Hi, > > I want to write automated tests for some contrib applications, but I need > you help on some questions. > > == Prb 1. Folder Structure + Changing IDs == > > Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
> Also some applications have IDs that don't correspond with the contrib > standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes > random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib..
> When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told > that we should change it only if we have a very good reason, otherwise > changing the ID will resolve in upgrading problems within the Extension > Manager. Unfortunately I don't remember exactly the problem with the > changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
> Example: https://github.com/xwiki-contrib/application-forum > Theoretically, wanting to add tests I would need to create two modules: > - application-forum-test > - application-forum-ui, and move the current sources here. > Unfortunately this means a change in the ID. > > Are 'adding tests' a good reason to change the ID? > Should I not change the ID, and just add a test module? > - application-forum-test > - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
> == Prb 2. Naming standards == > > We have some conventions on contrib.xwiki.org about name of the project. > We should add maybe some more examples on groupId and artifactId. > > Also when looking at the test modules names, some applications have: > - {{full-repository-name}}-tests > - {{full-repository-name}}-test > - {{partial-repository-name}}-test > - {{random-repository-name}}-test > - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
> Maybe we should agree also on this and document it. > I guess the correct name would be: > - {{full-repository-name}}-test > -- {{full-repository-name}}-test-pageobjects > -- {{full-repository-name}}-test-tests > - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
> Also if we are 'discovering' some applications that don't correspond to the > standard, do we change them or do we let them be? Since changing means a > change in the ID :P
I’d say we change them.
> Since in theory we should have automated tests for all our applications, > should we add a convention to always create a > - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
> Additional question: Also when we will transfer from platform to contrib, > are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
OK, cool. Thanks to everyone. On 19/03/2015 11:17, Thomas Mortagne wrote:
Technically it should not cause any issue. The only think I can think of is some people expecting this id to be a XAR and trying to installi it.
On Thu, Mar 19, 2015 at 11:15 AM, Jean SIMARD <[email protected]> wrote:
OK, thank you for the precision. Just one last question on this topic: is this relocation will cause any problem since the module [application-forum] we are moving into a submodule [application-forum-ui] will still exists (because [application-forum] will be now the parent POM, not the XAR anymore). Another way of saying it, we transform the original XAR groupId/artifactId into a POM (and the sources of the XAR are moved into another groupId/artifactId).
Thanks,
On 19/03/2015 10:54, [email protected] wrote:
Hi Jean,
On 19 Mar 2015 at 10:46:22, Jean SIMARD ([email protected](mailto:[email protected])) wrote:
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file?
Yes I wasn’t talking about Maven Relocation but about XWiki’s EM relocation (aka alias or extension features).
This is how to indicate a relocation in our pom.xml:
<properties> <xwiki.extension.features> <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions --> org.xwiki.platform:xwiki-platform-workspace-template-features </xwiki.extension.features> </properties>
Thanks -Vincent
PS: Side note: I’ve never understood why Thomas decided to use the “features” terminology for relocation. Maybe you can explain what you had in mind Thomas? :)
Sincerely,
On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml -----
4.0.0 org.xwiki.contrib.forum application-forum 1.9.3
application-forum-ui
-----
Thanks,
On 19/03/2015 09:08, [email protected] wrote: > Hi Caty, > > See below. > > On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote: > >> Hi, >> >> I want to write automated tests for some contrib applications, but I need >> you help on some questions. >> >> == Prb 1. Folder Structure + Changing IDs == >> >> Currently the majority of applications don't have modules. > > You mean submodules I guess since they’re a module (maven module) themselves. > >> Also some applications have IDs that don't correspond with the contrib >> standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes >> random artifactId. > > Why would ‘org.xwiki.contrib.forum’ be a wrong group id? > > The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib.. > >> When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told >> that we should change it only if we have a very good reason, otherwise >> changing the ID will resolve in upgrading problems within the Extension >> Manager. Unfortunately I don't remember exactly the problem with the >> changing of the ID, I just know I don't need to do it :) (//sorry Thomas) > > We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though). > >> Example: https://github.com/xwiki-contrib/application-forum >> Theoretically, wanting to add tests I would need to create two modules: >> - application-forum-test >> - application-forum-ui, and move the current sources here. >> Unfortunately this means a change in the ID. >> >> Are 'adding tests' a good reason to change the ID? >> Should I not change the ID, and just add a test module? >> - application-forum-test >> - src/main/resources > > I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules. > >> == Prb 2. Naming standards == >> >> We have some conventions on contrib.xwiki.org about name of the project. >> We should add maybe some more examples on groupId and artifactId. >> >> Also when looking at the test modules names, some applications have: >> - {{full-repository-name}}-tests >> - {{full-repository-name}}-test >> - {{partial-repository-name}}-test >> - {{random-repository-name}}-test >> - test > > Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example: > > xwiki-platform-faq-test/ > |_ xwiki-platform-faq-test-tests/ > |_ … > >> Maybe we should agree also on this and document it. >> I guess the correct name would be: >> - {{full-repository-name}}-test >> -- {{full-repository-name}}-test-pageobjects >> -- {{full-repository-name}}-test-tests >> - {{full-repository-name}}-ui > > Yes. Some conventions are already documented here: > http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes... > >> Also if we are 'discovering' some applications that don't correspond to the >> standard, do we change them or do we let them be? Since changing means a >> change in the ID :P > > I’d say we change them. > >> Since in theory we should have automated tests for all our applications, >> should we add a convention to always create a >> - {{full-repository-name}}-ui ? > > Yes. This is what I do when I create a new "top level" module. > >> Additional question: Also when we will transfer from platform to contrib, >> are we going to rename the modules? > > I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors. > > Thanks > -Vincent >
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
On Thu, Mar 19, 2015 at 11:54 AM, [email protected] <[email protected]> wrote:
Hi Jean,
On 19 Mar 2015 at 10:46:22, Jean SIMARD ([email protected](mailto:[email protected])) wrote:
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file?
Yes I wasn’t talking about Maven Relocation but about XWiki’s EM relocation (aka alias or extension features).
This is how to indicate a relocation in our pom.xml:
<properties> <xwiki.extension.features> <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions --> org.xwiki.platform:xwiki-platform-workspace-template-features </xwiki.extension.features> </properties>
Thanks -Vincent
PS: Side note: I’ve never understood why Thomas decided to use the “features” terminology for relocation. Maybe you can explain what you had in mind Thomas? :)
It's not used just for relocation. We use it whenever we want to specify that an extension X bundles another extension Y, or that X provides the features of extension Y, or simply put: X features Y.
From https://www.google.com/?#q=define:feature "the hotel features a large lounge, a sauna, and a coin-operated solarium".
Thanks, Marius
Sincerely,
On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml -----
4.0.0 org.xwiki.contrib.forum application-forum 1.9.3
application-forum-ui
-----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib..
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Tue, Mar 24, 2015 at 5:59 PM, Marius Dumitru Florea <[email protected]> wrote:
On Thu, Mar 19, 2015 at 11:54 AM, [email protected] <[email protected]> wrote:
Hi Jean,
On 19 Mar 2015 at 10:46:22, Jean SIMARD ([email protected](mailto:[email protected])) wrote:
OK, but if we don't keep track of the relocation of groupId/artifactId, I wonder how you will be able to manage the upgrade (since it seems it is a topic you and Vincent are interested in). Am I missing something? Should I put this information in another way somewhere in the root POM or in another file?
Yes I wasn’t talking about Maven Relocation but about XWiki’s EM relocation (aka alias or extension features).
This is how to indicate a relocation in our pom.xml:
<properties> <xwiki.extension.features> <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions --> org.xwiki.platform:xwiki-platform-workspace-template-features </xwiki.extension.features> </properties>
Thanks -Vincent
PS: Side note: I’ve never understood why Thomas decided to use the “features” terminology for relocation. Maybe you can explain what you had in mind Thomas? :)
It's not used just for relocation. We use it whenever we want to specify that an extension X bundles another extension Y, or that X provides the features of extension Y, or simply put: X features Y. From https://www.google.com/?#q=define:feature "the hotel features a large lounge, a sauna, and a coin-operated solarium".
Exactly. The initial idea was to allow any extension to indicate a list of supported features (being the id of another extension or a totally "virtual" feature that would be implemented by several extensions). To add more detail the exact "features" wording comes from dpkg (deb packages).
Thanks, Marius
Sincerely,
On 19/03/2015 10:41, Thomas Mortagne wrote:
Vincent was not really talking about Maven relocation specifically but simply how to EM can find the new version of an extension that changed its id.
On Thu, Mar 19, 2015 at 10:39 AM, Jean SIMARD wrote:
Hi Vincent,
I'd like to have more precision on the "relocation" you're talking about.
For example, we have this at the moment
+ application-forum | + pom.xml ->org.xwiki.contrib.forum:application-forum [xar]
We'd like to transform the hierarchy of Maven modules/submodules into the following structure
+ application-forum | + pom.xml -> [pom] | + application-forum-ui/ | | + pom.xml -> [xar] | + application-forum-test/ | | + pom.xml -> [pom] | | + application-forum-test-pageobjects/ | | | + pom.xml -> [jar] | | | + src/ | | + application-forum-test-tests/ | | | + pom.xml -> [jar] | | | + src/
But now, I'm looking at relocation guide on Maven
https://maven.apache.org/guides/mini/guide-relocation.html#How_to_relocate_a...
and I'm not sure of what I need to do. From the link, I understand that I should do another pom.xml for each old release. Let say I will take care only of the last release at the moment (1.9.3 for Forum App). Then I should add a submodule to the root that looks like the following?
+ application-forum | + pom.xml -> [pom] | ... | + application-forum-1.9.3 | | + pom.xml -> [xar?] (see below for the content)
pom.xml -----
4.0.0 org.xwiki.contrib.forum application-forum 1.9.3
application-forum-ui
-----
Thanks,
On 19/03/2015 09:08, [email protected] wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
> Hi, > > I want to write automated tests for some contrib applications, but I need > you help on some questions. > > == Prb 1. Folder Structure + Changing IDs == > > Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
> Also some applications have IDs that don't correspond with the contrib > standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes > random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib..
> When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told > that we should change it only if we have a very good reason, otherwise > changing the ID will resolve in upgrading problems within the Extension > Manager. Unfortunately I don't remember exactly the problem with the > changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
> Example: https://github.com/xwiki-contrib/application-forum > Theoretically, wanting to add tests I would need to create two modules: > - application-forum-test > - application-forum-ui, and move the current sources here. > Unfortunately this means a change in the ID. > > Are 'adding tests' a good reason to change the ID? > Should I not change the ID, and just add a test module? > - application-forum-test > - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
> == Prb 2. Naming standards == > > We have some conventions on contrib.xwiki.org about name of the project. > We should add maybe some more examples on groupId and artifactId. > > Also when looking at the test modules names, some applications have: > - {{full-repository-name}}-tests > - {{full-repository-name}}-test > - {{partial-repository-name}}-test > - {{random-repository-name}}-test > - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
> Maybe we should agree also on this and document it. > I guess the correct name would be: > - {{full-repository-name}}-test > -- {{full-repository-name}}-test-pageobjects > -- {{full-repository-name}}-test-tests > - {{full-repository-name}}-ui
Yes. Some conventions are already documented here: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
> Also if we are 'discovering' some applications that don't correspond to the > standard, do we change them or do we let them be? Since changing means a > change in the ID :P
I’d say we change them.
> Since in theory we should have automated tests for all our applications, > should we add a convention to always create a > - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
> Additional question: Also when we will transfer from platform to contrib, > are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Thu, Mar 19, 2015 at 10:08 AM, [email protected] <[email protected]> wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) ([email protected] (mailto:[email protected])) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module) themselves.
Also some applications have IDs that don't correspond with the contrib standard: sometimes wrong groupId like 'org.xwiki.contrib.forum', sometimes random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
I considered it to be wrong, since from the start forum didn't had module.
The rule is defined here http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a module can have org.xwiki.contrib or org.xwiki.contrib.<shortprojetname>.
When wanting to change the groupId for 'org.xwiki.contrib.forum' I was told that we should change it only if we have a very good reason, otherwise changing the ID will resolve in upgrading problems within the Extension Manager. Unfortunately I don't remember exactly the problem with the changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change. The only negative effect is that XWiki will not propose an upgrade automatically when the new version comes out with a new extensionId. (I’d love to brainstorm about finding ways to handle this with Thomas though).
So the conclusion is: - use the ui/test/tests+pageobjects structure - change the ID + use 'properties' relocation - wait for EM to improve the new ID discoverability It would be great if we somehow can improve the discoverability of the new ID, since from an user perspective is kind of bad to be stuck with the current version. He would need to research it and readd the extension. Thanks everyone for the answers, Caty
Example: https://github.com/xwiki-contrib/application-forum Theoretically, wanting to add tests I would need to create two modules: - application-forum-test - application-forum-ui, and move the current sources here. Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID? Should I not change the ID, and just add a test module? - application-forum-test - src/main/resources
I’m in favor of changing the extension id and add relocation (it was done for this purpose). This is what we did in xwiki-platform for a lot of modules.
== Prb 2. Naming standards ==
We have some conventions on contrib.xwiki.org about name of the project. We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have: - {{full-repository-name}}-tests - {{full-repository-name}}-test - {{partial-repository-name}}-test - {{random-repository-name}}-test - test
Where? AFAIK I’ve been the one doing most of the tests relocation in xwiki-platform and our naming rule has always been the same. For example:
there are places on xwiki-contrib with that structure, I was not talking about xwiki-platform.
xwiki-platform-faq-test/ |_ xwiki-platform-faq-test-tests/ |_ …
Maybe we should agree also on this and document it. I guess the correct name would be: - {{full-repository-name}}-test -- {{full-repository-name}}-test-pageobjects -- {{full-repository-name}}-test-tests - {{full-repository-name}}-ui
Yes. Some conventions are already documented here:
http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBes...
Also if we are 'discovering' some applications that don't correspond to the standard, do we change them or do we let them be? Since changing means a change in the ID :P
I’d say we change them.
Since in theory we should have automated tests for all our applications, should we add a convention to always create a - {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer from platform to contrib, are we going to rename the modules?
I think we discussed this and we said we would change the id but not change the package names for now to not break backward compat. Would need to read again the mail thread. In any case we still have some decisions to make on that. I’ve been wanting to do this move but first I wanted to implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (6)
-
Denis Gervalle -
Ecaterina Moraru (Valica) -
Jean SIMARD -
Marius Dumitru Florea -
Thomas Mortagne -
vincent@massol.net