spring-projects / spring-projects/spring-plugin

How to use external jar in springboot project

Open
#73 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
481
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have a spring boot project what is using spring-plugin, my project is named springboot-sample ( it builds a springboot-sample.war ). My plugins code are in a external project, what build a jar file ( okm-spring-plugins-0.0.1-SNAPSHOT.jar ).

Currently, if I add in my spring boot project (war file ) the next dependency, I get it working:

....
<dependency>
<groupId>com.test</groupId>
<artifactId>okm-spring-plugins</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>/software/git/test-spring-plugin/okm-spring-plugins/target/okm-spring-plugins-0.0.1-SNAPSHOT.jar</systemPath>
</dependency>
...

I have tried to remove the dependency and set the plugin's jar from the command line:

java -jar springboot-sample.war -classpath /software/git/test-spring-plugin/okm-spring-plugins/target/

But seems is not working, any suggestion will be appreciated.

Thanks for your time.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's Maven dependency configuration and the java -jar springboot-sample.war -classpath ... command. Determine what documented usage should cover for the external okm-spring-plugins-0.0.1-SNAPSHOT.jar, and consider the question resolved when the project has a clear, reproducible way to use that jar without the absolute systemPath dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
build-system
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.