Skip to content

Commit 3eef426

Browse files
committed
Merge pull request #190 from paxtonhare/187_rest_deploy_bug
fixed #187
2 parents ef323ae + 9add7e4 commit 3eef426

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
xquery version "1.0-ml";
2+
3+
module namespace plugin = "http://marklogic.com/data-hub/plugins";
4+
5+
declare option xdmp:mapping "false";
6+
7+
(:~
8+
: Writer Plugin
9+
:
10+
: @param $id - the identifier returned by the collector
11+
: @param $envelope - the final envelope
12+
: @param $options - a map containing options. Options are sent from Java
13+
:
14+
: @return - nothing
15+
:)
16+
declare function plugin:write(
17+
$id as xs:string,
18+
$envelope as node(),
19+
$options as map:map) as empty-sequence()
20+
{
21+
xdmp:document-insert($id, $envelope)
22+
};

marklogic-data-hub/src/main/java/com/marklogic/hub/DataHub.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
254254
boolean isRest = dir.endsWith("REST");
255255

256256
String dirStr = dir.toString();
257-
boolean isInputDir = dirStr.matches(".*/input/.*");
258-
boolean isConformanceDir = dirStr.matches(".*/conformance/.*");
257+
boolean isInputDir = dirStr.matches(".*[/\\\\]input[/\\\\].*");
258+
boolean isConformanceDir = dirStr.matches(".*[/\\\\]conformance[/\\\\].*");
259259
if (isRest) {
260260
if (isInputDir) {
261261
loadedFiles.addAll(hubModulesLoader.loadModules(dir.normalize().toAbsolutePath().toFile(), new AllButAssetsModulesFinder(), stagingClient));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class HubFileFilter implements FileFilter {
1010

1111
@Override
1212
public boolean accept(File f) {
13-
boolean result = f != null && !f.getName().startsWith(".") && !f.toString().matches(".*/REST/.*");
13+
boolean result = f != null && !f.getName().startsWith(".") && !f.toString().matches(".*[/\\\\]REST[/\\\\].*");
1414
return result;
1515
}
1616

marklogic-data-hub/src/main/resources/ml-modules/root/com.marklogic.hub/lib/flow-lib.xqy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ declare %private function flow:get-flow(
279279
return
280280
fn:doc($uri)/hub:flow
281281
})
282+
where $flow
282283
return
283284
<flow xmlns="http://marklogic.com/data-hub">
284285
<name>{$flow-name}</name>

0 commit comments

Comments
 (0)