GeoEvent maven  how to use external  jar file

3648
2
01-14-2014 08:05 PM
chenjun
New Contributor
hi ,i want to use geoEvent sdk to create my outbound class, in the receive function . i write some code .but i must use a external .jar file.  when i build the project ,i get a ****.jar file. i import it in the website(https://localhost:6143/geoevent/manager/components.html), then ,i restart it. i do not see my transport.  in the log file(wrapper.log) ,i see the message.
    ERROR: Bundle sample.gep.sample-transport [341] Error starting file:/C:/Program%20Files/ArcGIS/Server/GeoEventProcessor/deploy/sample-transport-10.2.1.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle sample.gep.sample-transport [341]: Unable to resolve 341.5: missing requirement [341.5] package; (package=org.apache.commons.httpclient))
  it means the geoevent can't find the external  jar file. how to do?
  some one says:put the external .jar file to the deploy folder ,  it not work.
  some one syas: modifythe pom.xml  .
  can some one show  me how to do?
0 Kudos
2 Replies
JavierDelgadillo
Esri Contributor
Chen,

Is HttpClient the external component you're trying to use? 


If so, GEP ships with HttpClient 4.2.  To use the version that ships with GEP, add the following bock of XML to your pom.xml under /project/dependencies node:
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.2</version>
</dependency>

Rebuild your jar file using mvn and redeploy the jar file.  That should allow you to use HttpClient.

If you need a more recent version of HttpClient, then you'll need to drop all of the HttpClient jars and its dependencies into the product's deploy folder (C:/Program Files/ArcGIS/Server/GeoEventProcessor/deploy/).

Let us know if this gets you any further along.

-Javier
0 Kudos
chenjun
New Contributor
Chen,

Is HttpClient the external component you're trying to use? 


If so, GEP ships with HttpClient 4.2.  To use the version that ships with GEP, add the following bock of XML to your pom.xml under /project/dependencies node:
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.2</version>
</dependency>

Rebuild your jar file using mvn and redeploy the jar file.  That should allow you to use HttpClient.

If you need a more recent version of HttpClient, then you'll need to drop all of the HttpClient jars and its dependencies into the product's deploy folder (C:/Program Files/ArcGIS/Server/GeoEventProcessor/deploy/).

Let us know if this gets you any further along.

-Javier


thank you very much  ,it work .
0 Kudos