简体   繁体   English

事实非Maven Java Jar依赖关系

[英]Factual non-Maven Java Jar Dependencies

I want to use the Factual Jar file for Geo Location services however I have imported the Jar file to the project but the documentation states that the pom.xml tells you what dependencies you'll need to plug into your project to get the driver to work. 我想将Factual Jar文件用于地理位置服务,但是我已将Jar文件导入到项目中,但是文档指出pom.xml告诉您需要插入什么项目才能使驱动程序正常工作。

My question is what dependencies do I need to import and where at in the project. 我的问题是我需要导入哪些依赖项以及在项目中的什么位置。 I am using Netbeans to build my Java projects. 我正在使用Netbeans构建我的Java项目。

pom.xml file: http://repo1.maven.org/maven2/com/factual/factual-java-driver/1.5.0/factual-java-driver-1.5.0.pom pom.xml文件: http : //repo1.maven.org/maven2/com/factual/factual-java-driver/1.5.0/factual-java-driver-1.5.0.pom

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.factual</groupId>
<artifactId>factual-java-driver</artifactId>
<version>1.5.0</version>
<packaging>jar</packaging>
<name>factual-java-driver</name>
<description>Factual's officially supported Java driver</description>
<url>http://github.com/Factual/factual-java-driver</url>
<scm>
<connection>
scm:git:git@github.com:Factual/factual-java-driver.git
</connection>
<developerConnection>
scm:git:git@github.com:Factual/factual-java-driver.git
</developerConnection>
<url>git@github.com:Factual/factual-java-driver.git</url>
<!--
url>https://github.com/Factual/factual-java-driver/tree/master</url> <connection>scm:git:git://github.com/Factual/factual-java-driver.git</connection
-->
</scm>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>
http://github.com/Factual/factual-java-driver/blob/master/LICENSE.txt
</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>aaron</id>
<name>Aaron Crow</name>
<email>aaron@factual.com</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>r09</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.7.0-beta</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-lgpl</artifactId>
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
<configuration>
<pushChanges>false</pushChanges>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>jar-with-dependencies.xml</descriptor>
</descriptors>
<finalName>factual-java-driver</finalName>
<outputDirectory>target</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
</plugin>
</plugins>
</build>
<!--
distributionManagement> <repository> <id>sonatype-nexus-staging</id> <name>Sonatype Staging</name> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> </repository> </distributionManagement
-->
</project>

You can manually download the dependencies from http://mvnrepository.com/ . 您可以从http://mvnrepository.com/手动下载依赖项。 Pom.xml shows the name of the dependencies in detail: Pom.xml详细显示了依赖项的名称:

<dependencies>
  <dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>r09</version>
  </dependency>
  ...
<dependencies> 

Just check the artifactId's to see what to search for. 只需检查artifactId即可查看要搜索的内容。 Go ahead and download them by searching: 继续并通过搜索下载它们:

  • guava 番石榴
  • google-api-client google-api-client
  • jackson-core-asl 杰克逊·科尔·阿塞尔
  • jackson-core-lgpl 杰克逊核心
  • jackson-mapper-asl 杰克逊·马珀·阿塞尔
  • commons-io 公地
  • json json
  • junit unit

(be careful to download correct version of each dependency) (请谨慎下载每个依赖项的正确版本)
At the end, you need to import these 8 jar files to your project, and then it should work. 最后,您需要将这8个jar文件导入到您的项目中,然后它才能工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM