0

3rd party jars are not in the repo, may be updated from time to time.

I use dependency in maven as

    <dependency>
        <scope>system</scope>
        <systemPath>$path/$name.jar</systemPath>
   </dependency>

to compile and the jars are not in the bundle which is as I wish.

When spring-boot jar is deployed on the target machine, how to run it?

Chathuranga Chandrasekara
  • 19,894
  • 28
  • 96
  • 137
yk42b
  • 131
  • 1
  • 14
  • Start to use a repository manager and avoid system scope dependencies. Apart from that If I correctly remember spring boot maven plugin does take them into account? – khmarbaise May 08 '18 at 07:33
  • using repo is not an option for this case since it has fixed path on deployed machine and are not managed in the repo – yk42b May 08 '18 at 07:40
  • Your systemPath is a path on the productive machine where you run your application (not a path on the build server)? – J Fabian Meier May 08 '18 at 07:53
  • systemPath is the path on the build machine. And unfortunately the path is different form the target machine – yk42b May 08 '18 at 07:56
  • As far as I know, `` entries are purely used for _building_ the artifact. The runtime classpath is an entirely different thing. You can not expect your application to "look up" a systemPath from the pom at runtime. – J Fabian Meier May 08 '18 at 07:59
  • That's the reason why I ask the question. – yk42b May 08 '18 at 08:05

1 Answers1

0

For including a jar from a path into your Spring boot classpath see

External library folder for Spring Boot.

This means that you can safely manage your dependency in your pom by a repo (avoiding sytemPath dependencies).

J Fabian Meier
  • 30,532
  • 9
  • 61
  • 119