naxgroup.blogg.se

Maven install a local jar
Maven install a local jar









maven install a local jar

It is therefore not a good value for the version for my artifact. Although there was the number 8 in the driver name, it does not reflect the actual version of the driver but just the JDK version for compilation as mentioned above. Last in the directory structure is the version of the driver. However, this number bears no meaning for the actual artifact which is the Oracle JDBC driver, so I’m going to drop the number 8 and only use ojdbc as my artifactId. The 8 in that name reflects with which JDK the Oracle JDBC driver has been compiled, in this case with JDK 8. jar falls away leaving only ojdbc8 as the artifactId. The file extension is not carried along in the artifactId meaning that the. The Oracle JDBC driver is named ojdbc8.jar. To reflect the groupId structure on disk accordingly, where com is the top level groupId and oracle the second level groupId (you can have as many levels as you like), it will have to be nested in subfolders on disk and look like following: com/oracle.

maven install a local jar

In my example I would like to use the groupId com.oracle for my JDBC driver. There are only three main elements in that structure:Įver Maven artifact is grouped into a groupId, which is in itself very similar to Java package names and their organization on disk. The structure within that folder is rather simple and looks like this: However, the only one of interest regarding manual artifact installation is the repository folder. In there you will find one or more folders, depending on your Maven setup. The Maven repository Repository structureīy default, Maven will store all artifacts and associated files in your home directory under. This comes in handy if you have, for example, Maven integrated in your IDE and the mvn binary not available to yourself in the command line. However, this time I was thinking to go the extra mile and actually figure out a way of how to do it entirely manually. Usually this is easily accomplished via mvn install:install-file -Dfile= -DgroupId= -DartifactId= -Dversion= -Dpackaging=, see Guide to installing 3rd party JARs for more details on that. I find myself once again in the situation that I have to install the Oracle JDBC driver into my local Maven repository.











Maven install a local jar