maven dependency:purge-local-repository causing dependency resolution errors - java

I have a parent Jenkins job (my-build-all) that invokes 2 child-maven-build-jobs (my-services followed by my-internal-api) in serial (wait for previous to finish before starting next).
Both builds happen on same machine and they share the local repo.
my-internal-api depends on my-services.
my-internal-api is built with goals: dependency:purge-local-repository clean install.
my-internal-api fails with Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:purge-local-repository (default-cli) on project my-internal-api: Failed to refresh project dependencies for: com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT: required artifacts missing:....com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT....for the artifact:....com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT
I know for sure that at the end of my-services job, snapshot jar was built and pushed to Artifactory.
Here is the log from my-services build:
[main] INFO org....ExecutionEventLogger - --- maven-install-plugin:2.4:install (default-install) # my-services ---
[main] INFO org....PlexusContainer - Installing /home/ec2-user/workspace/my/Test/1. my-service/target/my-services-1.0-r0.0-SNAPSHOT.jar to /home/ec2-user/.m2/repository/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.jar
[main] INFO org....PlexusContainer - Installing /home/ec2-user/workspace/my/Test/1. my-service/dependency-reduced-pom.xml to /home/ec2-user/.m2/repository/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.pom
[main] INFO org....BuildInfoClientBuilder - Deploying artifact: http://artifactory.xxx.local/artifactory/libs-snapshot-local/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.jar
[main] INFO org....BuildInfoClientBuilder - Deploying artifact: http://artifactory.xxx.local/artifactory/libs-snapshot-local/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.pom
[main] INFO org....ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org....ExecutionEventLogger - BUILD SUCCESS
[main] INFO org....ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org....ExecutionEventLogger - Total time: 35.123 s
[main] INFO org....ExecutionEventLogger - Finished at: 2018-05-03T20:18:21+00:00
[main] INFO org....ExecutionEventLogger - Final Memory: 37M/432M
[main] INFO org....ExecutionEventLogger - ------------------------------------------------------------------------
[Pipeline] stage (Push Artifactory)
Using the ‘stage’ step without a block argument is deprecated
Entering stage Push Artifactory
Proceeding
[Pipeline] publishBuildInfo
Deploying build info to: http://artifactory.xxx.local/artifactory/api/build
Build successfully deployed. Browse it in Artifactory under http://artifactory.xxx.local/artifactory/webapp/builds/my%20::%20Test%20::%201.%20my-service/125
It works fine when I:
run with -U clean install instead OR
start the jenkins job to build my-internal-api from the Jenkins UI.
Here is the log excerpt:
Started by upstream project "my/Test/0. my-build-all" build number 5
+ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /home/ec2-user/tools/hudson.tasks.Maven_MavenInstallation/M3
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.37.amzn1.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.23-31.54.amzn1.x86_64", arch: "amd64", family: "unix"
Artifactory integration is enabled
[6. my-internal-api-mainline] $ java -classpath /home/ec2-user/tools/hudson.tasks.Maven_MavenInstallation/M3/boot/plexus-classworlds-2.5.2.jar -Dmaven.home=/home/ec2-user/tools/hudson.tasks.Maven_MavenInstallation/M3 -DbuildInfoConfig.propertiesFile=/tmp/buildInfo2752604435492193670.properties -Dm3plugin.lib=/home/ec2-user/cache/artifactory-plugin/2.10.3 -Dclassworlds.conf=/tmp/classworlds7843212232814826583conf "-Dmaven.multiModuleProjectDirectory=/home/ec2-user/workspace/my/Test/6. my-internal-api-mainline" org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml -X dependency:purge-local-repository clean install
[main] DEBUG org....DefaultUpdateCheckManager - Skipped remote request for com.kashyap:my-services:1.0-r0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date.
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Resolved artifact: com.kashyap:my-services:pom:1.0-r0.0-SNAPSHOT:project from: /home/ec2-user/.m2/repository (enhanced) Context is: project
[main] DEBUG org....DefaultUpdateCheckManager - Skipped remote request for com.kashyap:my-services:1.0-r0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date.
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Resolved artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT:project from: /home/ec2-user/.m2/repository (enhanced) Context is: project
[main] INFO org....PurgeLocalRepositoryMojo - Purging artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] INFO org....PurgeLocalRepositoryMojo - Deleting: /home/ec2-user/.m2/repository/com/kashyap/my-services/1.0-r0.0-SNAPSHOT
[main] DEBUG org....DefaultArtifactResolver - com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT:compile (selected for compile)
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Could not resolve artifact: com.kashyap:my-services:pom:1.0-r0.0-SNAPSHOT:project
[main] INFO org....plugin.dependency.PurgeLocalRepositoryMojo - Could not find artifact com.kashyap:my-services:pom:1.0-r0.0-SNAPSHOT
[main] INFO org.apache.maven.plugin.dependency.PurgeLocalRepositoryMojo - Resolving artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Could not resolve artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT:project
[main] INFO org....plugin.dependency.PurgeLocalRepositoryMojo - Could not find artifact com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] ERROR org....cli.MavenCli - Failed to execute goal org....plugins:maven-dependency-plugin:2.8:purge-local-repository (default-cli) on project my-internal-api: Failed to refresh project dependencies for: com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT: required artifacts missing:
[main] ERROR org....cli.MavenCli - com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] ERROR org....cli.MavenCli - for the artifact:
[main] ERROR org....cli.MavenCli - com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT
Any idea why maven is:
finding local snapshot version of my-services to be up to date
purging/deleting it and then
complaining that it couldn't resolve it (though I think it's during the re-resolution as part of purge-local-repository goal, not as part of compile goal).

Related

Android studio project build error: Linking CXX shared FAILED

I'm asking for help in building a project for Android (my knowledge in this tends to 0).
There is a rather old project. I'm trying to build it in AndroidStudio, I get the following error:
Build command failed.
Error while executing process C:\Users\User\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C C:\Users\User\IdeaProjects\1\stouch-task-hardware-upgrade-investigation\app.cxx\RelWithDebInfo\2a9512e2\armeabi-v7a stouch}
ninja: Entering directory `C:\Users\User\IdeaProjects\1\stouch-task-hardware-upgrade-investigation\app.cxx\RelWithDebInfo\2a9512e2\armeabi-v7a'
[1/1] Linking CXX shared library ........\build\intermediates\cxx\RelWithDebInfo\2a9512e2\obj\armeabi-v7a\libstouch.so
I tried different versions of studio, java, gradle but the result is always the same.
How do I fix it?
Update:
2023-01-12 23:41:37,079 [e-1136-b06] WARN -
ea.gradle.project.sync.SdkSync - Replacing invalid NDK path
C:\Users\User\AppData\Local\Android\Sdk\ndk-bundle with
C:\Users\User\AppData\Local\Android\Sdk\ndk-bundle 2023-01-12
23:41:37,079 [e-1136-b06] INFO - e.project.sync.GradleSyncState -
Started sync with Gradle for project 'stouch'. 2023-01-12
23:41:37,080 [e-1136-b06] INFO - idea.project.IndexingSuspender -
Consuming IndexingSuspender activation event: SYNC_STARTED 2023-01-12
23:41:37,080 [e-1136-b06] INFO - idea.project.IndexingSuspender -
Starting batch update for project: Project
'C:\Users\User\IdeaProjects\AS\9\stouch' stouch 2023-01-12
23:41:37,087 [thread 116] INFO - s.plugins.gradle.GradleManager -
Instructing gradle to use java from C:/Program Files/Android/Android
Studio/jre 2023-01-12 23:41:37,088 [thread 116] INFO -
s.plugins.gradle.GradleManager - Instructing gradle to use java from
C:/Program Files/Android/Android Studio/jre 2023-01-12 23:41:37,101
[thread 116] INFO - xecution.GradleExecutionHelper - Passing
command-line args to Gradle Tooling API: -Didea.version=3.2
-Djava.awt.headless=true -Pandroid.injected.build.model.only=true -Pandroid.injected.build.model.only.advanced=true -Pandroid.injected.invoked.from.ide=true -Pandroid.injected.build.model.only.versioned=3 -Pandroid.injected.studio.version=3.2.1.0 -Pandroid.builder.sdkDownload=false --init-script C:\Users\User\AppData\Local\Temp\ijinit17.gradle 2023-01-12
23:41:37,770 [thread 116] INFO - .project.GradleProjectResolver -
Gradle project resolve error org.gradle.tooling.BuildException: Could
not run build action using Gradle distribution
'https://services.gradle.org/distributions/gradle-4.2-all.zip'. at
org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
at
org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at
org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)

intellij running serenity cucumber tests

I downloaded this test project to learn screenplay with serenity and cucumber
https://github.com/serenity-bdd/screenplay-pattern-todomvc
I can do clean verify with different profiles on command line as the readme suggests
If I load the same project in intellij and try to run one feature , it results in to NPE
Is there any intellij setting I am missing to run these?
C:\Apps\Java\jdk8\bin\java -Dorg.jetbrains.run.directory=C:\share\_11\__Serenity\screenplay-pattern-todomvc-master\src\test\resources\features\record_todos -Didea.launcher.port=7534 -Didea.launcher.bin.path=C:\Apps\IntelliJIDEA20162\bin -Dfile.encoding=UTF-8 -classpath C:\Apps\Java\jdk8\jre\lib\charsets.jar;C:\Apps\Java\jdk8\jre\lib\deploy.jar;C:\Apps\Java\jdk8\jre\lib\ext\access-bridge-64.jar;C:\Apps\Java\jdk8\jre\lib\ext\cldrdata.jar;C:\Apps\Java\jdk8\jre\lib\ext\dnsns.jar;C:\Apps\Java\jdk8\jre\lib\ext\jaccess.jar;C:\Apps\Java\jdk8\jre\lib\ext\jfxrt.jar;C:\Apps\Java\jdk8\jre\lib\ext\localedata.jar;C:\Apps\Java\jdk8\jre\lib\ext\nashorn.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunec.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunjce_provider.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunmscapi.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunpkcs11.jar;C:\Apps\Java\jdk8\jre\lib\ext\zipfs.jar;C:\Apps\Java\jdk8\jre\lib\javaws.jar;C:\Apps\Java\jdk8\jre\lib\jce.jar;C:\Apps\Java\jdk8\jre\lib\jfr.jar;C:\Apps\Java\jdk8\jre\lib\jfxswt.jar;C:\Apps\Java\jdk8\jre\lib\jsse.jar;C:\Apps\Java\jdk8\jre\lib\management-agent.jar;C:\Apps\Java\jdk8\jre\lib\plugin.jar;C:\Apps\Java\jdk8\jre\lib\resources.jar;C:\Apps\Java\jdk8\jre\lib\rt.jar;C:\share\_11\__Serenity\screenplay-pattern-todomvc-master\target\test-classes;C:\share\_11\__Serenity\screenplay-pattern-todomvc-master\target\classes;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-core\1.1.42\serenity-core-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar;C:\Users\RZHHHN\.m2\repository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;C:\Users\RZHHHN\.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\RZHHHN\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\RZHHHN\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\RZHHHN\.m2\repository\cglib\cglib\3.1\cglib-3.1.jar;C:\Users\RZHHHN\.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\RZHHHN\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\RZHHHN\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\RZHHHN\.m2\repository\org\slf4j\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\RZHHHN\.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-core\1.2.4\cucumber-core-1.2.4.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-html\0.2.3\cucumber-html-0.2.3.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-jvm-deps\1.0.5\cucumber-jvm-deps-1.0.5.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\gherkin\2.12.2\gherkin-2.12.2.jar;C:\Users\RZHHHN\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\RZHHHN\.m2\repository\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-report-resources\1.1.42\serenity-report-resources-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\com\google\code\gson\gson\2.6.1\gson-2.6.1.jar;C:\Users\RZHHHN\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\RZHHHN\.m2\repository\com\opera\operadriver\1.5\operadriver-1.5.jar;C:\Users\RZHHHN\.m2\repository\com\opera\operalaunchers\1.1\operalaunchers-1.1.jar;C:\Users\RZHHHN\.m2\repository\com\google\protobuf\protobuf-java\2.4.1\protobuf-java-2.4.1.jar;C:\Users\RZHHHN\.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\ini4j\ini4j\0.5.2\ini4j-0.5.2.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-server\2.53.1\selenium-server-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\RZHHHN\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.48\bcprov-jdk15on-1.48.jar;C:\Users\RZHHHN\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.48\bcpkix-jdk15on-1.48.jar;C:\Users\RZHHHN\.m2\repository\mx4j\mx4j-tools\3.0.1\mx4j-tools-3.0.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\jetty-repacked\9.2.13.v20150730\jetty-repacked-9.2.13.v20150730.jar;C:\Users\RZHHHN\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\jetty-rc-repacked\5\jetty-rc-repacked-5.jar;C:\Users\RZHHHN\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-java\2.53.1\selenium-java-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\2.53.1\selenium-chrome-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\2.53.1\selenium-remote-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-api\2.53.1\selenium-api-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\2.53.1\selenium-edge-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\2.53.1\selenium-firefox-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\2.53.1\selenium-ie-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\net\java\dev\jna\jna\4.1.0\jna-4.1.0.jar;C:\Users\RZHHHN\.m2\repository\net\java\dev\jna\jna-platform\4.1.0\jna-platform-4.1.0.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\2.53.1\selenium-safari-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\io\netty\netty\3.5.7.Final\netty-3.5.7.Final.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-support\2.53.1\selenium-support-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-leg-rc\2.53.1\selenium-leg-rc-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\yaml\snakeyaml\1.8\snakeyaml-1.8.jar;C:\Users\RZHHHN\.m2\repository\com\codeborne\phantomjsdriver\1.2.1\phantomjsdriver-1.2.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\htmlunit-driver\2.21\htmlunit-driver-2.21.jar;C:\Users\RZHHHN\.m2\repository\io\appium\java-client\4.0.0\java-client-4.0.0.jar;C:\Users\RZHHHN\.m2\repository\commons-validator\commons-validator\1.5.0\commons-validator-1.5.0.jar;C:\Users\RZHHHN\.m2\repository\commons-beanutils\commons-beanutils\1.9.2\commons-beanutils-1.9.2.jar;C:\Users\RZHHHN\.m2\repository\commons-digester\commons-digester\1.8.1\commons-digester-1.8.1.jar;C:\Users\RZHHHN\.m2\repository\org\codehaus\groovy\groovy\2.4.4\groovy-2.4.4.jar;C:\Users\RZHHHN\.m2\repository\net\sf\opencsv\opencsv\2.0\opencsv-2.0.jar;C:\Users\RZHHHN\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.3\commons-beanutils-core-1.8.3.jar;C:\Users\RZHHHN\.m2\repository\joda-time\joda-time\2.7\joda-time-2.7.jar;C:\Users\RZHHHN\.m2\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;C:\Users\RZHHHN\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\RZHHHN\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\RZHHHN\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\RZHHHN\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\RZHHHN\.m2\repository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\jexcelapi\jxl\2.6.12\jxl-2.6.12.jar;C:\Users\RZHHHN\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\htmlunit\htmlunit\2.21\htmlunit-2.21.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.17\htmlunit-core-js-2.17.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\htmlunit\neko-htmlunit\2.21\neko-htmlunit-2.21.jar;C:\Users\RZHHHN\.m2\repository\xerces\xercesImpl\2.11.0\xercesImpl-2.11.0.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\cssparser\cssparser\0.9.18\cssparser-0.9.18.jar;C:\Users\RZHHHN\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\websocket\websocket-client\9.2.15.v20160210\websocket-client-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\jetty-util\9.2.15.v20160210\jetty-util-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\jetty-io\9.2.15.v20160210\jetty-io-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\websocket\websocket-common\9.2.15.v20160210\websocket-common-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\websocket\websocket-api\9.2.15.v20160210\websocket-api-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\apache\httpcomponents\httpclient\4.5.2\httpclient-4.5.2.jar;C:\Users\RZHHHN\.m2\repository\org\apache\httpcomponents\httpcore\4.4.4\httpcore-4.4.4.jar;C:\Users\RZHHHN\.m2\repository\org\apache\httpcomponents\httpmime\4.5.2\httpmime-4.5.2.jar;C:\Users\RZHHHN\.m2\repository\org\fluentlenium\fluentlenium-core\0.10.2\fluentlenium-core-0.10.2.jar;C:\Users\RZHHHN\.m2\repository\com\jhlabs\filters\2.0.235\filters-2.0.235.jar;C:\Users\RZHHHN\.m2\repository\org\asciidoctor\asciidoctor-java-integration\0.1.4\asciidoctor-java-integration-0.1.4.jar;C:\Users\RZHHHN\.m2\repository\org\jruby\jruby-complete\1.7.4\jruby-complete-1.7.4.jar;C:\Users\RZHHHN\.m2\repository\org\imgscalr\imgscalr-lib\4.2\imgscalr-lib-4.2.jar;C:\Users\RZHHHN\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\RZHHHN\.m2\repository\org\hibernate\hibernate-validator\5.1.1.Final\hibernate-validator-5.1.1.Final.jar;C:\Users\RZHHHN\.m2\repository\org\jboss\logging\jboss-logging\3.1.3.GA\jboss-logging-3.1.3.GA.jar;C:\Users\RZHHHN\.m2\repository\com\fasterxml\classmate\1.0.0\classmate-1.0.0.jar;C:\Users\RZHHHN\.m2\repository\javax\el\javax.el-api\2.2.4\javax.el-api-2.2.4.jar;C:\Users\RZHHHN\.m2\repository\org\glassfish\web\javax.el\2.2.4\javax.el-2.2.4.jar;C:\Users\RZHHHN\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar;C:\Users\RZHHHN\.m2\repository\xalan\serializer\2.7.2\serializer-2.7.2.jar;C:\Users\RZHHHN\.m2\repository\com\jayway\awaitility\awaitility\1.6.3\awaitility-1.6.3.jar;C:\Users\RZHHHN\.m2\repository\com\typesafe\config\1.2.1\config-1.2.1.jar;C:\Users\RZHHHN\.m2\repository\org\jsoup\jsoup\1.8.3\jsoup-1.8.3.jar;C:\Users\RZHHHN\.m2\repository\com\google\jimfs\jimfs\1.0\jimfs-1.0.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-junit\1.1.42\serenity-junit-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-screenplay\1.1.42\serenity-screenplay-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-screenplay-webdriver\1.1.42\serenity-screenplay-webdriver-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-cucumber\1.1.10\serenity-cucumber-1.1.10.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-java\1.2.4\cucumber-java-1.2.4.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-junit\1.2.4\cucumber-junit-1.2.4.jar;C:\Users\RZHHHN\.m2\repository\org\slf4j\slf4j-simple\1.7.7\slf4j-simple-1.7.7.jar;C:\Users\RZHHHN\.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\RZHHHN\.m2\repository\org\assertj\assertj-core\1.7.0\assertj-core-1.7.0.jar;C:\Users\RZHHHN\.m2\repository\com\googlecode\lambdaj\lambdaj\2.3.3\lambdaj-2.3.3.jar;C:\Users\RZHHHN\.m2\repository\cglib\cglib-nodep\2.2\cglib-nodep-2.2.jar;C:\Users\RZHHHN\.m2\repository\org\hamcrest\hamcrest-all\1.3\hamcrest-all-1.3.jar;C:\Apps\IntelliJIDEA20162\plugins\cucumber-java\lib\cucumber-jvm-formatter.jar;C:\Apps\IntelliJIDEA20162\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain cucumber.api.cli.Main --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --glue net.serenitybdd.demos.todos.cucumber.steps --glue net.serenitybdd.cucumber.actors C:/share/_11/__Serenity/screenplay-pattern-todomvc-master/src/test/resources/features/record_todos/add_new_items_to_the_todo_list.feature
Testing started at 4:07 PM ...
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.project.name=Demo Project using Serenity and Cucumber
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.linked.tags=issue
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.driver=chrome
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.base.url=http://todomvc.com/examples/angularjs/#/
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.test.root=net.serenitybdd.demos.todos.features
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.take.screenshots=BEFORE_AND_AFTER_EACH_STEP
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.tag.failures=true
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.browser.width=1280
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.browser.height=1024
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.wait.for.timeout=20000
Starting ChromeDriver 2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf) on port 24696
Only local connections are allowed.
java.lang.NullPointerException
at net.thucydides.core.steps.StepEventBus.updateOverallResults(StepEventBus.java:645)
at net.serenitybdd.screenplay.EventBusInterface.updateOverallResult(EventBusInterface.java:29)
at net.serenitybdd.screenplay.Actor.perform(Actor.java:109)
at net.serenitybdd.screenplay.Actor.attemptsTo(Actor.java:80)
at net.serenitybdd.screenplay.Actor.wasAbleTo(Actor.java:74)
at net.serenitybdd.demos.todos.cucumber.steps.TodoUserSteps.that_James_has_an_empty_todo_list(TodoUserSteps.java:33)
at ✽.Given that James has an empty todo list(C:/share/_11/__Serenity/screenplay-pattern-todomvc-master/src/test/resources/features/record_todos/add_new_items_to_the_todo_list.feature:9)
Skipped step
Is there anyway to run serenity test in debug mode, so that I can collect more info and open a bug report?
This link should help, do not forget to give your definitions in glue section of the configuration.
https://johnfergusonsmart.com/running-cucumber-serenity-feature-files-directly-intellij/
I did some tests with my own project and asked on this bug report for serenity. Running the feature files from IntelliJ directly will cause the Cucumber Plugin to set and load the classes. The Plugin did not take into account the needed CucumberWithSerenity runner class and this causes the problems. However you can run them from the IDE by adding an AllRunner class directly in the src/main/java folder:
#RunWith(CucumberWithSerenity.class)
public class AllStories {}
Then the tests can be executed directly from the IDE. You can configure which tests to use which is documented at the_scenario_runner. By changing serenity.test.root like done in the maven profiles you can specify if you want to use the screenplay versions or the page objects.

sonarqube 5.0 giving Error getting generated key or setting result to parameter object message

I am trying to use SonarQube 5.0 with Hudson 3.2.1.
Sonar runner version 2.4.
Once Hudson invokes a sonar analysis, it ends with a build failure.
SonarQube is configured with Oracle 12c database using ojdbc7.jar driver.
The log output -
[workspace] $ /opt/sonar-runner-2.4/bin/sonar-runner -Dsonar.jdbc.driver=oracle.jdbc.xa.client.OracleXADataSource -Dsonar.jdbc.url=jdbc:oracle:thin:#//host:port/URL id pass -Dsonar.host.url=http://host:port id pass -Dsonar.projectBaseDir=/basedir -Dsonar.projectName=prjName -Dsonar.projectVersion=1.0 -Dsonar.projectKey=org:prj -Dsonar.sources=.
SonarQube Runner 2.4
Java 1.7.0_75 Oracle Corporation (64-bit)
Linux 2.6.18-308.el5 amd64
INFO: Runner configuration file: /opt/sonar-runner-2.4/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Work directory: /basedir
INFO: SonarQube Server 5.0
04:04:54.792 INFO - Load global referentials...
04:04:55.100 INFO - Load global referentials done: 311 ms
04:04:55.105 INFO - User cache: /var/lib/hudson/.sonar/cache
04:04:55.116 INFO - Install plugins
04:04:55.196 INFO - Install JDBC driver
04:04:55.205 INFO - Create JDBC datasource for jdbcURL
04:04:59.095 INFO - Initializing Hibernate
04:05:01.906 INFO - Load project referentials...
04:05:02.242 INFO - Load project referentials done: 336 ms
04:05:02.242 INFO - Load project settings
04:05:02.594 INFO - Loading technical debt model...
04:05:02.616 INFO - Loading technical debt model done: 21 ms
04:05:02.622 INFO - Apply project exclusions
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 9.050s
Final Memory: 16M/242M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Error getting generated key or setting result to parameter object. Cause: java.lang.NullPointerException
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Finished: FAILURE
I have replaced the actual parameters like host,port, jdbcurl with placeholders.
Chances are that you are running Oracle 12c version 12.1.0.1.0 and using the JDBC drivers that came with it. The Oracle 12c JDBC driver that comes with 12.1.0.1.0 has a bug with the oracle.jdbc.driver.AutoKeyInfo.initMetaDataColumnIndexes() method, which is now fixed with the 12.2.0 patch. I am guessing that your error "getting generated key" is related to this issue. You should enable logging within SonarQube so that you can verify the root cause.
Full post is here.

SonarQube 4.3 - 0 files indexed

I'm trying to run a sonar analysis on my jave code. There are no files indexed.
INFO: Runner configuration file: C:\Program Files\Development\Tools\sonar-runner-2.4\conf\sonar-runner.properties
INFO: Project configuration file: C:\Program Files\Development\Tools\sonar-runner-2.4\Projects\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\Program Files\Development\Tools\sonar-runner-2.4\bin\.\.sonar
INFO: SonarQube Server 4.3
09:41:48.340 INFO - Load batch settings
09:41:49.535 INFO - User cache: C:\Users\z003bw5a\.sonar\cache
09:41:49.580 INFO - Install plugins
09:41:55.230 INFO - Install JDBC driver
09:41:55.272 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
09:42:00.687 INFO - Initializing Hibernate
09:42:15.950 INFO - Load project settings
09:42:16.125 INFO - Apply project exclusions
09:42:16.812 INFO - ------------- Scan skuska 1
09:42:16.842 INFO - Load module settings
09:42:20.400 INFO - Language is forced to java
09:42:21.177 INFO - Loading technical debt model...
09:42:21.241 INFO - Loading technical debt model done: 64 ms
09:42:21.246 INFO - Loading rules...
09:42:22.359 INFO - Loading rules done: 1113 ms
09:42:22.430 INFO - Configure Maven plugins
09:42:22.730 INFO - Compare to previous analysis (2014-06-18)
09:42:22.767 INFO - Compare over 30 days (2014-05-19, analysis of 2014-06-18 09:12:14.0)
09:42:22.926 INFO - Loaded quality gate 'SonarQube way'
09:42:24.118 INFO - Base dir: C:\Program Files\Development\Tools\sonar-runner-2.4\bin\.
09:42:24.122 INFO - Working dir: C:\Program Files\Development\Tools\sonar-runner-2.4\bin\.\.sonar
09:42:24.126 INFO - Source encoding: UTF-8, default locale: en_US
09:42:24.137 INFO - Index files
09:42:24.228 INFO - 0 files indexed
09:42:24.238 INFO - Quality profile for java: Sonar way
09:42:24.254 INFO - JaCoCo report not found.
09:42:24.269 INFO - JaCoCo IT report not found.
09:42:24.274 INFO - JaCoCo reports not found.
09:42:24.328 INFO - Sensor QProfileSensor...
09:42:24.454 INFO - Sensor QProfileSensor done: 126 ms
09:42:24.458 INFO - Sensor InitialOpenIssuesSensor...
09:42:24.493 INFO - Sensor InitialOpenIssuesSensor done: 35 ms
09:42:24.498 INFO - Sensor ProfileEventsSensor...
09:42:24.581 INFO - Sensor ProfileEventsSensor done: 83 ms
09:42:24.585 INFO - Sensor ProjectLinksSensor...
09:42:24.612 INFO - Sensor ProjectLinksSensor done: 27 ms
09:42:24.615 INFO - Sensor VersionEventsSensor...
09:42:24.886 INFO - Sensor VersionEventsSensor done: 271 ms
09:42:24.890 INFO - Sensor FileHashSensor...
09:42:24.894 INFO - Sensor FileHashSensor done: 4 ms
09:42:24.905 INFO - Sensor CpdSensor...
09:42:24.908 INFO - SonarEngine is used for java
09:42:24.919 INFO - Sensor CpdSensor done: 14 ms
09:42:26.614 INFO - Execute decorators...
09:42:27.719 INFO - Store results in database
09:42:28.073 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/skuska
09:42:28.629 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
09:42:28.739 INFO - -> Keep one snapshot per day between 2014-05-21 and 2014-06-17
09:42:28.753 INFO - -> Keep one snapshot per week between 2013-06-19 and 2014-05-21
09:42:28.781 INFO - -> Keep one snapshot per month between 2009-06-24 and 2013-06-19
09:42:28.785 INFO - -> Delete data prior to: 2009-06-24
09:42:28.856 INFO - -> Clean skuska 1 [id=3]
09:42:28.905 INFO - <- Clean snapshot 19
09:42:29.430 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
09:42:29.435 INFO - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 56.892s
Final Memory: 11M/212M
INFO: ------------------------------------------------------------------------
My sonar settings look like this:
# Section 1: required metadata
sonar.projectKey=skuska
sonar.projectName=skuska 1
sonar.projectVersion=0.1
# Section 2: project directories
# path to source directories (required)
sonar.sources=C:\Program Files\Development\Tools\sonar-runner-2.4\Projects\skuska
# path to test source directories (optional)
#sonar.tests=
# path to project binaries (optional), for example directory of Java
# bytecode
#sonar.binaries=
# Section 3: Java and libraries settings
# optional comma-separated list of paths to libraries. Only path to JAR file
# and path to directory of classes are supported.
#libraries=path/to/library.jar
# Uncomment those lines if some features of java 5 or java 6 like
# annotations, enum, ...
# are used in the source code to be analysed
#sonar.java.source=1.5
#sonar.java.target=1.5
# Section 4: Advanced parameters
# Uncomment this line to analyse a project which is not a java project.
# The value of the property must be the key of the language.
sonar.language=java
# Advanced parameters
#sonar.my.property=value
sonar.sourceEncoding=UTF-8
Analysis is successful, but the web server is only the name of the project and no data about metrics and code coverage.
Please help me!
As you can read in the documentation, you should put the sonar-project.properties file at the root of your project and launch the analysis from this folder, and therefore replace the "sonar.sources" property with a relative path instead of an absolute one.

Sonar-runner execution failure causing cast exception

After configure the sonar tools (SonarQube, MySql database and Sonar-runner) I perform an analysis over an Android project without any problem. But after install the Android Plugin for sonar and repeat the analysis, this one fails getting the next error:
INFO - Preview mode
Load batch settings
User cache: /home/user/.sonar/cache
INFO - Install plugins
INFO - Exclude plugins: devcockpit, jira, pdfreport, views, report, buildstability, scmactivity, buildbreaker
INFO - Create JDBC datasource for jdbc:h2:/home/user/workspace/myAndroidProject/.sonar/.sonartmp/preview1394469024394-0
INFO - Initializing Hibernate
INFO - Load project settings
INFO - Apply project exclusions
INFO - ------------- Scan myAndroidProject
INFO - Load module settings
INFO - Language is forced to java
INFO - Loading technical debt model...
INFO - Loading technical debt model done: 424 ms
INFO - Configure Maven plugins
INFO - Base dir: /home/user/workspace/myAndroidProject
INFO - Working dir: /home/user/workspace/myAndroidProject/.sonar
INFO - Source dirs: /home/user/workspace/myAdnroidProject/src
INFO - Source encoding: UTF-8, default locale: en_EN
INFO - Index files
INFO - Included sources:
INFO - src/**
INFO - 116 files indexed
WARN - Accessing the filesystem before the Sensor phase is deprecated and will not be supported in the future. Please update your plugin.
INFO - Index files
INFO - Included sources:
INFO - src/**
INFO - 116 files indexed
WARN - Accessing the filesystem before the Sensor phase is deprecated and will not be supported in the future. Please update your plugin.
INFO - Index files
INFO - Included sources:
INFO - src/**
INFO - 116 files indexed
INFO - Quality profile for java: Sonar way
INFO - Sensor JavaSourceImporter...
INFO - Sensor JavaSourceImporter done: 49 ms
INFO - Sensor JavaSquidSensor...
INFO - Java AST scan...
INFO - 116 source files to be analyzed
INFO - 116/116 source files analyzed
INFO - Java AST scan done: 6693 ms
WARN - Java bytecode has not been made available to the analyzer. The Depth of Inheritance Tree (DIT) metric, Response for Class (RFC) metric, Number of Children (NOC) metric, Lack of Cohesion (LCOM4) metric, deperecated dependencies metrics, UnusedPrivateMethod rule, RedundantThrowsDeclarationCheck rule, S1160 rule, S1217 rule are disabled.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 18.440s
Final Memory: 12M/357M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: org.sonar.api.resources.Directory cannot be cast to org.sonar.api.resources.JavaPackage
My sonar-project.properties file is the enxt:
#Required metadata
sonar.projectKey=mKey
sonar.projectName=myAndroidProject
sonar.projectVersion=1.0
# Paths to source directories.
# Paths are relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# Do not put the "sonar-project.properties" file in the same directory with the source code.
# (i.e. never set the "sonar.sources" property to ".")
sonar.sources=src
# The value of the property must be the key of the language.
sonar.language=java
# Encoding of the source code
sonar.sourceEncoding=UTF-8
# Analysis mode
sonar.analysis.mode=preview
#Enables the Lint profile to analyze the code using the Lint rules.
#sonar.profile=Android Lint
I'm using the next environment:
SonarQube 4.2 RC1
Sonar-runner 2.3
Database: MySQL
Ubuntu 12.04 LTS
Java 1.7
I tryed uninstalling the Android plugin but the problem persists. The unique way that I've found to solve it is deleting the database and the user and create them again.
As stated on http://docs.codehaus.org/pages/viewpage.action?pageId=236224987, the Android plugin is not yet compatible with SonarQube 4.2-RC1. See also http://jira.codehaus.org/browse/SONARPLUGINS-3483.
You need to provide the binaries (bytecode .class files) to the sonar executor.
Add the following line to your sonar-project.properties
# Path to the class files
sonar.binaries=build\\classes\\main
If the above line doesn't work , then check your binaries actual path and place it in sonar.binaries property

Categories