0

I have already built the okta-sdk-0.0.4-SNAPSHOT.jar using maven, and I am able to compile my test api code without issues. https://github.com/okta/oktasdk-java

However, at runtime, the API calls need some more jar files, for example the one that includes packages like: org.apache.http.Header, etc..

Of course I can go on guessing which dependent JAR files are missing in my classpath by looking at the runtime errors, but I am looking for any known list of runtime dependencies.

Thanks,

Jatin

Jatin
  • 667
  • 8
  • 16

3 Answers3

1

I recommend adding the maven shade plugin to your build to create an uber jar. That is a jar which includes all required dependencies.

Andreas Dolk
  • 113,398
  • 19
  • 180
  • 268
1

You can create uber jar with all the dependencies in the final jar as follows .

     <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <finalName>uber-${artifactId}-${version}</finalName>
            </configuration>
        </plugin> 

or you can copy all the dependencies to lib folder to used while starting the server.

<build> 
  <plugins> 
    <plugin> 
    <artifactId>maven-dependency-plugin</artifactId> 
    <executions> 
      <execution> 
        <phase>install</phase> 
          <goals> 
            <goal>copy-dependencies</goal> 
          </goals> 
          <configuration> 
             <outputDirectory>${project.build.directory}/lib</outputDirectory> 
          </configuration> 
        </execution> 
      </executions> 
    </plugin> 
  </plugins> 
</build> 
ravthiru
  • 8,878
  • 2
  • 43
  • 52
0

Following are required dependencies. One or two of them might be extra, but the shown list covers all the required ones.

enter image description here

Sohaib Ajmal
  • 261
  • 1
  • 4