New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.11/2.12 StackOverflowError in SpecializeTypes.specializedTypeVars #10239

Open
scabug opened this Issue Mar 18, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@scabug
Copy link

scabug commented Mar 18, 2017

We're upgrading a project from scala 2.10.4 to 2.11.8 and we're getting a StackOverflowError out of the compiler. Unfortunately, there's zero additional debug or context provided, but when I build with Gradle 3.4.1 (though it happens on every gradle version I've tried), zinc 0.3.13 (though it fails on every zinc I'm tried, too), and Scala 2.11.0 – 2.12.1, I get the following:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:compileScala'.
> java.lang.StackOverflowError (no error message)

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':core:compileScala'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
Caused by: java.lang.StackOverflowError
        at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1524)
        at scala.reflect.internal.Types$TypeRef.initializedTypeParams(Types.scala:2195)
        at scala.reflect.internal.Types$TypeRef.typeParamsMatchArgs(Types.scala:2196)
        at scala.reflect.internal.Types$AliasTypeRef$class.dealias(Types.scala:2014)
        at scala.reflect.internal.Types$AliasNoArgsTypeRef.dealias(Types.scala:2329)
        at scala.reflect.internal.Types$Type.dealiasWiden(Types.scala:526)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
        at scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:447)
... repeated ...
@scabug

This comment has been minimized.

Copy link

scabug commented Mar 18, 2017

Imported From: https://issues.scala-lang.org/browse/SI-10239?orig=1
Reporter: Mike Schrag (mschrag)
Affected Versions: 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.11.4, 2.11.5, 2.11.6, 2.11.7, 2.11.8, 2.12.1

@scabug scabug added the backend label Apr 7, 2017

@mschrag

This comment has been minimized.

Copy link

mschrag commented Apr 11, 2017

I tracked down what was going on here, and it's quite strange.

I had

object SomeContainer {
    type SomeType = org.mybatis.scala.session.Session
}

It turns out that were linking against the 3.4.0 version of mybatis, but our version of mybatis-scala was linked against 3.2(I think .8). One notable difference between these two versions of mybatis are that some arguments of functions of the Session class are generic in 3.4 and not in 3.2. For example, in mybatis-scala's Session:

  def select[Param](statement : String, parameter : Param, rowBounds : RowBounds, handler : ResultHandler) : Unit = {

In 3.4 mybatis, ResultHandler takes a type parameter. When I re-compiled mybatis-scala against 3.4, and fixed the compile errors resulting from missing type parameters, our code then compiled successfully.

This is such a crazy scenario, that I'm not even sure what to recommend, so the best I can hope for is that someone who stumbles across this in the future might have a lead on tracking down the problem.

@kbharath000

This comment has been minimized.

Copy link

kbharath000 commented Aug 17, 2017

I'm also getting the same issue can u check with the below error for confirmation and help me

object java.lang.Object in compiler mirror not found.

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

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileScala'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
    at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
    at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
    at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)
    at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)
    at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
    at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
    at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1394)
    at scala.tools.nsc.Global$Run.(Global.scala:1215)
    at xsbt.CachedCompiler0$$anon$2.(CompilerInterface.scala:106)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:106)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:97)
    at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97)
    at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97)
    at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:162)
    at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:96)
    at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:139)
    at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:86)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:38)
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:36)
    at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:39)
    at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38)
    at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:66)
    at sbt.inc.Incremental$.compile(Incremental.scala:38)
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:26)
    at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:153)
    at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:70)
    at com.typesafe.zinc.Compiler.compile(Compiler.scala:201)
    at com.typesafe.zinc.Compiler.compile(Compiler.scala:183)
    at com.typesafe.zinc.Compiler.compile(Compiler.scala:174)
    at com.typesafe.zinc.Compiler.compile(Compiler.scala:165)
    at org.gradle.api.internal.tasks.scala.ZincScalaCompiler$Compiler.execute(ZincScalaCompiler.java:92)
    at org.gradle.api.internal.tasks.scala.ZincScalaCompiler.execute(ZincScalaCompiler.java:66)
    at org.gradle.api.internal.tasks.scala.ZincScalaCompiler.execute(ZincScalaCompiler.java:48)
    at org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServer.execute(CompilerDaemonServer.java:31)
    at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:87)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)

@mschrag

This comment has been minimized.

Copy link

mschrag commented Aug 17, 2017

That's a different stack trace. Mine was a StackOverflowError at the root, and yours is a MissingRequirementError. I would search for the root cause, rather than the top-level exception. In this case, the following results might give you hints:

@kbharath000

This comment has been minimized.

Copy link

kbharath000 commented Aug 17, 2017

I'm not using sbt in my project and also i'm using the java 8 for the project.Scala version is 2.10 is using for my project

@mschrag

This comment has been minimized.

Copy link

mschrag commented Aug 17, 2017

I would review ALL of your jar dependencies (direct and transitive) and make sure nothing is bringing in a dependency that conflicts. Maybe something has a 2.11 dependency down in the list or something like that. The process I went through was just whittling down chunks of code until I found something that reliably failed to compile with the smallest set of code and dependencies possible, then I started whittling down jar dependencies to see what might be wrong. Not sure there's an easy or fast answer to this one.

@kbharath000

This comment has been minimized.

Copy link

kbharath000 commented Aug 17, 2017

With the same configuaration it working for all of my colleagues but not for me.I'm not sure about it why it is behaving weired to me.
Below is my configuration:

buildscript {
  repositories {
    mavenLocal()
    maven {
      url "${artifactory_contextUrl}/plugins-release"
      credentials {
        username = "${artifactoryUser}"
        password = "${artifactoryPassword}"
      }
    }
    maven {
      url "${artifactory_contextUrl}/libs-release"
      credentials {
        username = "${artifactoryUser}"
        password = "${artifactoryPassword}"
      }
      maven {
        url "https://mvnrepository.com"
      }
    }
    maven {
      url "http://repository.mapr.com/maven/"
    }
  }
  dependencies {
    classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1'
    classpath 'org.oneplatform.plugin:oneplatform-plugin-release:9.1.1'
    classpath 'org.oneplatform.plugin:oneplatform-plugin-qualitycheck:5.+'
    classpath 'org.oneplatform.plugin:oneplatform-plugin-microbuild:12.+'
    classpath 'org.oneplatform:oneplatform-cloudfoundry-gradle-plugin:1.+'
    classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.3.RELEASE' 
    classpath "net.saliman:gradle-properties-plugin:1.4.4"
    classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.3"
    classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
    classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1"
  }
  configurations.classpath {
    resolutionStrategy {
      cacheDynamicVersionsFor 0, 'seconds'
    }
  }
  
  configurations {
    runtime.exclude module: 'oneplatform-commons-auditing'
    }
}

apply plugin: org.oneplatform.plugin.microbuild.MicroBuildDependencyPlugin

apply plugin: 'net.saliman.properties'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
apply plugin: 'org.asciidoctor.convert'

apply plugin: "oneplatform-plugin-qualitycheck"
apply plugin: 'oneplatform-plugin-release'

apply plugin: 'scala'
apply plugin: "org.sonarqube"

apply plugin: "org.sonarqube"

apply plugin: 'com.github.johnrengelman.shadow'

findMainClass.enabled = false
bootRepackage.enabled = false

//set Java compiler -source and -target options
sourceCompatibility = '1.8'
targetCompatibility = '1.8'

ext {
  scalaVersion = '2.10.4'
  scalaLibVersion = '2.10'
}

configurations {
  springBootJars
  springBootJars.exclude group: 'ch.qos.logback', module: 'logback-classic'
  springBootJars.exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
}

dependencies {  
  // Commons
  compile ('org.oneplatform:oneplatform-commons-framework:23.+') {
  	changing = true
  	exclude module: 'liquibase-core'
  }
  // oneplatform-commons-framework included in oneplatform-bigdata-commons
  compile ('com.paysafe.bigdata:oneplatform-bigdata-commons:5.+') {
	changing = true
  }
  compile ('com.paysafe.grse:paysafe-grse-recon-commons:1.+'){
    changing = true
  }

  // Scala
  compile("org.scala-lang:scala-library:$scalaVersion")
  compile("org.scala-lang:scala-reflect:$scalaVersion")

  // Spark and hbase
  compile "org.apache.spark:spark-core_$scalaLibVersion:1.6.1"
  compile "org.apache.spark:spark-sql_$scalaLibVersion:1.6.1"
  compile "org.apache.spark:spark-streaming_$scalaLibVersion:1.6.1"
  compile "org.apache.hbase:hbase-server:1.1.1-mapr-1602-m7-5.1.0"
  compile "com.databricks:spark-xml_$scalaLibVersion:0.3.3"
  compile "com.databricks:spark-csv_$scalaLibVersion:1.4.0"
  compile "com.mapr.db:maprdb:5.1.0-mapr"
  compile "org.apache.spark:spark-hive_2.10:1.6.1"
  compile "org.mockito:mockito-core:1.9.5"
  compile "com.jcraft:jsch:0.1.53"
  compile "com.googlecode.json-simple:json-simple:1.1.1"
  compile "org.projectlombok:lombok:1.16.10"
  compile 'org.apache.poi:poi-ooxml:3.15'
  
  // https://mvnrepository.com/artifact/org.apache.commons/commons-io
  compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
  
  // Spring batch integration
  compile "org.springframework.boot:spring-boot-starter-batch:1.3.3.RELEASE"
  compile "org.springframework.data:spring-data-hadoop-boot:2.3.0.M2"
  compile "org.apache.spark:spark-yarn_2.10:1.6.1"
  
  // Fixed format text file parsing
  compile "com.ancientprogramming.fixedformat4j:fixedformat4j:1.2.2"

  compile "org.springframework.boot:spring-boot-starter-web:1.3.3.RELEASE"
  compile "org.springframework.boot:spring-boot-starter-actuator:1.3.3.RELEASE"
  compile "org.springframework.boot:spring-boot-starter-jetty:1.3.3.RELEASE"
  compile "org.springframework.cloud:spring-cloud-starter-config:1.1.0.RELEASE"
  compile "org.springframework.cloud:spring-cloud-starter-eureka:1.1.0.RELEASE"
  
  //jsoup for html parsing
  compile 'org.jsoup:jsoup:1.10.1'
  
  //Mist 
  compile group: 'io.hydrosphere', name: 'mist-lib-spark1_2.10', version: '0.11.0'
  
  //smokeTest
  compile group: 'net.sourceforge.jexcelapi', name: 'jxl', version: '2.6.12'
  compile group: 'org.testng', name: 'testng', version: '6.10'
  compile group: 'org.mvel', name: 'mvel2', version: '2.2.8.Final'
  compile group: 'org.apache.avro', name:'avro-mapred', version:'1.8.1'

  springBootJars group: 'org.springframework.boot', name: 'spring-boot-starter-parent', version: '1.3.0.M5'
  springBootJars group: 'org.springframework.boot', name: 'spring-boot-starter-batch', version: '1.3.3.RELEASE'
  springBootJars group: 'org.springframework.data', name: 'spring-data-hadoop-boot', version: '2.3.0.M2'
  springBootJars group: 'org.apache.hadoop', name: 'hadoop-common', version:'2.7.0-mapr-1506'
  springBootJars group: 'org.apache.spark', name: 'spark-yarn_2.10', version:'1.6.1'

  // Test
  testCompile("org.scalatest:scalatest_$scalaLibVersion:2.1.4")
  testCompile("junit:junit:4.11")

  testCompile("org.apache.hadoop:hadoop-hdfs:2.6.0")
  testCompile("org.apache.hadoop:hadoop-common:2.6.0")
  testCompile("org.apache.hadoop:hadoop-client:2.6.0")
  testCompile("org.apache.hadoop:hadoop-mapreduce-client-jobclient:2.6.0")
  testCompile("org.apache.hadoop:hadoop-yarn-server-tests:2.6.0")
  testCompile("org.apache.hadoop:hadoop-yarn-server-web-proxy:2.6.0")
  testCompile("com.holdenkarau:spark-testing-base_2.10:1.6.1_0.3.3")
  testCompile "org.apache.hadoop:hadoop-common:2.7.0"

  compile('ch.qos.logback:logback-classic:1.1.5') {
    exclude group: 'org.slf4j', module: 'slf4j-api' //by both name and group
 }

  compile('com.fasterxml.jackson.core:jackson-databind:2.4.6')
}

//Java compiler settings
tasks.withType(JavaCompile) {
    //ignore conjunction warning
    options.compilerArgs << '-Xlint:-options'
}

tasks.withType(ScalaCompile) {
  scalaCompileOptions.additionalParameters = ["-feature", "-language:implicitConversions", "-language:reflectiveCalls"]
  scalaCompileOptions.useAnt = false
}

sonarqube {
    properties {
		property "sonar.exclusions", "**/deploy/**,**/domain/**,**/fixedformat/**,**/repository/**,**/Constants.java,**/FileUploadUtility.java"
	}
}

sourceSets.main.java.srcDirs = []
sourceSets.main.scala.srcDirs = ["src/main/java","src/main/scala"]
sourceSets.test.scala.srcDirs = ["src/test/java","src/test/scala"]

shadowJar {
  zip64 true
   configurations = [project.configurations.compile , project.configurations.springBootJars]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment