Giter Club home page Giter Club logo

Comments (2)

dkovalenko avatar dkovalenko commented on June 9, 2024 1

@stuhood you were right.

ls -la src/main
total 0
drwxr-xr-x  4 dmitriy  staff  128 Oct 27 11:16 .
drwxr-xr-x  3 dmitriy  staff   96 Oct 26 18:46 ..
drwxr-xr-x  5 dmitriy  staff  160 Jan 26 17:29 resources
drwxr-xr-x  7 dmitriy  staff  224 Jan 19 20:59 scala

changed root_patterns in pants.toml

[source]
root_patterns = ["/src/main/*"] // it was ["/src/*"]

and all worked.
Thank you!

from example-jvm.

stuhood avatar stuhood commented on June 9, 2024

Hey @dkovalenko! The important thing to confirm is that your resources are located at the proper depth below a "source root": see https://www.pantsbuild.org/docs/source-roots

In this case: if you have resources that you want to load as logback.xml or application.conf, then they must be located directly in a source root, with no additional nesting. So, if src/main* was configured as a source root pattern (note: it isn't by default: see the page above), then the files would need to be located at:

src/main/resources/logback.xml
src/main/resources/application.conf

from example-jvm.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.