Scenario: Maven Project adds third-party jar pack dependencies
Workaround: Create a used dependency directory structure in the local warehouse.
Create the following steps:
A, take Ojdbc14.jar as an example, if we want to write the following reference in Pom.xml:
<dependency>
<groupId>me.lib</groupId>
<artifactid>me-ojdbc14</artifactid >
<version>10.2.0.1.0</version>
<scope>compile</scope>
</dependency >
B, because GroupID is me.lib, it is necessary to create a hierarchy of me/lib in the local warehouse directory, just like the package name
C, followed by Artifactid, version to create the next level of directory, the final form of me/lib/me-ojdbc14/10.2.0.1.0 directory
D, put the Ojdbc14.jar into the me/lib/me-ojdbc14/10.2.0.1.0 directory, renamed to Me-ojdbc14-10.20.1.0.jar, to this even completed
Where steps B, c, and D can be replaced with the MVN command, a command creates a directory structure. First configure the MVN environment variables, the CD enters the directory where Ojdbc14.jar resides, and then execute the following command:
MVN install:install-file-dgroupid=me.lib-dartifactid=me-ojdbc14-dversion=10.2.0.1.0-dpackaging=jar-dfile= Ojdbc14.jar
In the spirit of "lazy", will be tedious to simplify. Let me find a way to get the project running down from the version library. You do not need to find the local warehouse directory location to complete all operations in eclipse.
1, under the MAVEN project, create the directory of the jar package files to reference.
2, edit the project Pom.xml file, increase the configuration project reference warehouse.
3, edit the project Pom.xml file and add jar bundle dependencies.
Look at the picture more intuitive: