0

Install manually jar file into repository.

I want to install this SDK as maven dependency.

https://developer.intuit.com/docs/0100_quickbooks_online/0400_tools/0005_accounting/0200_java/0002_installing_the_java_sdk_for_quickbooks

I tried this:

mvn install:install-file -DgroupId=com.intuit.code.devkit.v3 -DartifactId=ipp-v3-java-devkit -Dversion=2.5.0 -Dpackaging=jar -Dfile=c:\lib\ipp-java-qbapihelper-1.2.1-jar-with-dependencies.jar

But I get

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing c:\lib\ipp-java-qbapihelper-1.2.1-jar-with-dependencies.jar to C:\Users\plamen\.m2\repository\com\intuit\code\devkit\v3\ipp-v3-java-devkit\2.5.0\ipp-v3-java-devkit-2.5.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.631 s
[INFO] Finished at: 2016-09-02T17:04:51+03:00
[INFO] Final Memory: 7M/123M
[INFO] ------------------------------------------------------------------------

When I browse my local repository I can't find any jar file into the directory. Can somebody give some advice how I can fix this?

abarisone
  • 3,707
  • 11
  • 35
  • 54
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

1 Answers1

1

What I've done in the past to make this work is:

  • Copy the jar file(s) of interest to a temp folder i.e. project root/tmp
  • Run the following command (adjusting the parameters accordingly) in the command line from the the project root directory:

    mvn install:install-file -Dfile=tmp/<filename>.jar -DgroupId=intuit.code.devkit.v3 -DartifactId=ipp-v3-java-devkit -Dversion=2.5.0 -Dpackaging=jar -DlocalRepositoryPath=<repo path> (i.e. src/dependencies/jars)
    
  • After that command you should see a src/dependencies/jars/com/... directory with maven artifacts under it

  • Add dependency to your pom.xml

    <!— <project> is the parent element —>
    <repositories>
        <repository>
            <id>system-jars</id>
            <url>file://${basedir}/src/dependencies/jars</url>
        </repository>
    </repositories>
    <!— Add the dependency —>
    <dependency>
        <groupId>com.intuit.code.devkit.v3</groupId>
        <artifactId>ipp-v3-java-devkit</artifactId>
        <version>2.5.0</version>
    </dependency>
    
  • Perform a maven clean and package. Verify the classes are included in the end artifact and then delete the tmp directory once everything is correct.

Developer Guy
  • 2,318
  • 6
  • 19
  • 37