开发者

How to load all dependency on mavenhub.com [closed]

This开发者_StackOverflow question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

I want to user this jar package, but there are a lot of dependencies - so, how can i load these jars? http://mavenhub.com/mvn/central/com.force.sdk/force-jpa/22.0.6-BETA#depMaven


I suggest to you read docs about Maven. You may start from Maven in 5 Minutes. Following instructions from this tutorial create simple application:

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

After that in current directory Maven creates my-app directory where you can find sample pom.xml file.

Open it and correct dependencies node:

  • delete junit:
  <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
  </dependency>
  
  • add force:
  <dependency>
      <groupId>com.force.sdk</groupId>
      <artifactId>force-jpa</artifactId>
      <version>22.0.6-BETA</version>
  </dependency>
  

After that in my-app run command mvn dependency:copy-dependencies. Maven download all dependencies and place it under target/dependency directory. For example I have the following JAR list:

$ ls -1 target/dependency
asm-3.3.1.jar
datanucleus-core-2.2.3.jar
datanucleus-enhancer-2.1.0-release.jar
datanucleus-jpa-2.1.7.jar
force-connector-22.0.6-BETA.jar
force-jpa-22.0.6-BETA.jar
force-metadata-api-22.0.0.jar
force-partner-api-22.0.0.jar
force-wsc-22.0.0.jar
geronimo-jpa_2.0_spec-1.0.jar
gson-1.7.1.jar
jdo2-api-2.3-eb.jar
js-1.7R2.jar
slf4j-api-1.6.1.jar
transaction-api-1.1.jar

Now you may do anything with these JARs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜