Giter Site home page Giter Site logo

marklogic / ml-gradle Goto Github PK

View Code? Open in Web Editor NEW
72.0 31.0 78.0 2.76 MB

Gradle plugin for automating everything involving MarkLogic

License: Other

Groovy 97.36% Java 2.64%
gradle corb marklogic gradle-plugin example examples sample samples mark logic

ml-gradle's Introduction

GitHub release GitHub last commit License Known Vulnerabilities

Automate everything involving MarkLogic with Gradle

ml-gradle is a Gradle plugin that can automate everything you do with MarkLogic. Deploy an application, add a host, backup a database, stub out a new project, load modules as you modify them, run an MLCP or CoRB or Data Movement job - if it involves MarkLogic, ml-gradle either automates it already or can be extended to do so.

You can use ml-gradle right away with the simple tutorial below, or learn more:

Don't want to use Gradle? Then consider using the ml-app-deployer Java library on which ml-gradle depends. ml-app-deployer provides most of the functionality within ml-gradle without having any dependency on Gradle or Groovy - ml-gradle is then a fairly thin wrapper around ml-app-deployer to expose its functionality within a Gradle environment.

Compatibility guidelines

If you are using ml-gradle 4.6.0 or higher, you must use Gradle 7.6 or higher.

If you wish to use Gradle 7 or higher, you must use ml-gradle 4.3.0 or higher.

For older versions of ml-gradle, Gradle 6 or higher is recommended.

Note that ml-gradle has not yet been tested on any release of Gradle 8.

Start using ml-gradle

ml-gradle depends on at least Java 8 and MarkLogic 9 or higher, so if you have those installed, you're just a few minutes away from using ml-gradle to start a new project and deploy an application from it. Note that in addition to Java 8, you can use Java 11 or Java 17, but please see the MarkLogic Java Client documentation for information on dependencies you may need when using Java 11 or Java 17.

First, install Gradle.

Then, in an empty directory, create a file named "build.gradle" with your favorite text editor and enter the following:

plugins { id "com.marklogic.ml-gradle" version "4.7.0" }

Then run:

gradle mlNewProject

(If you are trying ml-gradle 4.5.0, you will need to do gradle -PmlUsername= -PmlPassword= mlNewProject due to a bug that has been fixed in ml-gradle 4.5.1).

This starts a project wizard to stub out files for your new application. You can accept all the defaults, but be sure to enter a valid port number for the "REST API port" question. ml-gradle will then print the following logging:

Updating build.gradle so that the Gradle properties plugin can be applied
Writing: build.gradle
Writing: gradle.properties
Writing: gradle-dev.properties
Writing: gradle-local.properties
Writing: gradle-qa.properties
Writing: gradle-prod.properties
Making directory: src/main/ml-config
Making directory: src/main/ml-modules
Writing project scaffolding files

You now have an ml-gradle project stubbed out with support for deploying to multiple environments via the Gradle properties plugin.

Now deploy it!

gradle mlDeploy

And you should see more ml-gradle logging like this:

:mlDeleteModuleTimestampsFile
:mlPrepareBundles
:mlDeployApp
:mlPostDeploy UP-TO-DATE
:mlDeploy
BUILD SUCCESSFUL

And once that's complete, you can go to the MarkLogic Admin UI on port 8001 to see the resources that have been created (the names of these resources start with the application name you selected in the project wizard, which defaults to myApp):

  • Under App Servers, a new REST server named myApp on the port you chose
  • Under Databases, a new content datase named myApp-content and a new modules database named myApp-modules
  • Under Forests, 3 new forests for myApp-content and 1 new forest for myApp-modules
  • Under Security/Users, 3 new users, each prefixed with myApp
  • Under Security/Roles, 5 new roles, each prefixed with myApp

Congratulations! You've used ml-gradle to stub out a new project and deploy its application to MarkLogic. You're now ready to start adding more resources and modules to your project. See the links above this tutorial to learn more about using ml-gradle.

ml-gradle's People

Contributors

ajith0888 avatar akshaysonvane avatar billfarber avatar bradmann avatar dependabot[bot] avatar derms avatar divino avatar dmcassel avatar freshie avatar hansenmc avatar jamesagardner avatar jkerr5 avatar luiz-n avatar nikos avatar paxtonhare avatar peetkes avatar rjrudin avatar ryanjdew avatar sastafford avatar tzejohn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ml-gradle's Issues

Supporting loading data

As part of integrating into samplestack, need a replacement for MarkLogicSlurpTask. This loads documents via the REST API, which is one option - which also includes support for loading triple files.

Can do REST API initially, though mlcp will of course scale better.

MLCP Export Task doesn't seem to work due to invaild host

I am running a virtual host on my laptop and it is possible that might be the reason. But I can pass my host via command line and it is still not being picked up.

task exportGeonamesTaxonomy(type: com.rjrudin.marklogic.gradle.task.MlcpTask) {
classpath = configurations.mlcp
command = "EXPORT"
database = testFlag.equals("true") ? mlAppConfig.testContentDatabaseName : mlAppConfig.contentDatabaseName
port = testFlag.equals("true") ? mlAppConfig.testRestPort : mlAppConfig.restPort
args = ['-collection_filter', 'org.geonames', '-output_file_path', '$projectDir/src/main/resources/geonames/archive', '-output_type', 'archive']
}

15/09/06 06:23:03 ERROR contentpump.LocalJobRunner: Error running task:
java.lang.IllegalArgumentException: Default provider - Not a usable net address:localhost.localdomain:8100
at com.marklogic.xcc.ContentSourceFactory.defaultConnectionProvider(Cont
entSourceFactory.java:331)
at com.marklogic.xcc.ContentSourceFactory.newContentSource(ContentSource
Factory.java:219)
at com.marklogic.xcc.ContentSourceFactory.newContentSource(ContentSource
Factory.java:243)

Configure scheduled tasks

Use ml-app-deployer's new support for configuring schedule tasks. Should happen as part of mlDeploy.

Loading Scheduled Tasks a second time fails

This may be a Management API issues.

Trying to load the following scheduled task a second time and I get a 500 error when it hits PUT /manage/v2/tasks/.

If I remove the task-user property then it works.

{
"task-enabled": false,
"task-path": "/ext/isearch/task/getDeltaObjects.xqy",
"task-root": "/",
"task-type": "weekly",
"task-period": 2,
"task-day": ["tuesday"],
"task-start-time": "12:00:00",
"task-database": "%%DATABASE%%",
"task-modules": "%%MODULES_DATABASE%%",
"task-user": "isearch-user"
}

Execute roxy commands that will run a ml-gradle task

As a developer used to roxy commands
I want to use TITLE
So that I decrease my learning curve to using ml-gradle

This is a low priority nice-to-have feature. If we want to get serious about our consultants using ml-gradle this might prove to be a nice way to transition.

gradle mlWatch not working

Error: Could not find or load main class com.marklogic.client.modulesloader.ModulesWatcher

WatchTask.groovy line 16

wrong classpath referenced

Execute a corb gradle task type

As a developer
I want to TITLE
So that it is easier to execute a corb job. Right now I have to run a JavaExec task which forces me to remember all the corb parameters. This would help new ml-gradle users run a corb job.

Deploy all servers

Need a task for updating all servers - or at least all the non-REST API ones, but might as well include that one too.

Waiting for restart trips over NoHttpResponseException

I was undeploying, and the check to see if a restart finished threw an error:

:mlAppUndeploy
Caught exception while waiting for MarkLogic to restart: I/O error on GET request for "http://ml8-ml1:8001/admin/v1/timestamp":ml8-ml1:8001 failed to respond; nested exception is org.apache.http.NoHttpResponseException: ml8-ml1:8001 failed to respond
:mlAppUndeploy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mlAppUndeploy'.
> I/O error on GET request for "http://ml8-ml1:8002/manage/v2/databases":ml8-ml1:8002 failed to respond; nested exception is org.apache.http.NoHttpResponseException: ml8-ml1:8002 failed to respond

getting sample project to work ...

I downloaded ml_gradle and ran gradle mlDeploy and it worked perfectly (the databases were created etc) so to go further, following the docs I cloned sample-project did the same thing and its failing ...

Any ideas ?
THis is running against a 8.0.1 release build of ML.

------> Not working
DLEE@DLEE-HP /cygdrive/c/Work/MarkLogic/Projects/mlui/gradle/test1/sample-project
$ gradle mlInstalLPackages
App name: sample-project
App host: vmnex
App username: admin
App REST port: 8100
App XDBC port: 8101
Manage app host: vmnex
Manage app username: admin
Couldn't find local.gradle; you can create this gitignore'd file to override properties if necessary
:mlPrepareRestApiDependencies
No mlRestApi dependencies found, so no preparation of dependencies required

:mlInstallPackages
Installing database and appserver packages
GET request for "http://vmnex:8002/manage/v2/packages/sample-project-package" resulted in 404 (Not Found); invoking error handler
POST request for "http://vmnex:8002/v1/rest-apis" resulted in 400 (Bad Request); invoking error handler
:mlInstallPackages FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':mlInstallPackages'.

    400 Bad Request

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 12.299 secs

DLEE@DLEE-HP /cygdrive/c/Work/MarkLogic/Projects/mlui/gradle/test1/sample-project

---> Working

DLEE@DLEE-HP /cygdrive/c/Work/MarkLogic/Projects/mlui/gradle/test1
$ gradle mlInstalLPackages
App name: quick-start
App host: vmnex
App username: admin
App REST port: 8200
App XDBC port: 8201
Manage app host: vmnex
Manage app username: admin
:mlPrepareRestApiDependencies
No mlRestApi dependencies found, so no preparation of dependencies required

:mlMergeDatabasePackages
No mergePackageFilePaths specified, will not produce a new database package file
:mlMergeHttpServerPackages
No mergePackageFilePaths specified, will not produce a new HTTP server package file
:mlInstallPackages

Deleting package with quick-start-package
Sending a 'DELETE' to 'http://vmnex:8002/manage/v2/packages/quick-start-package'
Sending a 'GET' to 'http://vmnex:8002/manage/v2/packages/quick-start-package?format=json'

Creating package quick-start-package
Sending a 'POST' to 'http://vmnex:8002/manage/v2/packages?format=json&pkgname=quick-start-package'
No content database package file found, so not installing a content database

Checking to see if REST API with name quick-start exists...
Sending a 'GET' to 'http://vmnex:8002/v1/rest-apis/quick-start'
Creating new REST API server: {rest-api: {name: "quick-start", database: "quick-start-content", port: 8200}}
Sending a 'POST' to 'http://vmnex:8002/v1/rest-apis'

Adding server quick-start-content-xdbc in group Default to package quick-start-package
Sending a 'POST' to 'http://vmnex:8002/manage/v2/packages/quick-start-package/servers/quick-start-content-xdbc?group-id=Default'

Installing package quick-start-package
Sending a 'POST' to 'http://vmnex:8002/manage/v2/packages/quick-start-package/install?format=json'
Finished installing application quick-start

BUILD SUCCESSFUL

Total time: 19.348 secs

DLEE@DLEE-HP /cygdrive/c/Work/MarkLogic/Projects/mlui/gradle/test1
$

Don't require ext for assets loaded via mlcp

LoadAssetsViaMlcpTask currently assumes that the modules in the "consolidated assets" directory will be stored under "/ext". This doesn't need to be true - a developer may be using this task to load assets that purposefully are not exposed via the REST API.

run mlDeploy twice

I've had to run mlDeploy target twice ... first time forests/databases/users gets deployed, 2nd time the rest server.

also getting strange error

9:40:06 AM: Executing external task 'mlDeploy'...

Initializing ml-gradle
Setting config dir to: src/ml-gradle/ml-config
App name: marklogic-sesame-test
App host: localhost
App username: admin
App REST port: 8200
Manage host: localhost
Manage username: admin
Admin host: localhost
Admin username: admin
Finished initializing ml-gradle

:mlDeleteModuleTimestampsFile
:mlPrepareRestApiDependencies
No mlRestApi dependencies found, so no preparation of dependencies required

:mlAppDeploy
POST request for "http://localhost:8002/v1/rest-apis" resulted in 400 (Bad Request); invoking error handler
:mlAppDeploy FAILED

FAILURE: Build failed with an exception.

my gradle.properties looks like

mlConfigDir=src/ml-gradle/ml-config
mlHost=localhost
mlUsername=admin
mlPassword=admin
adminUser=admin
adminPassword=admin
writerUser=rest-writer
writerPassword=x
readerUser=rest-reader
readerPassword=x
validUser=rest-writer
validPassword=x
mlAppName=marklogic-sesame-test
mlRestPort=8200

if I get a chance will peek into ml-gradle to see what is up, but thought I would mention.

build failed : Unsupported major.minor version 51.0

Hi Rob,

not sure if this is the right place to log this but I have the obi-ui ez app and want to install in on a vm.

I used Geert Josten his vagrant file to create a ml8 vm...

now Itry to do ./gradlew mlinstall and bump into this :

[vagrant@obi-ml8-ml1 obi-ui]$ ./gradlew mlinstall
Downloading https://services.gradle.org/distributions/gradle-2.1-bin.zip
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/vagrant/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a/gradle-2.1-bin.zip to /home/vagrant/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a
Set executable permissions for: /home/vagrant/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a/gradle-2.1/bin/gradle
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-gradle/2.0-alpha-4/ml-gradle-2.0-alpha-4.pom
Download https://repo1.maven.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7/http-builder-0.7.pom
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-app-deployer/2.0-alpha-3/ml-app-deployer-2.0-alpha-3.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.2.1/httpclient-4.2.1.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.2.1/httpcomponents-client-4.2.1.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/project/6/project-6.pom
Download https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.3/json-lib-2.3.pom
Download https://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.16/nekohtml-1.9.16.pom
Download https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.pom
Download https://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-javaclient-util/2.0.3/ml-javaclient-util-2.0.3.pom
Download https://repo1.maven.org/maven2/jaxen/jaxen/1.1.6/jaxen-1.1.6.pom
Download https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-web/4.1.5.RELEASE/spring-web-4.1.5.RELEASE.pom
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download https://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
Download https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/9/commons-parent-9.pom
Download https://repo1.maven.org/maven2/commons-lang/commons-lang/2.4/commons-lang-2.4.pom
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download https://repo1.maven.org/maven2/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.pom
Download https://repo1.maven.org/maven2/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.pom
Download https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.pom
Download https://repo1.maven.org/maven2/ch/qos/logback/logback-parent/1.1.3/logback-parent-1.1.3.pom
Download https://repo1.maven.org/maven2/com/marklogic/java-client-api/3.0.1/java-client-api-3.0.1.pom
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-xcc-util/2.0.1/ml-xcc-util-2.0.1.pom
Download https://repo1.maven.org/maven2/org/jdom/jdom2/2.0.5/jdom2-2.0.5.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-context/4.1.5.RELEASE/spring-context-4.1.5.RELEASE.pom
Download https://repo1.maven.org/maven2/org/slf4j/jcl-over-slf4j/1.7.12/jcl-over-slf4j-1.7.12.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.12/slf4j-parent-1.7.12.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-aop/4.1.5.RELEASE/spring-aop-4.1.5.RELEASE.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-beans/4.1.5.RELEASE/spring-beans-4.1.5.RELEASE.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-core/4.1.5.RELEASE/spring-core-4.1.5.RELEASE.pom
Download https://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.pom
Download https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.7/slf4j-parent-1.7.7.pom
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-client/1.17/jersey-client-1.17.pom
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-project/1.17/jersey-project-1.17.pom
Download https://repo1.maven.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
Download https://repo1.maven.org/maven2/com/sun/jersey/contribs/jersey-apache-client4/1.17/jersey-apache-client4-1.17.pom
Download https://repo1.maven.org/maven2/com/sun/jersey/contribs/jersey-contribs/1.17/jersey-contribs-1.17.pom
Download https://repo1.maven.org/maven2/com/sun/jersey/contribs/jersey-multipart/1.17/jersey-multipart-1.17.pom
Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.7/commons-codec-1.7.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/26/commons-parent-26.pom
Download https://repo1.maven.org/maven2/org/apache/apache/9/apache-9.pom
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-core/1.17/jersey-core-1.17.pom
Download https://repo1.maven.org/maven2/org/jvnet/mimepull/mimepull/1.9.4/mimepull-1.9.4.pom
Download https://repo1.maven.org/maven2/net/java/jvnet-parent/4/jvnet-parent-4.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.4.1/jackson-core-2.4.1.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.4/jackson-parent-2.4.pom
Download https://repo1.maven.org/maven2/com/fasterxml/oss-parent/16/oss-parent-16.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.4.1/jackson-annotations-2.4.1.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.4.1/jackson-databind-2.4.1.pom
Download http://developer.marklogic.com/maven2/com/marklogic/marklogic-xcc/8.0.2/marklogic-xcc-8.0.2.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-expression/4.1.5.RELEASE/spring-expression-4.1.5.RELEASE.pom
Download https://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.pom
Download https://repo1.maven.org/maven2/org/jvnet/mimepull/1.6/mimepull-1.6.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3.5/httpclient-4.3.5.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.3.5/httpcomponents-client-4.3.5.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/project/7/project-7.pom
Download https://repo1.maven.org/maven2/org/apache/apache/13/apache-13.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.3.2/httpcomponents-core-4.3.2.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.pom
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/34/commons-parent-34.pom
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-gradle/2.0-alpha-4/ml-gradle-2.0-alpha-4.jar
Download https://repo1.maven.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7/http-builder-0.7.jar
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-app-deployer/2.0-alpha-3/ml-app-deployer-2.0-alpha-3.jar
Download https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.3/json-lib-2.3-jdk15.jar
Download https://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.16/nekohtml-1.9.16.jar
Download https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-javaclient-util/2.0.3/ml-javaclient-util-2.0.3.jar
Download https://repo1.maven.org/maven2/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-web/4.1.5.RELEASE/spring-web-4.1.5.RELEASE.jar
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Download https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
Download https://repo1.maven.org/maven2/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
Download https://repo1.maven.org/maven2/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar
Download https://repo1.maven.org/maven2/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
Download https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar
Download https://repo1.maven.org/maven2/com/marklogic/java-client-api/3.0.1/java-client-api-3.0.1.jar
Download http://rjrudin.github.io/marklogic-java/releases/com/marklogic/ml-xcc-util/2.0.1/ml-xcc-util-2.0.1.jar
Download https://repo1.maven.org/maven2/org/jdom/jdom2/2.0.5/jdom2-2.0.5.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-context/4.1.5.RELEASE/spring-context-4.1.5.RELEASE.jar
Download https://repo1.maven.org/maven2/org/slf4j/jcl-over-slf4j/1.7.12/jcl-over-slf4j-1.7.12.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-aop/4.1.5.RELEASE/spring-aop-4.1.5.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-beans/4.1.5.RELEASE/spring-beans-4.1.5.RELEASE.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-core/4.1.5.RELEASE/spring-core-4.1.5.RELEASE.jar
Download https://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
Download https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-client/1.17/jersey-client-1.17.jar
Download https://repo1.maven.org/maven2/com/sun/jersey/contribs/jersey-apache-client4/1.17/jersey-apache-client4-1.17.jar
Download https://repo1.maven.org/maven2/com/sun/jersey/contribs/jersey-multipart/1.17/jersey-multipart-1.17.jar
Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.7/commons-codec-1.7.jar
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-core/1.17/jersey-core-1.17.jar
Download https://repo1.maven.org/maven2/org/jvnet/mimepull/mimepull/1.9.4/mimepull-1.9.4.jar
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.4.1/jackson-core-2.4.1.jar
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.4.1/jackson-annotations-2.4.1.jar
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.4.1/jackson-databind-2.4.1.jar
Download http://developer.marklogic.com/maven2/com/marklogic/marklogic-xcc/8.0.2/marklogic-xcc-8.0.2.jar
Download https://repo1.maven.org/maven2/org/springframework/spring-expression/4.1.5.RELEASE/spring-expression-4.1.5.RELEASE.jar
Download https://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
Download https://repo1.maven.org/maven2/org/jvnet/mimepull/1.6/mimepull-1.6.jar
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3.5/httpclient-4.3.5.jar
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.jar
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.jar

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'obi-ui'.

    Could not open no_buildscript class cache for build file '/space/projects/obi/obi-ui/build.gradle' (/home/vagrant/.gradle/caches/2.1/scripts/build_2tv2dt3jfe4uuce4od0jn6fp28/ProjectScript/no_buildscript).
    com/marklogic/gradle/task/MlcpTask : Unsupported major.minor version 51.0

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 37.079 secs
[vagrant@obi-ml8-ml1 obi-ui]$

please advise

Generate project structure

Can't use https://docs.gradle.org/current/userguide/init_scripts.html, as that always runs. Could instead have a task in ml-gradle for initializing a project - e.g. mlProjectInit. That could then do the following:

  • Don't need to touch build.gradle, which will already depend on ml-gradle
  • Stub out src/main/ml-config with a database file and a REST API file, and an app role and an app user
  • Stub out src/main/ml-modules with an /ext/(mlAppName) directory with a sample module, and then a basic search options file, a basic transform, and a basic service

Fix ordering of deploying amps

This needs to happen much later in the cycle, as the modules database referenced by an app must exist, else you get a 404

docs should reference latest version in gradle dependencies

buildscript {
  repositories {
    mavenCentral()
    maven {url "http://developer.marklogic.com/maven2/"}
    maven {url "http://rjrudin.github.io/marklogic-java/releases"}
  }
  dependencies {
    classpath "com.marklogic:ml-gradle:2.0-alpha-4"
  }
}

should be

buildscript {
  repositories {
    mavenCentral()
    maven {url "http://developer.marklogic.com/maven2/"}
    maven {url "http://rjrudin.github.io/marklogic-java/releases"}
  }
  dependencies {
    classpath "com.marklogic:ml-gradle:2.0a8"
  }
}

ml-gradle init messages should be quiet if not running ml-gradle

when not running an ml-gradle task, consider suppressing gradle init messages.

example of console trace;

Initializing ml-gradle
App name: quick-start
App host: localhost
App username: admin
App REST port: 8200
Manage host: localhost
Manage username: admin
Admin host: localhost
Admin username: admin
Initializing ManageClient with manage config of: [host: localhost, port: 8002, username: admin]
Initialized ManageClient with base URL of: http://localhost:8002
Finished initializing ml-gradle

Sample project database configuration

The sample project has an example CPF pipeline but the sample content database "maintain last modified" property is set to FALSE. This should default to TRUE so CPF will work correctly.

Updating amp fails

Having issue at Boeing with this - URL looks okay, but getting a 404, and the modules database is in fact there

Application-level auth not supported

Some of the gradle tasks (e.g., mlLoadModules) aren't supported with application-level authentication on the appserver. The workaround currently is to give the default user the rest-admin role, but it would be nice to have ml-gradle handle this type of server configuration automatically.

Add support for IDEA

Including the IntelliJ IDEA gradle plugin allows also to create project and module files easily.

Generate signed certificate

When associating an app server with a certificate template via the mgmt API, the certificate is not being signed until a user manually reassigns the app server to the template.

Exclude URIs when clearing a modules database

Needed when a project has an mlRestApi dependency and a custom rewriter; when it does an mlReloadModules, it will remove the custom rewriter and then not be able to load any of the modules in the mlRestApi dependency folder.

Execute mlPostDeploy task as mlManageUsername

As a developer

I want to TITLE

So that I can avoid using the default permissions assigned to mlRestAdminUsername

I am using the mlPostDeploy task to create a few triggers but the create triggers task uses the default permissions of the user (mlRestAdminUserName). As a result, I've had to assign the createTriggers execute priv to that user. I don't think we want that user creating triggers. One way to address this problem would be to change the createTriggersTask to not use xdmp:default-permissions(). But it may be a better solution to have mlManageUsername run the postDeploy task.

rationalise targets

careful target naming in gradle reduces cognitive load.

for example the current list of targets are ;

mlAppDeploy
mlAppUndeploy
mlClearContentDatabase
mlClearModules
mlCpfDeploy
mlCpfLoadDefaultPipelines
mlCreateResource
mlCreateTransform
mlDeleteModuleTimestampsFile
mlDeploy
mlInit
mlInstallAdmin
mlLoadModules
mlPostDeploy
mlPostUndeploy
mlPrepareRestApiDependencies
mlReloadModules
mlScaffold
mlUndeploy
mlUpdateContentDatabase
mlUpdateRestApiServers
mlWatch

I would suggest rationalising this list and thinking about overlap between targets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.