Errors on Zap quick start build

98 views
Skip to first unread message

Dan Shiebler

unread,
Dec 3, 2023, 11:55:18 AM12/3/23
to ZAP User Group
Hello, I am following the instructions for the Zap quick start build https://www.zaproxy.org/docs/developer/quick-start-build/

After pulling the zap-extensions repo from github and running `./gradlew tasks --info` I see the following error trace
```

(env) MacBook-Pro:zap-extensions danshiebler$ ./gradlew tasks  --info

Initialized native services in: /Users/danshiebler/.gradle/native

Initialized jansi services in: /Users/danshiebler/.gradle/native

Received JVM installation metadata from '/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home': {JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home, JAVA_VERSION=21.0.1, JAVA_VENDOR=Eclipse Adoptium, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=21.0.1+12-LTS, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=21.0.1+12-LTS, VM_VENDOR=Eclipse Adoptium, OS_ARCH=aarch64}

Found daemon DaemonInfo{pid=65212, address=[d2dedc13-6586-478e-86ff-dd2eee435dbb port:64157, addresses:[/127.0.0.1]], state=Idle, lastBusy=1701616446095, context=DefaultDaemonContext[uid=6e81b452-f908-4140-9a16-120f2329aa2b,javaHome=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home,daemonRegistryDir=/Users/danshiebler/.gradle/daemon,pid=65212,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,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,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=utf8,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.

At least one daemon option is different.

Wanted: DefaultDaemonContext[uid=null,javaHome=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home,daemonRegistryDir=/Users/danshiebler/.gradle/daemon,pid=991,idleTimeout=null,priority=NORMAL,applyInstrumentationAgent=true,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,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]

Actual: DefaultDaemonContext[uid=6e81b452-f908-4140-9a16-120f2329aa2b,javaHome=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home,daemonRegistryDir=/Users/danshiebler/.gradle/daemon,pid=65212,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,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,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=utf8,-Duser.country=US,-Duser.language=en,-Duser.variant]


  Looking for a different daemon...

The client will now receive all logging from the daemon (pid: 64055). The daemon log file: /Users/danshiebler/.gradle/daemon/8.2.1/daemon-64055.out.log

Starting 28th build in daemon [uptime: 3 hrs 38 mins 15.909 secs, performance: 99%, GC rate: 0.00/s, heap usage: 2% of 512 MiB, non-heap usage: 52% of 384 MiB]

Using 12 worker leases.

Now considering [/Users/danshiebler/workspace/personal/pentesting/zap-extensions, /Users/danshiebler/workspace/personal/pentesting/zap-extensions/buildSrc] as hierarchies to watch

Now considering [/Users/danshiebler/workspace/personal/pentesting/zap-extensions/buildSrc, /Users/danshiebler/workspace/personal/pentesting/zap-extensions] as hierarchies to watch

Watching the file system is configured to be enabled if available

File system watching is active

Starting Build

The configuration classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

Settings evaluated using settings file '/Users/danshiebler/workspace/personal/pentesting/zap-extensions/settings.gradle.kts'.

Using local directory build cache for the root build (location = /Users/danshiebler/.gradle/caches/build-cache-1, removeUnusedEntriesAfter = 7 days).

Skipping generation of dependency accessors for libs as it is up-to-date.

Projects loaded. Root project using build file '/Users/danshiebler/workspace/personal/pentesting/zap-extensions/build.gradle.kts'.

Included projects: [root project 'zap-extensions', project ':addOns', project ':testutils', project ':addOns:accessControl', project ':addOns:alertFilters', project ':addOns:allinonenotes', project ':addOns:ascanrules', project ':addOns:ascanrulesAlpha', project ':addOns:ascanrulesBeta', project ':addOns:authhelper', project ':addOns:authstats', project ':addOns:automation', project ':addOns:beanshell', project ':addOns:browserView', project ':addOns:bruteforce', project ':addOns:bugtracker', project ':addOns:callgraph', project ':addOns:callhome', project ':addOns:client', project ':addOns:codedx', project ':addOns:commonlib', project ':addOns:coreLang', project ':addOns:custompayloads', project ':addOns:database', project ':addOns:dev', project ':addOns:diff', project ':addOns:directorylistv1', project ':addOns:directorylistv2_3', project ':addOns:directorylistv2_3_lc', project ':addOns:domxss', project ':addOns:encoder', project ':addOns:evalvillain', project ':addOns:exim', project ':addOns:formhandler', project ':addOns:frontendscanner', project ':addOns:fuzz', project ':addOns:fuzzdb', project ':addOns:gettingStarted', project ':addOns:graaljs', project ':addOns:graphql', project ':addOns:groovy', project ':addOns:highlighter', project ':addOns:imagelocationscanner', project ':addOns:invoke', project ':addOns:jruby', project ':addOns:jsonview', project ':addOns:jython', project ':addOns:kotlin', project ':addOns:network', project ':addOns:oast', project ':addOns:onlineMenu', project ':addOns:openapi', project ':addOns:packpentester', project ':addOns:packscanrules', project ':addOns:paramdigger', project ':addOns:plugnhack', project ':addOns:portscan', project ':addOns:postman', project ':addOns:pscanrules', project ':addOns:pscanrulesAlpha', project ':addOns:pscanrulesBeta', project ':addOns:quickstart', project ':addOns:regextester', project ':addOns:replacer', project ':addOns:reports', project ':addOns:requester', project ':addOns:retest', project ':addOns:retire', project ':addOns:reveal', project ':addOns:revisit', project ':addOns:saml', project ':addOns:scripts', project ':addOns:selenium', project ':addOns:sequence', project ':addOns:simpleexample', project ':addOns:soap', project ':addOns:spider', project ':addOns:spiderAjax', project ':addOns:sqliplugin', project ':addOns:sse', project ':addOns:svndigger', project ':addOns:tips', project ':addOns:todo', project ':addOns:tokengen', project ':addOns:treetools', project ':addOns:viewstate', project ':addOns:wappalyzer', project ':addOns:webdrivers', project ':addOns:websocket', project ':addOns:zest', project ':addOns:webdrivers:webdriverlinux', project ':addOns:webdrivers:webdrivermacos', project ':addOns:webdrivers:webdriverwindows']

The configuration classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.


> Configure project :buildSrc

Evaluating project ':buildSrc' using build file '/Users/danshiebler/workspace/personal/pentesting/zap-extensions/buildSrc/build.gradle.kts'.

Build cache key for Kotlin DSL plugin specs accessors for classpath '83af3f3f4792830493c0e9ef36c6f86b' is 35e8c3350fa0eabc79268bf3be1a3c1d

Skipping Kotlin DSL plugin specs accessors for classpath '83af3f3f4792830493c0e9ef36c6f86b' as it is up-to-date.

Build cache key for Kotlin DSL script compilation (Project/TopLevel/stage1) is d4276175aa93bf371aa8a5041a7d6a2e

Kotlin DSL script compilation (Project/TopLevel/stage1) is not up-to-date because:

  No history is available.

Stored cache entry for Kotlin DSL script compilation (Project/TopLevel/stage1) with cache key d4276175aa93bf371aa8a5041a7d6a2e

The configuration detachedConfiguration1 is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration detachedConfiguration1 is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration detachedConfiguration1 is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration detachedConfiguration1 is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration detachedConfiguration2 is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration detachedConfiguration2 is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration detachedConfiguration2 is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration detachedConfiguration2 is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration :buildSrc:classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration :buildSrc:classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration :buildSrc:classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.

The configuration :buildSrc:classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

Using Kotlin Gradle Plugin gradle76 variant

kotlin scripting plugin: created the scripting discovery configuration: kotlinScriptDef

kotlin scripting plugin: created the scripting discovery configuration: testKotlinScriptDef

Build cache key for Kotlin DSL accessors for project ':buildSrc' is e212a9d4107736c5a31760a2275f7d6c

Skipping Kotlin DSL accessors for project ':buildSrc' as it is up-to-date.

Build cache key for Kotlin DSL script compilation (Project/TopLevel/stage2) is f0883fb52dc8551c9f739196727c533a

Kotlin DSL script compilation (Project/TopLevel/stage2) is not up-to-date because:

  No history is available.

Stored cache entry for Kotlin DSL script compilation (Project/TopLevel/stage2) with cache key f0883fb52dc8551c9f739196727c533a

The configuration :buildSrc:mainSourceElements is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

Resolve mutations for :buildSrc:compileKotlin (Thread[#1137,Execution worker,5,main]) started.

:buildSrc:compileKotlin (Thread[#1147,Execution worker Thread 11,5,main]) started.


> Task :buildSrc:compileKotlin FAILED


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':buildSrc:compileKotlin'.

> Error while evaluating property 'compilerOptions.jvmTarget' of task ':buildSrc:compileKotlin'.

   > Failed to calculate the value of property 'jvmTarget'.

      > Unknown Kotlin JVM target: 21


* Try:

> Run with --stacktrace option to get the stack trace.

> Run with --debug option to get more log output.

> Run with --scan to get full insights.

> Get more help at https://help.gradle.org.


BUILD FAILED in 1s

1 actionable task: 1 executed

Watched directory hierarchies: [/Users/danshiebler/workspace/personal/pentesting/zap-extensions]
```

thc...@gmail.com

unread,
Dec 3, 2023, 1:24:56 PM12/3/23
to zaprox...@googlegroups.com
Hi,

Use other Java version than 21 (e.g. 11). Version 21 is not supported by
the Gradle version in use (that's being changed).


For dev related questions it is better to use:
https://groups.google.com/group/zaproxy-develop

Best regards.
Reply all
Reply to author
Forward
0 new messages