Skip to content

Commit fc34158

Browse files
committed
fixed #512
1 parent 70ca237 commit fc34158

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/LoadUserModulesCommand.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
import com.marklogic.appdeployer.command.modules.AllButAssetsModulesFinder;
88
import com.marklogic.appdeployer.command.modules.AssetModulesFinder;
99
import com.marklogic.client.DatabaseClient;
10+
import com.marklogic.client.document.DocumentWriteSet;
1011
import com.marklogic.client.document.JSONDocumentManager;
1112
import com.marklogic.client.document.XMLDocumentManager;
1213
import com.marklogic.client.io.DocumentMetadataHandle;
14+
import com.marklogic.client.io.Format;
1315
import com.marklogic.client.io.StringHandle;
1416
import com.marklogic.client.modulesloader.Modules;
1517
import com.marklogic.client.modulesloader.impl.*;
@@ -165,9 +167,14 @@ public void execute(CommandContext context) {
165167
// load Flow Definitions
166168
List<Flow> flows = flowManager.getLocalFlows();
167169
XMLDocumentManager documentManager = hubConfig.newModulesDbClient().newXMLDocumentManager();
170+
DocumentWriteSet documentWriteSet = documentManager.newWriteSet();
171+
168172
for (Flow flow : flows) {
169-
documentManager.write(flow.getFlowDbPath(), new StringHandle(flow.serialize()));
173+
StringHandle handle = new StringHandle(flow.serialize());
174+
handle.setFormat(Format.XML);
175+
documentWriteSet.add(flow.getFlowDbPath(), handle);
170176
}
177+
documentManager.write(documentWriteSet);
171178

172179
Files.walkFileTree(startPath, new SimpleFileVisitor<Path>() {
173180
@Override

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/util/HubFileFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public boolean accept(File f) {
1313
boolean result = f != null &&
1414
!f.getName().startsWith(".") &&
1515
!f.getName().endsWith("entity.json") &&
16-
!f.getName().equals(f.getParent() + ".properties") &&
16+
!f.getName().equals(f.getParentFile().getName() + ".properties") &&
1717
!f.toString().matches(".*[/\\\\]REST[/\\\\].*") &&
1818

1919
// ignore vim files ending in ~

0 commit comments

Comments
 (0)