> ➜ 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
Related
Having
Windows 10
Linux Ubuntu 18.04
Mac El Capitan
All of them with Gradle installed with the unique version 6.7.1
All these OS have the following:
custom GRADLE_HOME location (therefore the .gradle default location is not used)
custom GRADLE_USER_HOME location (therefore the .gradle default location is not used)
A wrapper-incubator simple directory (empty) that is used to execute just the two commands mentioned later just below.
For Windows and Linux:
When the following commands are executed:
gradle wrapper (generates the expected files)
gralew --version (downloads the gradle wrapper to GRADLE_USER_HOME/wrapper/dists)
All work fine.
The problem is with Mac. It always happens the following with the gradle wrapper command (--debug used):
...
2020-12-09T15:03:18.049-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-12-09T15:03:18.049-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-12-09T15:03:18.049-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-12-09T15:03:18.050-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-12-09T15:03:18.050-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-12-09T15:03:18.050-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-12-09T15:03:19.325-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:19.581-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:21.431-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:22.210-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:22.686-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:24.388-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:26.167-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:27.169-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:28.047-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-12-09T15:03:28.047-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-12-09T15:03:28.047-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-12-09T15:03:28.048-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-12-09T15:03:28.048-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-12-09T15:03:28.049-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-12-09T15:03:29.095-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:30.096-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
2020-12-09T15:03:30.099-0500 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
2020-12-09T15:03:30.099-0500 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
2020-12-09T15:03:30.101-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-12-09T15:03:30.103-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build completed with 2 failures.
2020-12-09T15:03:30.106-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-12-09T15:03:30.106-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 1: Task failed with an exception.
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] -----------
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Gradle could not start your build.
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not create service of type ComponentMetadataRuleExecutor using DependencyManagementBuildScopeServices.createComponentMetadataRuleExecutor().
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Timeout waiting to lock cache directory md-rule (/Volumes/FP27072011/gradle/repository/caches/6.7.1/md-rule). It is currently in use by another Gradle instance.
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Owner PID: unknown
2020-12-09T15:03:30.107-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Our PID: 959
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Owner Operation: unknown
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Our operation:
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Lock file: /Volumes/FP27072011/gradle/repository/caches/6.7.1/md-rule/md-rule.lock
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
2020-12-09T15:03:30.108-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ==============================================================================
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2: Task failed with an exception.
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] -----------
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Timeout waiting to lock artifact cache (/Volumes/FP27072011/gradle/repository/caches/modules-2). It is currently in use by another Gradle instance.
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Owner PID: unknown
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Our PID: 959
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Owner Operation: unknown
2020-12-09T15:03:30.109-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Our operation:
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Lock file: /Volumes/FP27072011/gradle/repository/caches/modules-2/modules-2.lock
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ==============================================================================
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
2020-12-09T15:03:30.110-0500 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
2020-12-09T15:03:30.111-0500 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 2m 4s
2020-12-09T15:03:30.114-0500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Build finished for file system watching' started
2020-12-09T15:03:30.115-0500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Build finished for file system watching'
2020-12-09T15:03:30.115-0500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Build finished for file system watching' completed
2020-12-09T15:03:30.115-0500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Run build'
2020-12-09T15:03:30.115-0500 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Run build' completed
2020-12-09T15:03:30.188-0500 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-supplier (/Volumes/FP27072011/gradle/repository/caches/6.7.1/md-supplier)
2020-12-09T15:03:30.188-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-supplier (/Volumes/FP27072011/gradle/repository/caches/6.7.1/md-supplier).
2020-12-09T15:03:30.206-0500 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Configuration Cache (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/configuration-cache) was closed 0 times.
2020-12-09T15:03:30.217-0500 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
2020-12-09T15:03:30.217-0500 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
2020-12-09T15:03:30.218-0500 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/6.7.1/fileHashes)
2020-12-09T15:03:30.218-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/6.7.1/fileHashes).
2020-12-09T15:03:30.219-0500 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for checksums cache (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/checksums)
2020-12-09T15:03:30.219-0500 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on checksums cache (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/checksums).
2020-12-09T15:03:30.220-0500 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS Checkout Cache (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/vcs-1) was closed 0 times.
2020-12-09T15:03:30.220-0500 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS metadata (/Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle/6.7.1/vcsMetadata-1) was closed 0 times.
2020-12-09T15:03:30.242-0500 [DEBUG] [org.gradle.cache.internal.VersionSpecificCacheCleanupAction] Processed version-specific caches at /Users/manueljordan/whiteroom/gradle/wrapper-incubator/.gradle for cleanup in 0.02 secs
2020-12-09T15:03:30.252-0500 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
2020-12-09T15:03:30.343-0500 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput#5b4e669a
2020-12-09T15:03:30.343-0500 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 20: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
2020-12-09T15:03:30.344-0500 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Success[value=org.gradle.launcher.exec.BuildActionResult#75d0911a] from daemon DaemonInfo{pid=959, address=[7fd2a6a1-ecb0-4f97-b150-d5e6a1705f55 port:49491, addresses:[/127.0.0.1]], state=Busy, lastBusy=1607544088030, context=DefaultDaemonContext[uid=c48c63f2-8b5a-4580-8a89-d85e12aefdd1,javaHome=/Library/Java/JavaVirtualMachines/openjdk-11.0.9.1+1/Contents/Home,daemonRegistryDir=/Volumes/FP27072011/gradle/repository/daemon,pid=959,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=PE,-Duser.language=en,-Duser.variant]} (build should be done).
2020-12-09T15:03:30.344-0500 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
2020-12-09T15:03:30.344-0500 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
2020-12-09T15:03:30.349-0500 [LIFECYCLE] [org.gradle.launcher.cli.DebugLoggerWarningAction]
#############################################################################
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Debug level logging will leak security sensitive information!
https://docs.gradle.org/6.7.1/userguide/logging.html#sec:debug_security
#############################################################################
I have the same situation even:
Mac is re started
GRADLE_USER_HOME location is deleted and created
gradle --stop is executed
When I execute the gradle --status command I get:
gradle --status
PID STATUS INFO
959 IDLE 6.7.1
874 STOPPED (stop command received)
BTW - For each and after of gradle wrapper execution a new daemon is created and remains in IDLE, for the next execution I must execute gradle --stop just to be sure no daemon is running around and theoretically avoid deadlocks
I read the following links:
It is currently in use by another Gradle instance
Cache It is currently in use by another Gradle instance
For the ps -A | grep gradle command shows:
ps -A | grep gradle
959 ?? 0:14.90 /Library/Java/JavaVirtualMachines/openjdk-11.0.9.1+1/Contents/Home/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=PE -Duser.language=en -Duser.variant -cp /Users/manueljordan/whiteroom/gradle/6.7.1/lib/gradle-launcher-6.7.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.7.1
997 ttys000 0:00.00 grep gradle
From above not sure why Java appears.
BTW
The same command on Linux shows nothing.
The 3 OS have the same Java version
How to resolve this situation?
I am creating a deployment script in gradle. I need to zip up my application in order to upload it to s3 and deploy a revision via code deploy. I can manually run zip -r Archive.zip * to achieve this. However when I try to run the same command in gradle I get an error, please see debug log below.
Task:
task zip {
doLast {
exec {
workingDir '.'
commandLine 'zip', '-r', 'Archive.zip', '*'
}
}
}
Log:
13:01:24.961 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
13:01:24.961 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command 'zip'.
13:01:24.987 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
13:01:24.988 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
13:01:24.988 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'zip''
13:01:25.018 [QUIET] [system.out]
13:01:25.018 [QUIET] [system.out] zip error: Nothing to do! (try: zip -r Archive.zip . -i *)
13:01:25.019 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
13:01:25.019 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'zip'' finished with exit value 12 (state: FAILED)
13:01:25.019 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :zip'
13:01:25.019 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
13:01:25.020 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':zip'
13:01:25.020 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Task :zip'
13:01:25.020 [null] [org.gradle.internal.progress.DefaultBuildOperationExecutor]
13:01:25.020 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :zip' completed
13:01:25.020 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :zip (Thread[Task worker for ':',5,main]) completed. Took 0.063 secs.
13:01:25.020 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.2 completed (1 worker(s) in use)
13:01:25.020 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on root.1.2
13:01:25.020 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on :
13:01:25.020 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.063 secs, idle: 0.002 secs
12:56:42.933 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Build file '/app/build.gradle' line: 50
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':zip'.
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Process 'command 'zip'' finished with non-zero exit value 12
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
12:56:42.935 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 0s
There's a clear message printed to stdout in your logs:
13:01:25.018 [QUIET] [system.out] zip error: Nothing to do! (try: zip
-r Archive.zip . -i *)
Your command is invalid.
Also.. There's no need to run zip manually in gradle. There's a predefined task for that.
The following task resolved my issue:
task zip {
doLast {
exec {
workingDir '.'
commandLine 'zip', '-r', 'Archive.zip', '.'
}
}
}
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 ]
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
After updating my jenkins server xcode version to 6, i got the following error.
Pods-Facebook-iOS-SDK.build/Objects-normal/armv7/FBShareDialogParams.o Facebook-iOS-SDK/src/DeviceAPI/FBShareDialogParams.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
22:35:31.397 [DEBUG] [org.openbakery.CommandRunner] (1 failure)
22:35:31.463 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':build'
22:35:31.463 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :build FAILED
22:35:31.463 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :build (Thread[main,5,main]) completed. Took 37.493 secs.
22:35:31.464 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 1 mins 9.044 secs, idle: 0.01 secs
22:35:31.718 [ERROR] [org.gradle.BuildExceptionReporter]
22:35:31.719 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
22:35:31.719 [ERROR] [org.gradle.BuildExceptionReporter]
22:35:31.719 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
22:35:31.719 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':build'.
Anyone came across such an issue.
Also while building I got the warning ,
22:34:27.447 [QUIET] [system.out] [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
22:34:27.447 [QUIET] [system.out] See https://github.com/CocoaPods/guides.cocoapods.org/issues/26 for
Is this causing the issue ?
I found what the issue was.
I was using Pod file, where facebook SDK's version was 3.12.
When updated it to ,pod 'Facebook-iOS-SDK', '3.18.2' it worked fine.