Skip to content

Conversation

@grechaw
Copy link
Contributor

@grechaw grechaw commented Mar 21, 2016

This task adds support for loading schemas database to ml-gradle.
Let's see if this new batch of PRs works for you -- I've been having success so far.

@rjrudin
Copy link
Contributor

rjrudin commented Mar 31, 2016

@grechaw Sorry for the delay, been swamped, I'll get this merged in and publish 2.1 by the end of this coming weekend.


String schemasGroup = "ml-gradle Schemas"
project.task("mlLoadSchemas", type: LoadSchemasTask, group: schemasGroup, description: "Loads special-purpose data into the schemas database (XSD schemas, Inference rules, and [MarkLogic 9] Extraction Templates)")
project.task("mlReloadSchemas", type: LoadSchemasTask, dependsOn: ["mlClearSchemasDatabase", "mlLoadSchemas"], group: schemasGroup, description: "Clears schemas database then loads special-purpose data into the schemas database (XSD schemas, Inference rules, and [MarkLogic 9] Extraction Templates)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mlReloadSchemas, you actually don't want a type - look at mlReloadModules as an example.

Also, the order of tasks in dependsOn doesn't force when Gradle will invoke the tasks. To ensure that mlLoadSchemas always runs after mlClearSchemasDatabase, you do this:

project.task("mlLoadSchemas", type....).mustRunAfter("mlClearSchemasDatabase")

I think mlLoadSchemas has to be defined after mlSchemasDatabase in order for mustRunAfter to work properly.

@grechaw
Copy link
Contributor Author

grechaw commented Apr 1, 2016

Hi @rjrudin , I've made the updates based on your feedback and added a commit. I was not completely confident -- it seems to work for my needs. Note also an update to ml-javaclient-util PR that I needed to make extaction tempaltes work properly (they need to be in a protected collection)

@grechaw
Copy link
Contributor Author

grechaw commented Apr 1, 2016

@rjrudin I'm not confident that the default path property is working for ml-schemas. When you give it a test run please note if I've done something wrong there. It can be a bit of a time suck trying to get all these bits right.

rjrudin added a commit that referenced this pull request Apr 3, 2016
@rjrudin
Copy link
Contributor

rjrudin commented Apr 3, 2016

I merged it into dev and will test it out with some other changes for 2.1.0

@rjrudin rjrudin closed this Apr 3, 2016
rjrudin added a commit that referenced this pull request Apr 4, 2016
hansenmc pushed a commit to hansenmc/ml-gradle that referenced this pull request Aug 19, 2016
…ect, don't need a list so there's only one
hansenmc pushed a commit to hansenmc/ml-gradle that referenced this pull request Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants