My build output is out/production/classes
.
Java files get compiled into classes just fine and get put on out/production/classes/[packageName]
, but resources aren't copied. As far as I know they should go directly inside the out/production/classes
directory.
If relevant, I'm using Java 11, Spring Boot and Gradle.
This is my build.gradle
plugins {
id 'org.springframework.boot' version '2.1.3.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'net.impfox'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// hidden
}
And my Compiler settings:
What could be the cause for my resources not being copied to the output directory and how can I fix this?
If someone is having this issue in Maven. I fixed it by changing the
<packaging>pom</packaging>
to
<packaging>jar</packaging>
In pom.xml
I copied a pom.xml in a maven moduler project (in main pom.xml it uses pom as packaging). Guess I learned my lesson.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With