gradle dependency fails but it's there - maven

I have the following error (PLEASE NOTE the jar it says it could not find is different from the location jar name in this error...weird)...
* What went wrong:
A problem occurred evaluating project ':webserver:webpiecesServerBuilder:templateProject:WEBPIECESxAPPNAME'.
> Could not resolve all files for configuration ':webserver:webpiecesServerBuilder:templateProject:WEBPIECESxAPPNAME:runtime'.
> Could not find micrometer-core.jar (io.micrometer:micrometer-core:1.4.0-SNAPSHOT:20200320.152130-173).
Searched in the following locations:
https://repo.spring.io/libs-snapshot/io/micrometer/micrometer-core/1.4.0-SNAPSHOT/micrometer-core-1.4.0-20200319.235509-170.jar
A snapshot of the current contents of directory(in case this post last to tomorrow and a new snapshot is there) is the following...
I have no idea why it can't find 1.4.0-SNAPSHOT since my gradle file is simple and the dependency is simply
'io.micrometer:micrometer-core:1.4.0-SNAPSHOT'

I think it's a gradle daemon bug or something. I did rm -rf ./gradle/cache and then it broke with an exception
Caused by: java.lang.NoClassDefFoundError: build_a6ssp86bmi79bk936w466ea1t$_run_closure5$_closure11
at build_a6ssp86bmi79bk936w466ea1t$_run_closure5.doCall(/Users/dean/workspace/orderly/dataapi-all/dataapi/build.gradle:111)
at org.gradle.util.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:154)
at org.gradle.util.ConfigureUtil.configureSelf(ConfigureUtil.java:130)
at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:587)
at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:91)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:103)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection$ContainerElementsDynamicObject.tryInvokeMethod(DefaultNamedDomainObjectCollection.java:541)
at org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.java:98)
So then I killed the gradle daemons and voila, it's working again.

Related

Could not download org.springframework.vault

I am importing the gradle project in eclipse which is the spring boot application. I could see all the dependency jars are downloaded except "org.springframework.vault".
I could download the spring-vault-core-2.0.1.RELEASE.pom file from browser, so no network issues i guess.
When i checked in D:\softwares\gradle-4.6-bin\gradle-4.6\caches\modules-2\files-2.1 i could not find this directory. I tried to create this directory but i got the error pop up says "folder/file in it is open in other program". I have restarted the pc, also killed all the java process and tried to create this dir, but still failed.
I deleted the cache directory itself and did gradle build, it downloaded the jars freshly except the mentioned one.
code cannot be shared as it is working project.
when i ran the application getting the error
FAILURE: Build failed with an exception.
What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
Could not resolve org.springframework.vault:spring-vault-core:2.0.1.RELEASE.
Required by:
project : > com.gogoair.ps:xauth-security:2.0.4
Could not resolve org.springframework.vault:spring-vault-core:2.0.1.RELEASE.
Could not get resource 'https://jcenter.bintray.com/org/springframework/vault/spring-vault-core/2.0.1.RELEASE/spring-vault-core-2.0.1.RELEASE.pom'.
Failed to move file 'C:\Users\CHE32904\AppData\Local\Temp\gradle_download5901172107951949118bin' into filestore at 'D:\softwares\gradle-4.6-bin\gradle-4.6\caches\modules-2\files-2.1\org.springframework.vault\spring-vault-core\2.0.1.RELEASE\562973b9fcc1880af51f50b2d1a53cf8b9f2745c\spring-vault-core-2.0.1.RELEASE.pom'
Failed to create parent directory 'D:\softwares\gradle-4.6-bin\gradle-4.6\caches\modules-2\files-2.1\org.springframework.vault' when creating directory 'D:\softwares\gradle-4.6-bin\gradle-4.6\caches\modules-2\files-2.1\org.springframework.vault\spring-vault-core\2.0.1.RELEASE\562973b9fcc1880af51f50b2d1a53cf8b9f2745c'

Android resource compilation failed - resource file not found

I'm trying to assemble an Android app in Bamboo server, but I'm getting this error when the assemble comand run. Note: It works perfectly in local.
Command running:
gradlew assembleDebug
And the error I get:
Caused by: org.gradle.internal.UncheckedException: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-2\files-2.1\aa6199e981580f79dc21c6ea06a3575f\res\drawable-mdpi-v4\quantum_ic_skip_next_white_24.png: error: file not found.
I've checked for the resource and its use, but it's not from my project code. It belongs to an external library: play-services-cast-framework
I've been also checking other similar post, but the error can be caused for many resources reasons, so I've not found a solution.
Some solutions suggest that is a problem at some gradle plugin version, but I'm already using version 3.3.1
Any help or clue?
Thanks!

Gradle: Run of a single test gives an error: Caused by: org.gradle.api.InvalidUserDataException property '$1' as it is a directory

When I try to run a single test in commandline like this:
gradle test --tests *MatchfichePageTest
I get the following error:
A problem was found with the configuration of task ':test'.
> Cannot write to file '/Users/macbookprobartvr/Documents/workspace/aem-site-sporza-tests/build/allure-results' specified for property '$1' as it is a directory.
Full stacktrace: I cannot post because stackoverflow is complaining that there is to much code ...
Does someone know what the problem is?
Gradle version 5.2.1
Delete the build/allure-results folder before running the test.
rm -rf /Users/macbookprobartvr/Documents/workspace/aem-site-sporza-tests/build/allure-results
now run the test, it should work now.

Unable to compile cordapp-example

Am new to Corda and IntelliJ. While following instructions at https://docs.corda.net/head/getting-set-up.html#run-from-intellij am unable to compile the Corda example app. Gradle sync is giving me the following exception
Warning:project ':kotlin-source': Unable to build Kotlin project configuration
Details: java.lang.reflect.InvocationTargetException: null
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':kotlin-source:integrationTestCompileClasspath'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.github.bft-smart:library:master-v1.1-beta-g6215ec8-87.
Required by:
project :kotlin-source > net.corda:corda-node-driver:3.2-corda > net.corda:corda-test-utils:3.2-corda > net.corda:corda-node:3.2-corda
Any guidance on what i am doing wrong here?
If i go to https://jitpack.io/com/github/bft-smart/library/master-v1.1-beta-g6215ec8-87/library-master-v1.1-beta-g6215ec8-87.jar It says "Build failed. See the log at jitpack.io"
As a further update the https://jitpack.io/com/github/bft-smart/library/master-v1.1-beta-g6215ec8-87/build.log shows the build failing since 30th August.
Any guidance on how i can force all of Corda to refer another version for the BFT-smart version? master-v1.1-beta-g34864da-135 ?
This was raised as an issue here and fixed here
Take a look at this post on how to resolve

Trouble installing Kyoto Tycoon - Java. Maven failing

I've downloaded Kyoto Tycoon via:
hxxps://bitbucket.org/EP/kyototycoon-java
When running mvn install I get plenty of warnings telling me it couldn't find several files:
http://pastebin.com/znpJ3d5n
When I first started running the install I was getting a lot of failures and no errors. After blindly going around and trying to install things separately, the output now looks like this. I have no experience with Maven so editing the pom.xml file is out of the question. I've tried using the ignore tests and compiling, and I get few jar files. This allows me to compile "Example.java" using:
javac -cp .:target/kyototycoon-0.2-SNAPSHOT.jar Example.java
I then try to run the code using:
java -cp .:target/kyototycoon-0.2-SNAPSHOT.jar Example
but I get an runtime error:
Exception in thread "main" java.lang.NoClassDefFoundError: Exception in thread "main" java.lang.NoClassDefFoundError: com/twitter/finagle/Codec
at kyototycoon.SimpleKyotoTycoonClient.<init>(SimpleKyotoTycoonClient.java:16)
at Example.main(Example.java:11)
Caused by: java.lang.ClassNotFoundException: com.twitter.finagle.Codec
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 2 more
I'm assuming this all comes back the the maven install failing, but I'm not sure how to fix it.
Any direction is appreciated. There doesn't seem to be a large support group for Kyoto.
For anyone experiencing this same issue, I found that JAR files I needed were being created. They were being stored in ~/.m2/repository/kyototycoon/kytotycoon/. I created a disgusting looking classpath that included all of these JAR files and this allowed me to compile AND run the Example.java file.
If "editing the pom file is out of the question" I'd strongly recommend steering clear of Maven.
In any case, you can install local jars to your repository if the artifact isn't available from any repository.

Resources