Giter Club home page Giter Club logo

example-jvm's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-jvm's Issues

Is there any way to specify resources for external libs?

Example from this repo:

java_sources(
    dependencies=[
        # Resource dependencies cannot be inferred, so we must explicitly declare that we
        # depend on them.
        "src/resources/org/pantsbuild/example/lib",
    ],
)

I tried to include dependency on resources for my "main" jar build of application:

scala_sources()

deploy_jar(
    name="app",
    main="MyApp",
    dependencies=[
        ":scala",
        "3rdparty/jvm/org/scala-lang:scala-library",
        "src/main/resources",
    ],
)

but looks like external 3rd party dependencies can't access files from the resources folder.
I tried to use logback.xml for logger configuration and application.conf for typesafe config. Both libs use files from the resources folder by convention(both logback.xml and application.conf are standard names).
Looks like after packaging jar these libs can't access files from the resources folder.

Is there any way to specify resources for external libs?

I can create a minimal reproducible app if you need. Thanks.

Packaged jar is not working

Hello, after a quick test I can't get working jar out of this example app.

% ./pants package ::                                       
14:04:12.59 [INFO] Wrote dist/src.jvm.org.pantsbuild.example.app/bin.jar
% java -jar dist/src.jvm.org.pantsbuild.example.app/bin.jar
Error: Main method is not static in class org.pantsbuild.example.app.ExampleApp, please define the main method as:
   public static void main(String[] args)
java -cp dist/src.jvm.org.pantsbuild.example.app/bin.jar org.pantsbuild.example.app.ExampleApp
Error: Main method is not static in class org.pantsbuild.example.app.ExampleApp, please define the main method as:
   public static void main(String[] args)

Am I doing something wrong? Thanks.

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.