Bug 742872 - As a project maintainer, I want my Maven modules to share Zanata configuration so that administration is easy
As a project maintainer, I want my Maven modules to share Zanata configuratio...
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Maven (Show other bugs)
1.4
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Mason
Ding-Yi Chen
https://community.rallydev.com/slm/ra...
: Improvement, UserStory
Depends On:
Blocks: 748696 756230
  Show dependency treegraph
 
Reported: 2011-10-03 04:04 EDT by Sean Flanigan
Modified: 2012-04-23 00:33 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.5-SNAPSHOT (20120210-1002)
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-23 00:33:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Sean Flanigan 2011-10-03 04:04:32 EDT
Ideally, a Maven project with many modules should be able to supply a single zanata.xml, and each module in that project would push to and pull from the same Zanata server, and the same project.  This will avoid the need to create a zanata.xml for each module, as well as a project in the Zanata server for each module.

The Maven plugin will need to make sure that documents from the different modules are separated, perhaps by prepending document names with the module ID.

And assuming each module has the same directory layout, it should be possible for all modules to inherit zanata-maven-plugin config from a parent pom.

NB: must consider what happens when deleting a module - will the corresponding documents be deleted from Zanata?
Comment 1 Sean Flanigan 2011-12-14 21:35:11 EST
Implemented in the branch rhbz742872, merged into 1.4.

When the option -Dzanata.enableModules is set, Maven module IDs will be prepended to document names before pushing to the server, to look like this: org.example.groupId/org.example.artifactId/originalDocName

The reverse will happen when pulling from the server.

This should all work for any supported project type.

I've also added a -DdryRun option which doesn't change the server (for push) or the filesystem (for pull).  There is a lot more information being logged now, which makes dry runs more useful.

For safety, obsolete modules will not be deleted from the server by default, but they will generate a log warning.  The option -Dzanata.deleteObsoleteModules will enable deletion of docs from obsolete modules.


NB: when setting up the parent pom for a multi-module project, I found this useful for allowing all modules to share the same zanata.xml:
  <projectConfig>${session.executionRootDirectory}/zanata.xml</projectConfig>
(Requires Maven 3)
Comment 4 David Mason 2011-12-19 23:52:10 EST
merged into 1.4 and 1.5 branches

see: https://github.com/zanata/zanata/commit/4580bd887d2874113e22bc290c967115e03928a1
Comment 9 Ding-Yi Chen 2012-02-09 23:57:50 EST
VERIFIED with client API version: 1.5-SNAPSHOT (20120210-1002), server API version: 1.5-SNAPSHOT(20120209-1459)

Note You need to log in before you can comment on or make changes to this bug.