Project exclude with gradle / sonar / Jacoco - gradle

So we have a build with 90+ sub-projects where it's often the case that the directory doesn't perfectly match the project name. In some cases we have empty project-less parent directories and in others the name just doesn't match the directory structure. For example, the sub-directory for project abc-toaster might be named just toaster. The error is:
The base directory of the module ':commons:thingamajig' does not exist:/dev/abc/:commons:thingamajig
...except there is no build.gradle in commons/thingamajig
How can I get Sonar around this? I've tried:
Putting an empty dummy build.gradle in commons/thingamajig - No dice. Same error.
Setting someModule.sonar.projectBaseDir as mentioned here: Sonar properties files
Running a full debug trace to see what pops up. Result: Nothing obvious.
Where am I hosing this up?
Example Update:
allprojects {
sonarqube {
file("$buildDir/classes").mkdirs();
properties {
property "sonar.exclusions", ["**/generated-src/**"]
property "sonar.projectName", "ABC"
property "sonar.projectKey", "$project.group:$project.name"
property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
property "sonar.projectBaseDir", "${project.rootDir}"
}
}
}
The above gives:
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.batch.scan.ProjectLock
...
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
...
Caused by: java.lang.IllegalStateException: The base directory of the module ':commons:thingamajig' does not exist: /dev/abc/:commons:thingamajig
Another update:
So I've figured out how to exclude projects that don't actually have any Java in them but get picked up by the Java plugin anyway. This has helped but I'm not out of the woods yet. I've also added this in an attempt to get the real value of the project's directory:
subprojects {
sonarqube {
println "*************"
println "$project.name"
properties.each {
println "$it.key, $it.value"
}
println "Project Dir: $projectDir"
println "Project Dir: $project.projectDir"
println "*************"
}
}
More on this in a bit.... OK... here is some debug level stuff:
15:49:31.419 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':sonarqube'.
15:49:31.512 [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /home/user/.sonar/cache
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Extract sonar-scanner-api-batch in temp...
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap index...
15:49:31.512 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Download: http://localhost:9000/batch_bootstrap/index
15:49:31.518 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap completed
15:49:31.519 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Create isolated classloader...
15:49:31.520 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Start temp cleaning...
15:49:31.521 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Temp cleaning done
15:49:31.521 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution getVersion
15:49:31.522 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution start
15:49:31.607 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Publish global mode
15:49:31.639 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] cache: /home/user/.sonar/ws_cache/http%3A%2F%2Flocalhost%3A9000/global
15:49:31.653 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load global repositories
15:49:31.730 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://localhost:9000/batch/global | time=75ms
15:49:31.761 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load global repositories (done) | time=109ms
15:49:31.778 [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /home/user/.sonar/cache
15:49:32.035 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load plugins index
15:49:32.036 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://localhost:9000/deploy/plugins/index.txt | time=1ms
15:49:32.037 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load plugins index (done) | time=2ms
15:49:32.037 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Load plugins
15:49:32.041 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Load plugins (done) | time=4ms
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin C# [csharp] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin Java [java] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin SVN [scmsvn] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
15:49:32.048 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] API compatibility mode is enabled on plugin JavaScript [javascript] (built with API lower than 5.2)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Plugins:
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * C# 4.4 (csharp)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * Java 3.10 (java)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * SVN 1.2 (scmsvn)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * Git 1.0 (scmgit)
15:49:32.092 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] * JavaScript 2.10 (javascript)
15:49:32.099 [INFO] [org.sonarqube.gradle.SonarQubeTask] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Work directory: /development/eas/build/sonar
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution getVersion
15:49:32.099 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Execution execute
15:49:32.237 [INFO] [org.sonarqube.gradle.SonarQubeTask] Process project properties
15:49:32.244 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':sonarqube'
15:49:32.244 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :sonarqube FAILED
15:49:32.244 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :sonarqube (Thread[Daemon worker Thread 22,5,main]) completed. Took 5.151 secs.
15:49:32.244 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 22,5,main]] finished, busy: 24.352 secs, idle: 0.053 secs
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter]
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter]
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:49:32.245 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarqube'.
Could be a missing or incorrect property if I'm reading this correctly. Is there a better way for me to dump these so I can check em?
OK, figured that out too:
gradle sonarqube -DsonarRunner.dumpToFile=out.properties
Nothing obvious in there though. I see where the project is failing but the value set for the base directory seems correct.
OK here is something really weird. If I run the above, I get:
BUILD SUCCESSFUL
...especially since it was not successful as far as I can tell.
OK I just found these and I've updated the debug level stuff:
property "sonar.verbose", "true"
property "sonar.log.level", "TRACE"
I still don't see anything pertinent there though.

sonarqube {
properties {
property "sonar.exclusions", "src/AbstractData.java,src/preprocessor/*.java,src/Service.java"
}
}
It's Worked for me, Try

Related

Sonarqube jenkins integration

I am triyng to intergate jenkins and maven with sonarqube.
I am completed with prerequistes and installation part
there is ome error related to class not loading, i am confused what is the reason behind this.
JENKINS PIPELINE
stage('Test & code quality check ') {
withMaven(maven: 'M3'){
withSonarQubeEnv(credentialsId:'mbk-sonar',installationName:'sonar-qube') {
sh '''mvn sonar:sonar -X -f /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/pom.xml \
-Dsonar.projectKey=mobikwik-jenkins \
-Dsonar.projectName=mobikwik-jenkins \
-Dsonar.host.url=https://sonar.mobikwik.com\ /
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.language=java \
-Dsonar.sources=/var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects/src/main/ \
-Dsonar.java.binaries=/opt/sonarqube/web/WEB-INF/classes'''
}
}
}
JENKINS CONSOLE OUTPUT- [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project root: Unable to load component class org.sonar.scanner.report.MetadataPublisher: Unable to load component class
Injecting SonarQube environment variables using the configuration: sonar-qube
[Pipeline] {
[Pipeline] sh
+ mvn sonar:sonar -X -f /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/pom.xml -Dsonar.projectKey=mobikwik-jenkins -Dsonar.projectName=mobikwik-jenkins -Dsonar.host.url=http://10.20.15.26:9000 -Dsonar.sourceEncoding=UTF-8 -Dsonar.language=java -Dsonar.sources=/var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects/src/main/ -Dsonar.java.binaries=/opt/sonarqube/web/WEB-INF/classes
----- withMaven Wrapper script -----
Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd"
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/M3
Java version: 1.8.0_222, vendor: Oracle Corporation, runtime: /usr/local/openjdk-8/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-11-amd64", arch: "amd64", family: "unix"
[DEBUG] Included /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/pipeline-maven-spy.jar
[DEBUG] Populating class realm maven.ext
[DEBUG] Included /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/pipeline-maven-spy.jar
[INFO] [jenkins-event-spy] Generate /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/maven-spy-20200912-110023-7696240343729296116878.log.tmp ...
[INFO] 11:00:26.484 Project key: mobikwik-jenkins
[INFO] 11:00:26.485 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc
[INFO] 11:00:26.485 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/target/sonar
[DEBUG] 11:00:26.486 Project global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.488 Creating module hierarchy
[DEBUG] 11:00:26.488 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.489 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc
[DEBUG] 11:00:26.489 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/target/sonar
[DEBUG] 11:00:26.490 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.490 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.490 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/cabs-api
[DEBUG] 11:00:26.491 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/cabs-api/target/sonar
[DEBUG] 11:00:26.491 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.492 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.492 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/core
[DEBUG] 11:00:26.492 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/core/target/sonar
[DEBUG] 11:00:26.493 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.493 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.494 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects
[DEBUG] 11:00:26.494 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects/target/sonar
[DEBUG] 11:00:26.495 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.495 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.495 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/mbk-service
[DEBUG] 11:00:26.496 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/mbk-service/target/sonar
[DEBUG] 11:00:26.496 Module global encoding: UTF-8, default locale: en
[INFO] 11:00:26.501 Load project settings for component key: 'mobikwik-jenkins'
[DEBUG] 11:00:26.522 GET 200 api/settings/values.protobuf?component=mobikwik-jenkins | time=20ms
[INFO] 11:00:26.523 Load project settings for component key: 'mobikwik-jenkins' (done) | time=22ms
[DEBUG] 11:00:26.530 No language available
[INFO] 11:00:26.537 Load quality profiles
[DEBUG] 11:00:26.550 GET 200 http://10.20.15.26:9000/api/qualityprofiles/search.protobuf?project=mobikwik-jenkins | time=12ms
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for root 1.6.0-SNAPSHOT:
[INFO]
[INFO] root ............................................... FAILURE [ 2.222 s]
[INFO] shared-objects ..................................... SKIPPED
[INFO] core ............................................... SKIPPED
[INFO] mbk-service ........................................ SKIPPED
[INFO] cabs-api ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.638 s
[INFO] Finished at: 2020-09-12T11:00:26Z
[INFO] ------------------------------------------------------------------------
[INFO] [jenkins-event-spy] Generated /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/maven-spy-20200912-110023-7696240343729296116878.log
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project root: Unable to load component class org.sonar.scanner.report.MetadataPublisher: Unable to load component class org.sonar.scanner.rule.QualityProfiles: No quality profiles have been found, you probably don't have any language plugin installed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project root: Unable to load component class org.sonar.scanner.report.MetadataPublisher
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
Caused by: org.sonar.api.utils.MessageException: No quality profiles have been found, you probably don't have any language plugin installed.
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[Pipeline] }
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
[withMaven] Publishers: Pipeline Graph Publisher: 2 ms, Dependencies Fingerprint Publisher: 68 ms, Open Task Scanner Publisher: 1 ms
It appears you have not installed any language plugins in SonarQube (not Jenkins).
org.sonar.scanner.rule.QualityProfiles: No quality profiles have been found, you probably don't have any language plugin installed. -> [Help 1]
As a SonarQube Admin, log into SonarQube. From the main menu, Administration | Marketplace ..., filter on "Languages" for Sonar provided languages, "External Analyzers" for third party. "Install" as necessary, Restart required.
As of 7.X, SQ will analyze all code for which a language analyzer is installed; language=java is ignored.

Spring Boot: Unable to Build With Gradle

I have created a simple spring-boot application with Java 11. Generated build.gradle file is as follow:
plugins {
id 'java'
id 'org.springframework.boot' version '2.1.3.RELEASE'
}
apply plugin: 'io.spring.dependency-management'
group = 'scratches'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
Upon executing gradlew build --debug the following error occurs:
09:25:19.482 [LIFECYCLE] [org.gradle.internal.logging.progress.ProgressLoggerFactory] > Configure project :
09:25:19.482 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure project :' started
09:25:19.482 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: acquired lock on :
09:25:19.482 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify beforeEvaluate listeners of :' started
09:25:19.483 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify beforeEvaluate listeners of :'
09:25:19.483 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify beforeEvaluate listeners of :' completed
09:25:19.485 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.build-init to root project 'java-11'' started
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :init' started
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :init'
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :init' completed
09:25:19.486 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.build-init to root project 'java-11''
09:25:19.487 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.build-init to root project 'java-11'' completed
09:25:19.489 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.wrapper to root project 'java-11'' started
09:25:19.495 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :wrapper' started
09:25:19.496 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :wrapper'
09:25:19.497 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :wrapper' completed
09:25:19.497 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.wrapper to root project 'java-11''
09:25:19.497 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.wrapper to root project 'java-11'' completed
09:25:19.499 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.help-tasks to root project 'java-11'' started
09:25:19.500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :help' started
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :help'
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :help' completed
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :projects' started
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :projects'
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :projects' completed
09:25:19.501 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :tasks' started
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :tasks'
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :tasks' completed
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :properties' started
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :properties'
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :properties' completed
09:25:19.502 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencyInsight' started
09:25:19.503 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependencyInsight'
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencyInsight' completed
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencies' started
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependencies'
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependencies' completed
09:25:19.504 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :buildEnvironment' started
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :buildEnvironment'
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :buildEnvironment' completed
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :components' started
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :components'
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :components' completed
09:25:19.505 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :model' started
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :model'
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :model' completed
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependentComponents' started
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Register task :dependentComponents'
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Register task :dependentComponents' completed
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply plugin org.gradle.help-tasks to root project 'java-11''
09:25:19.506 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply plugin org.gradle.help-tasks to root project 'java-11'' completed
09:25:19.507 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating root project 'java-11' using build file 'C:\Users\mohdrashidi.mohdzin\Downloads\java-11\build.gradle'.
09:25:19.507 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply script build.gradle to root project 'java-11'' started
09:25:19.514 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for workingDirs, path C:\Users\mohdrashidi.mohdzin\Downloads\java-11\.gradle\5.2.1\vcsMetadata-1\workingDirs.bin, access org.gradle.cache.internal.DefaultCacheAccess#5630d4e
09:25:19.518 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for md-supplier, path C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier\md-supplier.bin, access org.gradle.cache.internal.DefaultCacheAccess#2e1d1d95
09:25:19.518 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for cache directory md-supplier (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier)
09:25:19.521 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on cache directory md-supplier (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier).
09:25:19.522 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on cache directory md-supplier (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-supplier).
09:25:19.540 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for md-rule, path C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule\md-rule.bin, access org.gradle.cache.internal.DefaultCacheAccess#3cf2f8b9
09:25:19.540 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Acquiring file lock for cache directory md-rule (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule)
09:25:19.543 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on cache directory md-rule (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule).
09:25:19.544 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on cache directory md-rule (C:\Users\mohdrashidi.mohdzin\Workspace\gradle\.gradle\caches\5.2.1\md-rule).
09:25:19.545 [DEBUG] [org.gradle.internal.locking.LockFileReaderWriter] Lockfiles root: C:\Users\mohdrashidi.mohdzin\Downloads\java-11\gradle\dependency-locks
09:25:19.546 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve dependencies of detachedConfiguration1' started
09:25:19.549 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver] Resolving configuration 'detachedConfiguration1'
09:25:19.550 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.ResolvedArtifactCaches] Creating new in-memory cache for repo 'Gradle Central Plugin Repository' [da9e8315a8be71135c1df434dd1d5d54].
09:25:19.551 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder] Visiting configuration unspecified:unspecified:unspecified(detachedConfiguration1).
09:25:19.552 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver] Attempting to resolve component for org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.3.RELEASE using repositories [Gradle Central Plugin Repository]
09:25:19.553 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.553 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.556 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Download https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom' started
09:25:19.556 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource: https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.556 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP GET: https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom
09:25:19.557 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
09:25:19.558 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
09:25:19.558 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://plugins.gradle.org:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 20]
09:25:19.558 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 2][route: {s}->https://plugins.gradle.org:443][total kept alive: 0; route allocated: 1 of 20; total allocated: 1 of 20]
09:25:19.559 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://plugins.gradle.org:443
09:25:19.560 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to plugins.gradle.org/104.18.191.9:443
09:25:19.560 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Connecting socket to plugins.gradle.org/104.18.191.9:443 with timeout 30000
09:25:19.600 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled protocols: [TLSv1.3, TLSv1.2, TLSv1.1, TLSv1]
09:25:19.601 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled cipher suites:[TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]
09:25:19.601 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Starting handshake
09:25:19.689 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-2: Shutdown connection
09:25:19.689 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection discarded
09:25:19.689 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection released: [id: 2][route: {s}->https://plugins.gradle.org:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 20]
09:25:19.690 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Download https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom'
09:25:19.690 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Download https://plugins.gradle.org/m2/org/springframework/boot/org.springframework.boot.gradle.plugin/2.1.3.RELEASE/org.springframework.boot.gradle.plugin-2.1.3.RELEASE.pom' completed
09:25:19.697 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder] Flushing resolved configuration data in Binary store in C:\Users\mohdrashidi.mohdzin\AppData\Local\Temp\gradle4127330315613912958.bin. Wrote root 2.
09:25:19.702 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Resolve dependencies of detachedConfiguration1'
09:25:19.703 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve dependencies of detachedConfiguration1' completed
09:25:19.703 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Apply script build.gradle to root project 'java-11''
09:25:19.704 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Apply script build.gradle to root project 'java-11'' completed
09:25:19.704 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.197 secs
09:25:19.704 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify afterEvaluate listeners of :' started
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Notify afterEvaluate listeners of :'
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Notify afterEvaluate listeners of :' completed
09:25:19.705 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on :
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Configure project :'
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure project :' completed
09:25:19.705 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Configure build'
09:25:19.706 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Configure build' completed
09:25:19.707 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
09:25:19.707 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file 'C:\Users\mohdrashidi.mohdzin\Downloads\java-11\build.gradle' line: 8
09:25:19.708 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Plugin [id: 'org.springframework.boot', version: '2.1.3.RELEASE'] was not found in any of the following sources:
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] - Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.3.RELEASE')
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Searched in the following repositories:
09:25:19.709 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Gradle Central Plugin Repository
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
09:25:19.710 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:25:19.711 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
09:25:19.711 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
09:25:19.712 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 2s
You need to add:
buildscript {
repositories {
mavenCentral()
}
}
to the top of build.gradle

OFBiz task 'build' not found in root project 'ofbiz-release15.12'

> ➜ ofbiz-release15.12 ./gradlew build --debug
07:49:47.388 [INFO] [org.gradle.BuildLogger] Starting Build
07:49:47.411 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /Users/qk/.gradle
07:49:47.415 [DEBUG] [org.gradle.BuildLogger] Current dir: /Users/qk/Documents/workspace-neon/ofbiz-release15.12
07:49:47.418 [DEBUG] [org.gradle.BuildLogger] Settings file: null
07:49:47.422 [DEBUG] [org.gradle.BuildLogger] Build file: null
07:49:47.477 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources.
07:49:47.481 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave.
07:49:47.486 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: []
07:49:47.498 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: []
07:49:47.736 [DEBUG] [org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator] No local repository in Settings file defined. Using default path: /Users/qk/.m2/repository
07:49:48.088 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on buildscript class cache for settings file '/Users/qk/Documents/workspace-neon/ofbiz-release15.12/settings.gradle' (/Users/qk/.gradle/caches/2.0/scripts/settings_74ne66nuu6asrd265d84ulhlp3/SettingsScript/buildscript).
07:49:48.092 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
07:49:48.175 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on no_buildscript class cache for settings file '/Users/qk/Documents/workspace-neon/ofbiz-release15.12/settings.gradle' (/Users/qk/.gradle/caches/2.0/scripts/settings_74ne66nuu6asrd265d84ulhlp3/SettingsScript/no_buildscript).
07:49:48.177 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
07:49:48.345 [DEBUG] [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing: Processing settings took: 0.843 secs
07:49:48.349 [INFO] [org.gradle.BuildLogger] Settings evaluated using settings file '/Users/qk/Documents/workspace-neon/ofbiz-release15.12/settings.gradle'.
07:49:48.473 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /Users/qk/Documents/workspace-neon/ofbiz-release15.12/gradle.properties
07:49:48.475 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue!
07:49:48.478 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] Looking for project properties from: /Users/qk/Documents/workspace-neon/ofbiz-release15.12/framework/start/build/gradle.properties
07:49:48.480 [DEBUG] [org.gradle.initialization.ProjectPropertySettingBuildLoader] project property file does not exists. We continue!
07:49:48.484 [INFO] [org.gradle.BuildLogger] Projects loaded. Root project using empty build file.
07:49:48.487 [INFO] [org.gradle.BuildLogger] Included projects: [root project 'ofbiz-parent', project ':ofbiz-start']
07:49:49.344 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating root project 'ofbiz-parent' using empty build file.
07:49:49.385 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.038 secs
07:49:49.433 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating project ':ofbiz-start' using empty build file.
07:49:49.452 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.017 secs
07:49:49.456 [INFO] [org.gradle.BuildLogger] All projects evaluated.
07:49:49.501 [ERROR] [org.gradle.BuildExceptionReporter]
07:49:49.504 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
07:49:49.507 [ERROR] [org.gradle.BuildExceptionReporter]
07:49:49.508 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
07:49:49.512 [ERROR] [org.gradle.BuildExceptionReporter] Task 'build' not found in root project 'ofbiz-parent'.
07:49:49.515 [ERROR] [org.gradle.BuildExceptionReporter]
07:49:49.530 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
07:49:49.532 [ERROR] [org.gradle.BuildExceptionReporter] Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace.
07:49:49.535 [LIFECYCLE] [org.gradle.BuildResultLogger]
07:49:49.539 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
07:49:49.546 [LIFECYCLE] [org.gradle.BuildResultLogger]
07:49:49.549 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 3.664 secs
It is my first time using gradle and in ofbiz-release15.12 use gradlew to start the demo. It seems that all the tasks do not exist. I have /gradlew init build successful. How can I add the build task?
In OFBiz, Gradle has replaced Ant after the creation of the 15.12 branch.
In 15.12 you still have to use ant to build the system.
You can run:
./ant build
or you can get the list of tasks with:
./ant -p

Running mvn -pl Setup exec:exec gives error

After running mvn clean install, when I try to run mvn -pl setup exec:exec I get the following error:
[INFO] Scanning for projects... [INFO] [INFO]
------------------------------------------------------------------------ [INFO] Building sikulixsetup 1.1.1 [INFO]
------------------------------------------------------------------------ [INFO] [INFO] --- exec-maven-plugin:1.3.1:exec (default-cli) #
sikulixsetup --- [debug] RunTimeINIT: global init: entering as:
SETUP [debug] RunTimeINIT: ScreenDevice 0 has (0,0) --- will be
primary Screen(0) [debug] RunTimeINIT: Monitor 0: (0, 0) 1600 x
900 [debug] RunTimeINIT: runs as sikulixsetup-1.1.1-forsetup.jar
in:
C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master\Setup\target
[debug] RunTimeINIT: folder target detected - supposing Maven
project: C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master
***** show environment for SETUP (build 201605140512) user.home: C:\Users\bhowmik user.dir (work dir):
C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master\Setup
user.name: bhowmik java.io.tmpdir: C:\Users\bhowmik\AppData\Local\Temp
running 64Bit on Windows (6.1) in Maven project from some jar java
8-64 version 1.8.0_91-b14 vm 25.91-b14 class 52.0 arch amd64 app data
folder: C:\Users\bhowmik\AppData\Roaming\Sikulix libs folder: null
executing jar:
C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master\Setup\target\sikulixsetup-1.1.1-forsetup.jar
* classpath dump sikulix 0: /C:/Users/bhowmik/Downloads/TEST_NIGHTLY/SikuliX-2014-master/Setup/target/sikulixsetup-1.1.1-forsetup.jar
* classpath dump end
***** show environment end [debug] RunTimeSETUP: global init: leaving [debug] RunTimeSETUP: initAPI: entering [debug]
RunTimeSETUP: resourceList: enter [debug] RunTimeSETUP:
resourceLocation: (class org.sikuli.setup.RunSetup) /Lib/sikuli
[debug] RunTimeSETUP: resourceList: having jar:
jar:file:/C:/Users/bhowmik/Downloads/TEST_NIGHTLY/SikuliX-2014-master/Setup/target/sikulixsetup-1.1.1-forsetup.jar!/Lib/sikuli
[debug] RunTimeSETUP: files exported: 7 from: Lib/sikuli to:
C:\Users\bhowmik\AppData\Roaming\Sikulix\Lib\sikuli [debug]
RunTimeSETUP: initAPI: leaving [debug] RunTimeSETUP: exists libs
folder at:
C:\Users\bhowmik\AppData\Roaming\Sikulix\SikulixLibs_201605140512
[debug] RunTimeSETUP: libs folder empty or has wrong content
[debug] RunTimeSETUP: now exporting libs
* classpath dump 0: /C:/Users/bhowmik/Downloads/TEST_NIGHTLY/SikuliX-2014-master/Setup/target/sikulixsetup-1.1.1-forsetup.jar
* classpath dump end [error] RunTimeSETUP: *** terminating: libs to export not found on above classpath:
/sikulixlibs/windows/libs64 [debug] RunTimeSETUP: final cleanup
[debug] FileManager: deleteFileOrFolder:
C:\Users\bhowmik\AppData\Local\Temp\Sikulix_387398274 [INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 3.279 s [INFO] Finished at:
2016-05-14T11:10:34+05:30 [INFO] Final Memory: 13M/153M [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (default-cli) on
project sikulixsetup: Command execution failed. Process exited with an
error: 1 (Exit value: 1) -> [Help 1 ]

Error in `mvn jgitflow:release-finish` mutli-module build (due to wrong compilation order)

I'm trying to use JGitflow to create a release for my project. Unfortunately, when I run mvn jgitflow:release-finish, I get the following error:
Unable to find resource 'org.jorlib:jorlib-core:jar:1.0' in repository central (http://repo1.maven.org/maven2)
[WARNING] The dependency: org.jorlib:jorlib-core:jar:1.0 can't be resolved but has been found in the reactor.
I'm not sure how to resolve this. First I ran: mvn jgitflow:release-start which reported "Build Successfull". The result looks correct:
jkinable#daedalus:~/workspace/javaIDEA/jORLib/jorlib$ git branch -avv
development 07e4c1f [origin/development: ahead 3] updating poms for 1.1-SNAPSHOT development
master f3240f9 [origin/master] Updated pom.xml
*release/1.0 f3240f9 Updated pom.xml
Next I ran mvn jgitflow:release-finish which fails. It seems that it tries to download jorlib-core-1.0.jar but that is the file it is supposed to compile. Digging deeper into this, I ran mvn jgitflow:release-finish -e -X > ~/mygitflow.log
Here is part of the result:
[INFO] Building JORLib - Parent
[INFO] task-segment: [jgitflow:release-finish] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[DEBUG] org.jorlib:jorlib:pom:1.0-SNAPSHOT (selected for null)
[DEBUG] org.jorlib:jorlib-core:jar:1.0-SNAPSHOT (selected for null)
[DEBUG] junit:junit:jar:4.12:test (selected for test)
[DEBUG] Retrieving parent-POM: org.hamcrest:hamcrest-parent:pom:1.3 for project: null:hamcrest-core:jar:null from the repository.
[DEBUG] org.hamcrest:hamcrest-core:jar:1.3:test (selected for test)
[DEBUG] Retrieving parent-POM: org.jgrapht:jgrapht:pom:0.9.0 for project: null:jgrapht-core:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:jgrapht-core
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-ext:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-demo:jar:0.9.0
[DEBUG] xmlunit:xmlunit:jar:1.3:test
[DEBUG] junit:junit:jar:4.10:test
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0:compile (selected for compile)
[DEBUG] Retrieving parent-POM: com.google.guava:guava-parent:pom:14.0.1 for project: null:guava:bundle:null from the repository.
[DEBUG] com.google.guava:guava:jar:14.0.1:compile (selected for compile)
[DEBUG] Retrieving parent-POM: ch.qos.logback:logback-parent:pom:0.9.28 for project: null:logback-classic:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:logback-classic
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28:compile (selected for compile)
[DEBUG] Adding managed dependencies for unknown:logback-core
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] Retrieving parent-POM: org.slf4j:slf4j-parent:pom:1.6.1 for project: org.slf4j:slf4j-api:jar:null from the repository.
[DEBUG] Adding managed dependencies for org.slf4j:slf4j-api
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] org.slf4j:slf4j-jdk14:jar:1.6.1
[DEBUG] log4j:log4j:jar:1.2.16
[DEBUG] ch.qos.cal10n:cal10n-api:jar:0.7.4
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] WARNING: A dependency of the current project (or of one the plugins used in its build) was found in the reactor,
but had not been built at the time it was requested. It will be resolved from the repository instead.
Current Project: JORLib - Demo
Requested Dependency: org.jorlib:jorlib-core:jar:1.0-SNAPSHOT
NOTE: You may need to run this build to the 'compile' lifecycle phase, or farther, in order to build the dependency artifact.
The module jorlib-demo depends on jorlib-core, so it must first compile jorlib-core before it compiles jorlib-demo. For some reason this doesn't happen. As a result, it searches for jorlib-core in some external depository and fails eventually because it couldn't find it.
My parent pom: parent pom
The pom in jorlib-core: pom jorlib-core
The pom in jorlib-demo: pom jorlib-demo
It turns out that this problem is caused by my Maven version. My system runs Java 1.8.0_45 and Apache Maven 2.2.1 (rdebian-8). At the time of writing, the latter Maven version is shipped by default with the latest Ubuntu LTS (14.04.2) release. I have now upgraded to Apache Maven 3.2.1. After upgrading to Maven 3, I did run into the following error message while executing jgitflow:release-finish:
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/java-8-oracle/bin/java/bin/java
This effectively prohibited the code from being compiled. Notice the weird bin/java/bin/java part. I double checked my $JAVA_HOME which correctly pointed to /usr/lib/jvm/java-8-oracle/. A solution to this issue can be found here: Having JAVA_HOME inconsistency issue with maven
I simply created a file called .mavenrc in my home folder which contained: export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Now the Jgitflow plugin is working well.

Resources