Hi, I've just noticed that the run task of the app...
# community-support
b
Hi, I've just noticed that the run task of the application plugin doesn't run a JAR unless I specify a mainModule in the extension, making META-INF/beans.xml unavailable. Is there a way to work around that?
Copy code
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
// > Task :jar <-- only with `mainModule`
> Task :run
Hmm... I checked it again and the list after
-cp
does include build/resources/main... Not sure why Helidon isn't picking up beans.xml then.
v
Besides that using
ant.move
is a very strange idea, the whole task you linked to is an extremely bad idea due to multiple reasons. For example it does not properly wire outputs and inputs, but configures hard-coded paths and needs manual task dependencies which is bad, and it pollutes the outputs of another task, resulting in overlapping outputs, which causes all sorts of problems. You should never replicate that setup.
b
Yeah, that build.gradle definitely looks weird. I've just found your workaround to this exact problem too. Considering it's been 10 years since then, is it still the right way to go when dealing with Weld issues in Gradle builds?
v
No, that solution has the same problems I just talked about except for using
ant.move
. I just probably didn't know better 10 years ago 😄