Skip to content
Advertisement

Tag: build.gradle

Gradle Login and signup page giving error in getUserAuthority() in CustomerUserDetailsService.java

The method getUserAuthority(java.util.Set<com.djamware.springsecuritymongodb.domain.Role>) in the type CustomUserDetailsService is not applicable for the arguments (java.util.Set<javax.management.relation.Role>) Why giving this error? This Java file is under package com.djamware.springsecuritymongodb.services and User.java is under package com.djamware.springsecuritymongodb.domain I have created User Class attached here. User.java Answer The reason is that the Role that CustomUserDetailsServices getUserAuthority(Set<Role> userRoles) is expecting com.djamware.springsecuritymongodb.domain.Role (see its imports). However, User is returning

how do I import java class in build.gradle file

I want to import static data in build.gradle file from below class: I saw a project where they used, something like: but I couldn’t figure out what configurations are to be provided in order to have the visibility of java class from build.gradle. Any help would be highly appreciated. Answer You’ll want to use buildSrc: https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources So for your example,

Gradle : Failed to notify build listener

When we build our application using gradle, it is throwing the exception below .Following is the build.gradle code: I am getting the below error : Build file, line: 81 Failed to notify build listener. ‘org.gradle.api.file.FileCollection org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal.getPublishableFiles()’ Can anyone help me please ? Answer For future readers who stumble upon this error. I’ve been piece mealing together a working jfrog publish

Gradle Kotlin DSL – Build script fails when java.sourceCompatibility defined in Parent but build is successful when added to child module

Am trying to setup a new repository for a multi module springBoot application using gradle (Kotlin DSL for build scripts) As part of the same I am trying to declare generic configuration and dependencies needed for all subProjects. In doing so, I am trying to define sourceCompatility for all child projects in the subprojects block of parent build.gradle.kts file When

How can I fix NoClassDefFoundError when using Spring framework’s WebSocketClient

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

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

NoClassDefFoundError for Gradle fat jar with tests Spring Boot

I need to create fat jar in Gradle project with tests where Main method is under src/test. Now I have Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/CommandLineParser when I run fat jar created by ‘gradle bootJar’. My Gradle: My spring.xml: Exception: Previously following ‘gradle shadowJar’ code worked well until I added AspectJ to the project And error appeared on running ‘gradle

Advertisement