I am writing a desktop Java application as a web service client. I want to use WebSocket to implement notification “callback” from the server. I am using the Spring framework’s WebSocketStompClient. Below snippet shows how I initialize it: It works perfectly if I run it in IntelliJ IDE, however, if I run by command line “java -cp my.jar MyPackage.MyMainClass”, it
Tag: gradle
Gradle project builds successfully but IntelliJ cannot resolve references
Every usage of the following Kotlin library compiles and can be used, but IntelliJ’s autocomplete (and perhaps others) cannot resolve the references. https://gitlab.com/7Hazard/altv-kotlin I am using it as a dependency via JitPack: https://jitpack.io/#com.gitlab.7Hazard/altv-kotlin JDK 11, Gradle 6.3 (wrapper) The gradle project builds fine but just autocompletion is broken. Other dependencies like kotlinx.coroutines work fine. It altv-kotlin is a fatjar and
Exporting apache netbeans gradle project to jar file
I have created a Netbeans Gradle project, and I am trying to find the best way to export this to a .jar file so that it can be opened from outside the IDE. I am using dependencies within my project, and I was receiving a java.lang.NoClassDefFoundError. To resolve this, I tried adding to my build.gradle file. However, this threw a
Java 11 requirements check failed for JDK 1.8 or greater with Cordova
When I run ““cordova run android“` in the path of my project I get My version of Java My version of javac My version of Cordova My version of Node My version of Nodejs My version of NPM My version of Gradle I found that android-studio –version didn’t do anything but silently wait, but when I open the program through
How to add querydsl-mongodb to Spring Boot Gradle 5.6.1 project
I am trying to create dynamic query to a mongo database from spring boot gradle project. My gradle version: 5.6.1 Here is my build.gradle file: My application.properties file: Problem is: Q classes are not generating for my Documents. Any suggestion welcome. Thanks. Answer I made it working by adding both @Document and @Entity annotation. My build.gradle file is like: My
Change “bootJar” target directory
New to gradle, facing issues in jenkins pipeline. Entire build is successful but not able to find the bootable jar of my spring project. If you can please let me know how can I move the jar from target/lib/ to /target folder. Below is my build.gradle P.S- I tried project.buildDir but that changed the build to target, the jar is
Unnecessarily replacing a task that does not exist is not supported
I got the following error: Answer Clear the cache and start the app again. This might happen when you recently upgraded gradle. If you are on intellij idea then choose file -> invalidate cache and restart. If you are using gradle then delete your .gradle folder and run gradle again.
Does gradle.properties have access to environment variables
I looked around and could not find any way of accessing environment variables in my gradle.properties. What I can do: In my build.gradle I can access environment variables like this System.getenv(“MY_VAR”). I would like to do the same in my gradle.properties. Example of what I want to do: In my gradle.properties replace build.foo=bar with build.foo=System.getenv(“BAR”) So far all my attempts
Spring Boot Gradle multi-project build not seeing internal dependencies during tests
I’m having a problem on a larger multi-project build that I was migrating from Gradle 4 to 5, and replicated the issue on a smaller, more concise build to demonstrate the issue. I have 2 projects in the build. One is a dependency (basic library) used by the other. Snippet of demo-web: build.gradle The dependency project defines one class that
Gradle build – add module path
My question: How do I set a module path for gradle build? I’ve become comfortable working with Java modules from the command line. I do a frequent exercise in Powershell which results in these source files. appMod/module-info appMod/appPack.Entry greetMod/module-info greetMod/greetPack.Hello Since the appMod module requires greetMod, I compile and jar greetMod first. Then I compile and jar appMod, but as