Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
Copying file to build directory through Gradle

I would like to add some of my node_modules inside the build/resources/main/static directory of my Spring Boot project.

Can I do this through Gradle v2 by adding some task in my gradle.build file?

I'm trying this (which is actually for Gradle v3) but it's not copying anything so far.

task copyTask(type: Copy) {
    from 'node_modules'
    into 'build/resources/main/static'
}

link for Gradle documentation

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

So adding:

task copyTask(type: Copy) {
        from 'node_modules/.'
        into 'build/resources/main/static'
}

in my gradle.build and running gradle copyTask build worked fine.

Thanks JB Nizet!

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!