aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-18 16:20:26 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-18 16:20:39 +0100
commita46382dd12b981220243bf11ab3fb115acfabfa0 (patch)
tree94fbca8bf5669b9c252d3b8cc73ccc3ec3a25706
parent565922bbe60fc0a9d015ce00ef8733e6ddfe905c (diff)
remove license issues
Change the versions of some second order dependencies to mitigate license issues. Change-Id: I39745ec1eb7c72fb481a4adafc2805e4bbbd8386 Issue-ID: POLICY-1059 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java13
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/pom.xml24
-rw-r--r--plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml38
-rw-r--r--pom.xml2
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/kafka/KafkaEventSubscriber.java2
6 files changed, 64 insertions, 17 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
index 83321e432..4dcbf80c8 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
@@ -103,8 +103,9 @@ public class ApexJmsProducer implements ApexEventProducer {
// Check if we actually got a connection factory
if (connectionFactory == null) {
- throw new IllegalArgumentException("JMS context lookup of \"" + jmsProducerProperties.getConnectionFactory()
- + "\" returned null for producer (" + this.name + ")");
+ throw new IllegalArgumentException(
+ "JMS context lookup of \"" + jmsProducerProperties.getConnectionFactory()
+ + "\" returned null for producer (" + this.name + ")");
}
} catch (final Exception e) {
final String errorMessage = "lookup of JMS connection factory \""
@@ -231,8 +232,8 @@ public class ApexJmsProducer implements ApexEventProducer {
try {
jmsMessage = jmsSession.createObjectMessage((Serializable) eventObject);
} catch (final Exception e) {
- final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG
- + this.name + ", could not create JMS Object Message for object \"" + eventObject;
+ final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG + this.name
+ + ", could not create JMS Object Message for object \"" + eventObject;
LOGGER.warn(errorMessage, e);
throw new ApexEventRuntimeException(errorMessage);
}
@@ -241,8 +242,8 @@ public class ApexJmsProducer implements ApexEventProducer {
try {
jmsMessage = jmsSession.createTextMessage(eventObject.toString());
} catch (final Exception e) {
- final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG
- + this.name + ", could not create JMS Text Message for object \"" + eventObject;
+ final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG + this.name
+ + ", could not create JMS Text Message for object \"" + eventObject;
LOGGER.warn(errorMessage, e);
throw new ApexEventRuntimeException(errorMessage);
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
index be1b943d4..94ac2bcca 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
@@ -164,7 +164,7 @@ public class ApexKafkaConsumer implements ApexEventConsumer, Runnable {
while (consumerThread.isAlive() && !stopOrderedFlag) {
try {
final ConsumerRecords<String, String> records =
- kafkaConsumer.poll(kafkaConsumerProperties.getConsumerPollDuration());
+ kafkaConsumer.poll(kafkaConsumerProperties.getConsumerPollDuration().toMillis());
for (final ConsumerRecord<String, String> record : records) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("event received for {} for forwarding to Apex engine : {} {}",
diff --git a/plugins/plugins-executor/plugins-executor-jruby/pom.xml b/plugins/plugins-executor/plugins-executor-jruby/pom.xml
index 0620dae9b..5cf59e486 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/pom.xml
+++ b/plugins/plugins-executor/plugins-executor-jruby/pom.xml
@@ -35,6 +35,30 @@
<groupId>org.jruby</groupId>
<artifactId>jruby-core</artifactId>
<version>9.2.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jruby.extras</groupId>
+ <artifactId>bytelist</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jruby</groupId>
+ <artifactId>dirgra</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jffi</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jruby.extras</groupId>
+ <artifactId>bytelist</artifactId>
+ <version>1.0.13</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jffi</artifactId>
+ <version>1.2.16</version>
</dependency>
</dependencies>
diff --git a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml
index 990bc8d61..7ed34ea79 100644
--- a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml
+++ b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml
@@ -37,16 +37,38 @@
<version>${version.hibernate}</version>
<exclusions>
<exclusion>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.javassist</groupId>
+ <artifactId>javaassist</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.activation</groupId>
+ <artifactId>javax.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.4.01</version>
+ </dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ <version>1.8.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.22.0-GA</version>
+ </dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
@@ -70,4 +92,4 @@
</distributionManagement>
</profile>
</profiles>
-</project> \ No newline at end of file
+</project>
diff --git a/pom.xml b/pom.xml
index cbe004414..18fce7126 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,7 @@
<file.encoding>UTF-8</file.encoding>
<version.derby>10.13.1.1</version.derby>
<version.commons-cli>1.4</version.commons-cli>
- <version.kafka>2.0.0</version.kafka>
+ <version.kafka>1.1.1</version.kafka>
<version.jersey>2.26</version.jersey>
<version.eclipselink>2.6.5</version.eclipselink>
<version.hibernate>5.3.6.Final</version.hibernate>
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/kafka/KafkaEventSubscriber.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/kafka/KafkaEventSubscriber.java
index 1c33289b7..54ee9ba92 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/kafka/KafkaEventSubscriber.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/kafka/KafkaEventSubscriber.java
@@ -84,7 +84,7 @@ public class KafkaEventSubscriber implements Runnable {
while (subscriberThread.isAlive() && !subscriberThread.isInterrupted()) {
try {
- final ConsumerRecords<String, String> records = consumer.poll(POLL_DURATION);
+ final ConsumerRecords<String, String> records = consumer.poll(POLL_DURATION.toMillis());
for (final ConsumerRecord<String, String> record : records) {
eventsReceivedCount++;
System.out.println("****** Received event No. " + eventsReceivedCount + " ******");