Scenes
If you follow the microservice version to teach you how to build an environment locally and run the front-end and back-end projects:
https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/109363303
After the Ruoyi microservice version is successfully built and run above, when you need to introduce a public jar package dependency, you only need to put the coordinate of the dependency in ruoyi-common-core
After adding it in pom.xml in, it can be referenced under other modules
But if the third-party jar package is not in the Maven central warehouse, for example, you need to introduce the third-party MobileIMSDK4J_tcp.jar
jar包。
Note:
Blog:
https://blog.csdn.net/badao_liumang_qizhi
Follow the public
account Domineering
programmers Get programming-related e-books, tutorial pushes and free downloads.
achieve
First, create a new libs directory under common-core, and put the jar packages that need to be referenced in this directory
Where you add dependencies
<dependency>
<groupId>mobileimsdk4j_tcp</groupId>
<artifactId>mobileimsdk4j_tcp</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/libs/mobileimsdk4j_tcp.jar</systemPath>
</dependency>
Note that the coordinates and version number here are arbitrary, but the scope should write system, and then systemPath is the path of the jar package above
Then, if you use it in this way, you need to package these jar packages when you package the project.
Then you need to rely on packaged plugins
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<extdirs>${project.basedir}/libs</extdirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
Pay attention to the path of extdirs here, here is the libs directory under the project root directory