E
E
Eugene2015-04-07 10:16:02
gradle
Eugene, 2015-04-07 10:16:02

How to copy the necessary files into the build using Gradle?

Hi all.
The essence of the question is this:
there is a project (Spring MVC), Gradle is used to build the project. The gretty plugin is used to run the project. So, I would like that when the application is launched (or when copying resources), the developer's config is copied to the assembly. And when building a war file, the config for production would be copied. This is standard procedure. I can't figure out how to check this?
I wrote this task:

task copyDev (type: Copy) {
    from ("work/dev") {
        include "**/*"
    }

    into("build/resources/main")

}

Added the following dependency:
appRun.dependsOn copyDev
appRun is a task that builds the project and runs it in jetty. So, when starting appRun, the following error occurs:
Could not find property 'appRun' on root project 'Robot'.
Share your experience, how do you do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2015-04-08
@zolt85

Who will be interested, found the answer on stackowerflow

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question