diff --git a/build.gradle b/build.gradle index 25b1d9c1e..efb605ca9 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } } dependencies { - classpath "com.gradle.publish:plugin-publish-plugin:0.9.2" + classpath "com.gradle.publish:plugin-publish-plugin:0.9.5" } } @@ -81,11 +81,11 @@ pluginBundle { displayName = 'ml-gradle for MarkLogic' description = 'Gradle plugin for configuring and deploying applications to MarkLogic' tags = ['marklogic'] - version = "2.3.0" + version = "2.3.1" } } mavenCoordinates { - version = "2.3.0" + version = "2.3.1" } } diff --git a/gradle.properties b/gradle.properties index cbcb95a66..b4c24b036 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ group=com.marklogic -version=2.3.0 +version=2.3.1 mlAppDeployerDependency=com.marklogic:ml-app-deployer:2.3.0 diff --git a/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy b/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy index a50cf6a4f..3c9ba4add 100644 --- a/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy +++ b/src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy @@ -2,6 +2,7 @@ package com.marklogic.gradle import com.marklogic.appdeployer.command.forests.DeployCustomForestsCommand import com.marklogic.gradle.task.forests.DeployCustomForestsTask +import com.sun.jersey.core.spi.component.ProviderServices import org.gradle.api.Plugin import org.gradle.api.Project import org.slf4j.LoggerFactory @@ -114,6 +115,9 @@ import com.marklogic.mgmt.admin.AdminConfig import com.marklogic.mgmt.admin.AdminManager import com.marklogic.mgmt.admin.DefaultAdminConfigFactory +import java.util.logging.Level +import java.util.logging.Logger + class MarkLogicPlugin implements Plugin { org.slf4j.Logger logger = LoggerFactory.getLogger(getClass()) @@ -121,6 +125,8 @@ class MarkLogicPlugin implements Plugin { void apply(Project project) { logger.info("\nInitializing ml-gradle") + quietDownJerseyLogging() + // Initialize groovysh support first so it doesn't pick up all the properties added when the AppDeployer is initialized initializeGroovyShellSupport(project) initializeAppDeployerObjects(project) @@ -421,4 +427,16 @@ class MarkLogicPlugin implements Plugin { deployer.setCommands(commands) return deployer } + + /** + * When the MarkLogic DatabaseClient class is used in Gradle, the Jersey ProviderServices class spits out + * a lot of not helpful logging at the INFO level. So we bump it down to WARNING to avoid that. + */ + void quietDownJerseyLogging() { + try { + Logger.getLogger(ProviderServices.class.getName()).setLevel(Level.WARNING) + } catch (Exception e) { + // Ignore, not important + } + } }