I have two projects known as (Common and ApiGateway).The common is a Gradle java project and ApiGateway is a Micronaut java application. In the common project, I am keeping all the common things and referencing the jar to the Apigateway project. Common project The below code is compiled with ./gradlew build T…
Tag: build.gradle
Can’t start web application in .WAR file : java.lang.ClassNotFoundException
I have a grails application written in Groovy. It is built and works when it’s launched with : Now I want to run it with java to put it in a Docker container. This is the Dockerfile I prepared : The server fails to start because of the following error: When I checked the classes folder in WEB-INF, I fou…
change ant.zip() output directory
I want to store output of ant.zip() inside build directory. I’m doing it the following way for now. Is there way to directly do it in ant.zip()? Answer Like this:
How to solve error: package org.springframework.context.annotation does not exist import org.springframework.context.annotation.Bean?
After updating the gradle wrapper to version 7.3.2 I get the following error when trying to build my spring boot project: Why is this happening? Update: Found the problem, but do not know how to fix yet. I have multiple modules in my project. I have a “common” module which is used by other modules…
Gradle: Exclude file from resourses and add it from different folder
I am trying to build a jar file with Gradle. I have some resource files (like log4j2 and persistent.xml) into the src/main/resources that I want to exclude when I was built the jar, on contrary I have the same files (with different content in a project directory) and I want to copy these files rather than the…
What is the purpose of apply maven plugin in build.gradle?
I keep seeing apply plugin: ‘maven’ in build.gradle files for Java projects. What is the purpose of adding a Maven plugin? I can’t seem to find the plugin when querying for it on plugins.gradle.org. Answer Why don’t you just google it? http://sorcersoft.org/project/site/gradle/userguid…
Run gradle task after doLast of a other task
I have a variable in my build.gradle (xy) file with an integer value and three simple tasks. The tree tasks are also “bundled” in a fourth task, to call the three tasks one after one. If I call the task callAll, the task callOne should add 5 to the int value, task callTwo should add also 5 the int…
Gradle – Could not find load main class
I need to tune the JVM memory by help of Gradle. I’ve writen settings in the gradle.properties file: org.gradle.jvmargs=-XX:MaxMetaspaceSize=60M but it didn’t work. Then I’ve done it manually in an IDEA (Run>Edit Configurations…) and wrote the settings for the needed class (in VM op…
Gradle Build Error in Multi-module project: java.lang.NoClassDefFoundError: at groovyjarjarasm.asm.signature.SignatureReader.parseType
I’m getting Execution failed for task ‘:app-specification:compileTestGroovy’ along with org.gradle.api.tasks.TaskExecutionException: when trying to build gradle. This is a multi-module gradle project with the first module being the main app(SpringBoot app) with some Spock tests and the other…
No such property: count for class: com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
Creating a new application with the latest version of Micronaut using Intellj throws an exception during the build process. gradle-wrapper.properties build.gradle Answer You need to upgrade to Shadow 7.0.0. build.gradle: This issue has been fixed with PR #655. The root cause is a change to Groovy itself (Jira…