ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Include extra files in jar

asked 2015-07-08 11:02:17 -0500

smihael gravatar image

updated 2015-07-08 11:14:15 -0500

I read from xml and gram files in my Java node

URL url = MyClass.class.getResource("config.xml");
    configurationManager = new ConfigurationManager(url);

However, this xml file is not included in the jar file created by the gradle. That's why my app will keep returning NullPointerException.

I tried adding files as dependency to build.gradle file, without succes

runtime fileTree(dir: 'src/path/to/my/class', include: ['.gram']) runtime fileTree(dir: 'src/path/to/my/class', include: ['.xml'])

I read at SO , that i should add from "rule" to the jar task, but I can't find it.

So, how can I add files to the jar?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-08 11:29:56 -0500

smihael gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-08 11:02:17 -0500

Seen: 1,125 times

Last updated: Jul 08 '15