Skip to content

Commit

Permalink
remove com.codehaus.jackson dependency and promote com.fasterxml.jack…
Browse files Browse the repository at this point in the history
…son usage
  • Loading branch information
andreaturli committed Jan 28, 2016
1 parent 73260ed commit 151ec2f
Show file tree
Hide file tree
Showing 32 changed files with 309 additions and 221 deletions.
2 changes: 1 addition & 1 deletion brooklyn-library/software/nosql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<!-- for cassandra testing -->
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax</artifactId>
<artifactId>astyanax-thrift</artifactId>
<version>${astyanax.version}</version>
<scope>test</scope>
<exclusions>
Expand Down
5 changes: 0 additions & 5 deletions brooklyn-server/camp/camp-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- ATTN: this moves the dependency version from 1.9.2 to 1.9.13 -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
8 changes: 0 additions & 8 deletions brooklyn-server/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down Expand Up @@ -138,10 +134,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import java.util.List;

import org.apache.brooklyn.util.collections.MutableList;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.Beta;
import com.google.common.base.Function;
import com.google.common.base.Objects;
Expand All @@ -40,7 +40,8 @@ public class BrooklynTags {

public static class NamedStringTag implements Serializable {
private static final long serialVersionUID = 7932098757009051348L;
@JsonProperty final String kind;
@JsonProperty
final String kind;
@JsonProperty final String contents;
public NamedStringTag(@JsonProperty("kind") String kind, @JsonProperty("contents") String contents) {
this.kind = kind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
import org.apache.brooklyn.util.stream.Streams;
import org.apache.brooklyn.util.text.StringEscapes.BashStringEscapes;
import org.apache.brooklyn.util.text.Strings;
import org.codehaus.jackson.annotate.JsonProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.Beta;
import com.google.common.base.Functions;
import com.google.common.base.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
import org.apache.brooklyn.api.mgmt.ha.ManagementNodeSyncRecord;
import org.apache.brooklyn.core.BrooklynVersion;
import org.apache.brooklyn.util.time.Time;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.google.common.base.Objects;

/**
Expand All @@ -36,7 +35,7 @@
*
* @author aled
*/
@JsonAutoDetect(fieldVisibility=Visibility.ANY, getterVisibility=Visibility.NONE)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE)
public class BasicManagementNodeSyncRecord implements ManagementNodeSyncRecord, Serializable {

private static final long serialVersionUID = 4918161834047884244L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.apache.brooklyn.api.objs.SpecParameter;
import org.apache.brooklyn.core.catalog.internal.BasicBrooklynCatalog;
import org.apache.brooklyn.core.catalog.internal.CatalogUtils;
import org.codehaus.jackson.annotate.JsonAutoDetect;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.google.common.base.Joiner;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import org.apache.brooklyn.api.mgmt.rebind.mementos.TreeNode;
import org.apache.brooklyn.api.sensor.AttributeSensor;
import org.apache.brooklyn.api.sensor.Sensor;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.brooklyn.config.ConfigKey;
Expand All @@ -41,6 +39,7 @@
import org.apache.brooklyn.core.objs.BrooklynTypes;
import org.apache.brooklyn.core.sensor.Sensors;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand All @@ -54,7 +53,7 @@
*
* @author aled
*/
@JsonAutoDetect(fieldVisibility=Visibility.ANY, getterVisibility=Visibility.NONE)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility= JsonAutoDetect.Visibility.NONE)
public class BasicEntityMemento extends AbstractTreeNodeMemento implements EntityMemento, Serializable {

private static final Logger log = LoggerFactory.getLogger(BasicEntityMemento.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
import org.apache.brooklyn.api.mgmt.rebind.mementos.FeedMemento;
import org.apache.brooklyn.api.mgmt.rebind.mementos.LocationMemento;
import org.apache.brooklyn.api.mgmt.rebind.mementos.PolicyMemento;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
Expand All @@ -44,7 +43,7 @@
/**
* @deprecated since 0.7.0; this code will move to src/tests/java
*/
@JsonAutoDetect(fieldVisibility=Visibility.ANY, getterVisibility=Visibility.NONE)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE)
public class MutableBrooklynMemento implements BrooklynMemento {

// TODO Is this class pulling its weight? Do we really need it?
Expand Down
103 changes: 103 additions & 0 deletions brooklyn-server/karaf/features/src/main/history/dependencies.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="org.apache.brooklyn-0.9.0-SNAPSHOT">
<feature version="0.0.0">
<feature prerequisite="false" dependency="false">brooklyn-api</feature>
<feature prerequisite="false" dependency="false">brooklyn-api</feature>
<feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
<feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
<feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
<feature prerequisite="false" dependency="false">brooklyn-camp-brooklyn</feature>
<feature prerequisite="false" dependency="false">brooklyn-core</feature>
<feature prerequisite="false" dependency="false">brooklyn-core</feature>
<feature prerequisite="false" dependency="false">brooklyn-rest-api</feature>
<feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
<feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
<feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
<feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
<feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
<feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
<feature prerequisite="false" dependency="false">jetty</feature>
<feature prerequisite="false" dependency="false">swagger-crippled</feature>
<feature prerequisite="false" dependency="false">war</feature>
<feature prerequisite="false" dependency="false">war</feature>
<bundle>mvn:ch.qos.logback/logback-classic/1.0.7</bundle>
<bundle>mvn:ch.qos.logback/logback-core/1.0.7</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.7.0</bundle>
<bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.7.0</bundle>
<bundle>mvn:com.google.code.gson/gson/2.3</bundle>
<bundle>mvn:com.google.guava/guava/17.0</bundle>
<bundle>mvn:com.jayway.jsonpath/json-path/2.0.0</bundle>
<bundle>mvn:com.sun.jersey.contribs/jersey-multipart/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-core/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-core/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-server/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-server/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-servlet/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-servlet/1.19</bundle>
<bundle>mvn:com.sun.jersey/jersey-servlet/1.19</bundle>
<bundle>mvn:com.thoughtworks.xstream/xstream/1.4.7</bundle>
<bundle>mvn:commons-beanutils/commons-beanutils/1.9.1</bundle>
<bundle>mvn:commons-codec/commons-codec/1.9</bundle>
<bundle>mvn:commons-codec/commons-codec/1.9</bundle>
<bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>
<bundle>mvn:commons-io/commons-io/2.4</bundle>
<bundle>mvn:commons-lang/commons-lang/2.4</bundle>
<bundle>mvn:io.swagger/swagger-annotations/1.5.3</bundle>
<bundle>mvn:io.swagger/swagger-models/1.5.3</bundle>
<bundle>mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
<bundle>mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
<bundle>mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
<bundle>mvn:net.minidev/asm/1.0.2</bundle>
<bundle>mvn:net.minidev/json-smart/2.1.1</bundle>
<bundle>mvn:net.schmizz/sshj/0.8.1</bundle>
<bundle>mvn:org.apache.brooklyn.camp/camp-base/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn.camp/camp-server/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-api/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-camp/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-commands/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-core/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-jsgui/0.9.0-SNAPSHOT/war</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-logback-includes/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-rest-api/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-rest-server/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-rt-osgi/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-utils-groovy/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.brooklyn/brooklyn-utils-rest-swagger/0.9.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.commons/commons-compress/1.4</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
<bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.4.1</bundle>
<bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/0.9.9_1</bundle>
<bundle>mvn:org.bouncycastle/bcpkix-jdk15on/1.49</bundle>
<bundle>mvn:org.bouncycastle/bcprov-ext-jdk15on/1.49</bundle>
<bundle>mvn:org.codehaus.groovy/groovy-all/2.3.7</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-jaxrs/${jackson.version}</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</bundle>
<bundle>mvn:org.freemarker/freemarker/2.3.22</bundle>
<bundle>mvn:org.jvnet.mimepull/mimepull/1.9.3</bundle>
<bundle>mvn:org.slf4j/jul-to-slf4j/1.6.6</bundle>
<bundle>mvn:org.yaml/snakeyaml/1.11</bundle>
<bundle>wrap:mvn:com.google.http-client/google-http-client/1.18.0-rc</bundle>
<bundle>wrap:mvn:com.maxmind.geoip2/geoip2/0.8.1</bundle>
<bundle>wrap:mvn:javax.validation/validation-api/1.1.0.Final</bundle>
<bundle>wrap:mvn:org.tukaani/xz/1.4</bundle>
<bundle>wrap:mvn:xpp3/xpp3_min/1.1.4c</bundle>
</feature>
</features>
22 changes: 1 addition & 21 deletions brooklyn-server/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,6 @@
<artifactId>jetty-schemas</artifactId>
<version>${jetty-schemas.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
Expand Down Expand Up @@ -402,7 +382,7 @@
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
Expand Down
7 changes: 3 additions & 4 deletions brooklyn-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
<slf4j.version>1.6.6</slf4j.version> <!-- used for java.util.logging jul-to-slf4j interception -->
<guava.version>17.0</guava.version>
<xstream.version>1.4.7</xstream.version>
<jackson.version>1.9.13</jackson.version> <!-- codehaus jackson, used by brooklyn rest server -->
<fasterxml.jackson.version>2.4.5</fasterxml.jackson.version> <!-- more recent jackson, but not compatible with old annotations! -->
<fasterxml.jackson.version>2.7.0</fasterxml.jackson.version> <!-- more recent jackson, but not compatible with old annotations! -->
<jersey.version>1.19</jersey.version>
<httpclient.version>4.4.1</httpclient.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
Expand Down Expand Up @@ -125,12 +124,12 @@
<geronimo-jta_1.1_spec.version>1.1.1</geronimo-jta_1.1_spec.version>
<sleepycat-je.version>5.0.34</sleepycat-je.version>
<commons-cli.version>1.2</commons-cli.version>
<astyanax.version>1.56.24</astyanax.version>
<astyanax.version>3.8.0</astyanax.version>
<jcouchdb.version>0.11.0-1</jcouchdb.version>
<solr.version>4.7.0</solr.version>
<jtidy.version>r8-20060801</jtidy.version>
<opendmk_jmxremote_optional_jar.version>1.0-b01-ea</opendmk_jmxremote_optional_jar.version>
<resteasy.version>3.0.8.Final</resteasy.version>
<resteasy.version>3.0.14.Final</resteasy.version>
<jopt.version>4.3</jopt.version>
<concurrentlinkedhashmap.version>1.0_jdk5</concurrentlinkedhashmap.version>
<javax-servlet.version>3.1.0</javax-servlet.version>
Expand Down
5 changes: 5 additions & 0 deletions brooklyn-server/rest/rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
</parent>

<dependencies>
<dependency>
<groupId>org.apache.brooklyn</groupId>
<artifactId>brooklyn-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Objects;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

Expand All @@ -39,6 +40,7 @@ public class CatalogEntitySummary extends CatalogItemSummary {
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
private final Set<EffectorSummary> effectors;

@JsonCreator
public CatalogEntitySummary(
@JsonProperty("symbolicName") String symbolicName,
@JsonProperty("version") String version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import java.util.Objects;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
Expand Down
Loading

0 comments on commit 151ec2f

Please sign in to comment.