Bug 742872 - As a project maintainer, I want my Maven modules to share Zanata configuration so that administration is easy
Summary: As a project maintainer, I want my Maven modules to share Zanata configuratio...
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven
Version: 1.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: David Mason
QA Contact: Ding-Yi Chen
URL: https://community.rallydev.com/slm/ra...
Depends On:
Blocks: Red Hat748696 Red Hat756230
TreeView+ depends on / blocked
Reported: 2011-10-03 08:04 UTC by Sean Flanigan
Modified: 2012-04-23 04:33 UTC (History)
2 users (show)

Fixed In Version: 1.5-SNAPSHOT (20120210-1002)
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-23 04:33:11 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 760390 0 unspecified CLOSED User story: As a GWT developer, I want to push/pull UTF-8 Properties files so that they can be translated 2021-02-22 00:41:40 UTC

Internal Links: 760390

Description Sean Flanigan 2011-10-03 08:04:32 UTC
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-15 02:35:11 UTC
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:
(Requires Maven 3)

Comment 4 David Mason 2011-12-20 04:52:10 UTC
merged into 1.4 and 1.5 branches

see: https://github.com/zanata/zanata/commit/4580bd887d2874113e22bc290c967115e03928a1

Comment 9 Ding-Yi Chen 2012-02-10 04:57:50 UTC
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.