Skip to content

Commit

Permalink
SOLR-16072: make solr.jetty metrics reappear again (apache#726)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Risden <[email protected]>
  • Loading branch information
cpoerschke and risdenk authored Mar 7, 2022
1 parent 527c1d1 commit 75d9970
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 20 deletions.
51 changes: 31 additions & 20 deletions solr/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/


apply plugin: 'java-library'

description = 'Apache Solr Core'
Expand Down Expand Up @@ -45,8 +44,39 @@ dependencies {

api project(':solr:solrj')
api project(':solr:server')

permitUnusedDeclared project(':solr:server')

// --- start of server/build.grade declared dependencies ---

// Note: server/build.gradle declares these dependencies yet
// we only want them to show up in server/lib when packaged
// and NOT in server/solr-webapp/webapp/WEB-INF/lib. So any
// "api" dependency in server/build.gradle that is needed in
// core/build.gradle needs to be defined as "compileOnlyApi"
// below.

compileOnlyApi 'io.dropwizard.metrics:metrics-core'
compileOnlyApi ('io.dropwizard.metrics:metrics-graphite', {
exclude group: "com.rabbitmq", module: "amqp-client"
})
compileOnlyApi 'io.dropwizard.metrics:metrics-jmx'
compileOnlyApi 'io.dropwizard.metrics:metrics-jvm'

compileOnlyApi 'org.eclipse.jetty:jetty-alpn-server'
compileOnlyApi 'org.eclipse.jetty:jetty-http'
compileOnlyApi 'org.eclipse.jetty:jetty-io'
compileOnlyApi 'org.eclipse.jetty:jetty-rewrite'
compileOnlyApi 'org.eclipse.jetty:jetty-server'
compileOnlyApi 'org.eclipse.jetty:jetty-servlet'
compileOnlyApi 'org.eclipse.jetty:jetty-util'

compileOnlyApi 'org.eclipse.jetty.http2:http2-common'
compileOnlyApi 'org.eclipse.jetty.http2:http2-server'

compileOnlyApi 'javax.servlet:javax.servlet-api'
// --- end of server/build.gradle declared dependencies ---

// Non-API below; although there are exceptions

runtimeOnly "org.apache.lucene:lucene-analysis-kuromoji"
Expand Down Expand Up @@ -89,20 +119,8 @@ dependencies {
implementation 'org.apache.httpcomponents:httpclient'
implementation 'org.apache.httpcomponents:httpcore'

compileOnlyApi 'javax.servlet:javax.servlet-api'

implementation 'org.eclipse.jetty:jetty-client'

compileOnlyApi 'org.eclipse.jetty.http2:http2-common'
compileOnlyApi 'org.eclipse.jetty.http2:http2-server'
compileOnlyApi 'org.eclipse.jetty:jetty-alpn-server'
compileOnlyApi 'org.eclipse.jetty:jetty-http'
compileOnlyApi 'org.eclipse.jetty:jetty-io'
compileOnlyApi 'org.eclipse.jetty:jetty-rewrite'
compileOnlyApi 'org.eclipse.jetty:jetty-server'
compileOnlyApi 'org.eclipse.jetty:jetty-servlet'
compileOnlyApi 'org.eclipse.jetty:jetty-util'

// ZooKeeper
implementation('org.apache.zookeeper:zookeeper', {
exclude group: "org.apache.yetus", module: "audience-annotations"
Expand Down Expand Up @@ -139,13 +157,6 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-core'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl'

implementation 'io.dropwizard.metrics:metrics-core'
implementation ('io.dropwizard.metrics:metrics-graphite', {
exclude group: "com.rabbitmq", module: "amqp-client"
})
implementation 'io.dropwizard.metrics:metrics-jmx'
implementation 'io.dropwizard.metrics:metrics-jvm'

// For faster XML processing than the JDK
implementation 'org.codehaus.woodstox:stax2-api'
implementation 'com.fasterxml.woodstox:woodstox-core'
Expand Down
4 changes: 4 additions & 0 deletions solr/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ configurations {
}

dependencies {
// If any of the below "api" declared dependencies are
// used in core/build.gradle, then they must be declared
// as "compileOnlyApi" in core/build.gradle.

permitUnusedDeclared 'io.dropwizard.metrics:metrics-core'
api('io.dropwizard.metrics:metrics-core', {
exclude group: "com.rabbitmq", module: "amqp-client"
Expand Down

0 comments on commit 75d9970

Please sign in to comment.