I have a WEBAPP MULTI PROJECT Gradle build with the below structure. I'm also using SPRING FRAMEWORK. I can't get the webapp to run in Jetty though as my bean files (dao-beans.xml) cannot be found. If I copy the bean files to the webapp build dir they're found but then Spring fails to instantiate my classes as it cannot find the classes on the classpath. What am I doing wrong?
+-- build.gradle
+-- dao-impl
¦ +-- src
¦ +-- main
¦ ¦ +-- java
¦ ¦ +-- resources
¦ ¦ +-- dao-beans.xml
¦ +-- test
¦ +-- java
+-- gradle.properties
+-- presenter
¦ +-- build.gradle
¦ +-- src
¦ +-- main
¦ ¦ +-- java
¦ ¦ +-- resources
¦ ¦ ¦ +-- beans.xml
¦ ¦ +-- webapp
¦ ¦ +-- WEB-INF
¦ ¦ +-- web.xml
¦ +-- test
¦ +-- java
+-- settings.gradle
Presenter's build.gradle:
apply plugin: "jetty"
apply plugin: "war"
jettyRun {
httpPort = 8080
scanIntervalSeconds = 3
}
War structure:
├── META-INF
│ └── MANIFEST.MF
└── WEB-INF
├── classes
│ ├── beans.xml
│ ├── *.classes
│ └── logback.xml
├── lib
│ ├── *.jar
└── web.xml