diff --git a/README b/README index b1a0e72..22252e8 100644 --- a/README +++ b/README @@ -4,32 +4,14 @@ socket is on TCP port 8888 and no Job events will be published. You can choose to enable event publishing for all jobs in the Jenkins' global config or enable the plugin on a per job basis. -To build this plugin you will need to have libzmq installed on your -Jenkins server. You will also need to build a local copy of jzmq -for the architecture of your Jenkins server. To get a build of jzmq -that worked I had to tweak jzmq version 2.1.0 slightly. You can -get that version at: - - https://github.com/cboylan/jzmq - -First clone the above repository and check out the 2.1.0-build-fix -branch. Then run the following commands to build jzmq: - - ./autogen.sh && ./configure && make - #I had to skip tests as they would not run - maven clean install -Dmaven.test.skip=true - -Now you can build this plugin: - - maven clean package - # Copy target/zmq-event-publisher.hpi to the Jenkins - # plugin dir and restart Jenkins. - -All of this will be much easier if you use the same OS and CPU -architecture on your build host as on the Jenkins server. +This plugin uses jeromq to satisfy the dependency on ZMQ. It is +possible to use jzmq instead if you need the features that jeromq +is lacking; however, it is a pain to get jzmq built and is less +portable. If you really really want jzmq look back in the git +history and you will find the old versions of this plugin that +depended on jzmq. TODO: -Better error handling (eg bind errors due to port conflicts) Avoid reading in the global config for each event if possible. Cleanup config.jelly for the non global Job config. diff --git a/pom.xml b/pom.xml index 6b165c8..1cc2341 100644 --- a/pom.xml +++ b/pom.xml @@ -64,23 +64,16 @@ - - org.zeromq - jzmq - 2.1.0-SNAPSHOT - compile - - - org.zeromq - jzmq - 2.1.0-SNAPSHOT - native-${os.arch}-${native.os} - com.google.code.gson gson 1.4 + + org.jeromq + jeromq + 0.2.0 + diff --git a/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/RunListenerImpl.java b/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/RunListenerImpl.java index 9e29dd0..4d19a84 100644 --- a/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/RunListenerImpl.java +++ b/src/main/java/org/jenkinsci/plugins/ZMQEventPublisher/RunListenerImpl.java @@ -27,8 +27,8 @@ import hudson.model.listeners.RunListener; import java.util.logging.Level; import java.util.logging.Logger; -import org.zeromq.ZMQ; -import org.zeromq.ZMQException; +import org.jeromq.ZMQ; +import org.jeromq.ZMQException; /* * Listener to publish Jenkins build events through ZMQ @@ -68,7 +68,6 @@ public class RunListenerImpl extends RunListener { LOGGER.log(Level.INFO, String.format("Changing ZMQ PUB port from %d to %d", port, tmpPort)); try { - publisher.unbind(bind_addr); publisher.close(); } catch (ZMQException e) { /* Let the garbage collector sort out cleanup */