java

The right configuration of maven jar dependency plugin for resources  #angularjs #reactjs

  • Stack Overflow works best with JavaScript enabled
  • folder conf include properties and xml files, hlp include help html files, image includes png, jpg or ico files and lib includes dll as the app uses jni and dll lib.
  • The MANIFEST.MF include info such as class path and main class, but no path to conf, etc.
  • sign up log in tour help
  • it shows error which resulted from the file inside conf couldn’t be found.

folder conf include properties and xml files, hlp include help html files, image includes png, jpg or ico files and lib includes dll as the app uses jni and dll lib.

@ng_real_ninja: The right configuration of maven jar dependency plugin for resources #angularjs #reactjs

I create a Maven Swing application, and I put all non-java files under the resources folder, as shown below:

folder conf include properties and xml files, hlp include help html files, image includes png, jpg or ico files and lib includes dll as the app uses jni and dll lib.

This is how I access the config file in java:

in pom.xml, I use maven’s jar and dependency plugins:

after I mvn package the project, a final app.v1.0.jar and dependencies folder were created. If I unzip the jar, its structure looks like:

The MANIFEST.MF include info such as class path and main class, but no path to conf, etc.

When I tried to run the app

it shows error which resulted from the file inside conf couldn’t be found.

The project can be executed from within a IDE though like eclipse or InteliJ.

Can anyone tell me what is the proper way to update the pom’s plugin and the best way to create a project structure that include resources as evidenced in my project?

java