Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use external jar in springboot project #73

Open
darkman97i opened this issue Oct 23, 2019 · 2 comments
Open

How to use external jar in springboot project #73

darkman97i opened this issue Oct 23, 2019 · 2 comments

Comments

@darkman97i
Copy link

darkman97i commented Oct 23, 2019

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.

@LitschiW
Copy link

Hi, I know this question is quite old by now, but are there any updates on this?

@darkman97i
Copy link
Author

In my case I solved using jspf what allows to load plugins looking at the whole project based on annotations and from external folders:
https://mvnrepository.com/artifact/jspf/core/1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants