r3917 - in trunk: . pollen-rest-api pollen-rest-api/src/main/java/org/chorem/pollen/rest/api pollen-rest-api/src/test/java/org/chorem/pollen/rest/api
Author: tchemit Date: 2014-05-07 11:04:29 +0200 (Wed, 07 May 2014) New Revision: 3917 Url: http://forge.chorem.org/projects/pollen/repository/revisions/3917 Log: - receive object as json - change from gson to jackson since gson can only deal with field accessors :( - clean deps Added: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/Jsons.java trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/TopiaEntityConverter.java trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/TopiaEntityConverterTest.java Modified: trunk/pollen-rest-api/pom.xml trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationListener.java trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java trunk/pom.xml Modified: trunk/pollen-rest-api/pom.xml =================================================================== --- trunk/pollen-rest-api/pom.xml 2014-05-06 15:56:39 UTC (rev 3916) +++ trunk/pollen-rest-api/pom.xml 2014-05-07 09:04:29 UTC (rev 3917) @@ -104,12 +104,27 @@ <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> - <dependency> + <!--dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> + </dependency--> + + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> </dependency> <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + </dependency> + + <dependency> + <groupId>com.fasterxml.jackson.module</groupId> + <artifactId>jackson-module-afterburner</artifactId> + </dependency> + + <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> </dependency> @@ -146,6 +161,12 @@ </dependency> <dependency> + <groupId>postgresql</groupId> + <artifactId>postgresql</artifactId> + <scope>runtime</scope> + </dependency> + + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-jcl</artifactId> <scope>test</scope> Added: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/Jsons.java =================================================================== --- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/Jsons.java (rev 0) +++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/Jsons.java 2014-05-07 09:04:29 UTC (rev 3917) @@ -0,0 +1,48 @@ +package org.chorem.pollen.rest.api; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.module.afterburner.AfterburnerModule; +import org.chorem.pollen.persistence.PollenEntityEnum; +import org.nuiton.topia.persistence.TopiaEntity; + +/** + * Created on 5/7/14. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 2.0 + */ +public class Jsons { + + public static ObjectMapper newSimpleMapper() { + + ObjectMapper mapper = new ObjectMapper() + .configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) //FIXME Could be better ? + .registerModule(new AfterburnerModule()); + + return mapper; + + } + + public static ObjectMapper newEntityMapper() { + + SimpleModule module = new SimpleModule(); + + for (Class<? extends TopiaEntity> entityClass : PollenEntityEnum.getContractClasses()) { + + Class concreteClass = PollenEntityEnum.getImplementationClass(entityClass); + module.addAbstractTypeMapping(entityClass, concreteClass); + + } + + ObjectMapper mapper = newSimpleMapper() + .registerModule(module); + + return mapper; + + } + +} Property changes on: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/Jsons.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java =================================================================== --- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2014-05-06 15:56:39 UTC (rev 3916) +++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2014-05-07 09:04:29 UTC (rev 3917) @@ -23,16 +23,11 @@ * #L% */ +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonNull; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.pollen.persistence.PollenEntityEnum; @@ -58,9 +53,7 @@ import java.lang.annotation.Target; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Type; import java.util.Collections; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -99,64 +92,97 @@ HttpServletResponse response = context.getResponse(); response.setContentType("application/json"); - String[] includeCollection = null; - ExposeCollection annotation = call.getCurrent().getMethod().getAnnotation(ExposeCollection.class); - if (annotation != null) { - includeCollection = annotation.values(); - } +// String[] includeCollection = null; +// ExposeCollection annotation = call.getCurrent().getMethod().getAnnotation(ExposeCollection.class); +// if (annotation != null) { +// includeCollection = annotation.values(); +// } Object map; + ObjectMapper mapper; + if (model instanceof InvalidFormException) { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); - map = toMap(((InvalidFormException) model).getErrors()); - } else { + map = toMap(model); - map = toMap(model, includeCollection); + mapper = Jsons.newSimpleMapper(); - } + } else if (model instanceof PollenPrincipalRef) { - GsonBuilder gsonBuilder = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { - @Override - public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext c) { - JsonElement result; + map = toMap(model); - if (src == null) { - result = JsonNull.INSTANCE; - } else { - result = new JsonPrimitive(src.getTime()); - } + mapper = Jsons.newSimpleMapper(); - return result; + } else { - } - }); + map = model; + mapper = Jsons.newEntityMapper(); + + } + +// GsonBuilder gsonBuilder = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { +// @Override +// public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext c) { +// JsonElement result; +// +// if (src == null) { +// result = JsonNull.INSTANCE; +// } else { +// result = new JsonPrimitive(src.getTime()); +// } +// +// return result; +// +// } +// }); + PollenRestApiApplicationContext applicationContext = PollenRestApiApplicationContext.getApplicationContext(context.getServletContext()); boolean devMode = applicationContext.getApplicationConfig().isDevMode(); + + String json; + if (devMode) { - gsonBuilder.setPrettyPrinting(); + + ObjectWriter objectWriter = mapper.writerWithDefaultPrettyPrinter(); + json = objectWriter.writeValueAsString(map); +// gsonBuilder.setPrettyPrinting(); + + } else { + + json = mapper.writeValueAsString(map); + } - Gson gson = gsonBuilder.create(); - String json = gson.toJson(map); +// Gson gson = gsonBuilder.create(); +// +// String json = gson.toJson(map); PrintWriter out = context.getOut(); out.print(json); - } - protected Object toMap(Multimap<String, String> model) { - Map<String, Object> result = new HashMap<>(); - for (String key : model.keySet()) { - result.put(key, model.get(key)); - } - return result; } protected <M> Object toMap(M model, String... includeCollection) { + if (model instanceof InvalidFormException) { + + InvalidFormException invalidFormException = (InvalidFormException) model; + + Multimap<String, String> errors = invalidFormException.getErrors(); + + Map<String, Object> result = new HashMap<>(); + for (String key : errors.keySet()) { + result.put(key, errors.get(key)); + } + + return result; + + } + if (model instanceof PollenPrincipalRef<?>) { PollenPrincipalRef<?> pollenEntityRef = (PollenPrincipalRef<?>) model; Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationListener.java =================================================================== --- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationListener.java 2014-05-06 15:56:39 UTC (rev 3916) +++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationListener.java 2014-05-07 09:04:29 UTC (rev 3917) @@ -23,7 +23,6 @@ * #L% */ -import org.apache.commons.beanutils.Converter; import org.chorem.pollen.persistence.PollenEntityEnum; import org.chorem.pollen.services.PollenService; import org.debux.webmotion.server.WebMotionServerListener; @@ -35,7 +34,6 @@ import org.nuiton.topia.persistence.TopiaEntity; import java.lang.reflect.Type; -import java.util.Date; /** * TODO @@ -50,47 +48,30 @@ // --- init converters --- // - serverContext.addConverter(new Converter() { - @Override - public Object convert(Class type, Object value) { - Object result = null; - if (value != null) { - if (value.getClass().isAssignableFrom(Date.class)) { - result = value; - } else { - Object o = ((Object[]) value)[0]; - String sTime = o.toString(); - Long time = Long.parseLong(sTime); - result = new Date(time); - } - } - return result; - } +// serverContext.addConverter(new Converter() { +// @Override +// public Object convert(Class type, Object value) { +// Object result = null; +// if (value != null) { +// if (value.getClass().isAssignableFrom(Date.class)) { +// result = value; +// } else { +// Object o = ((Object[]) value)[0]; +// String sTime = o.toString(); +// Long time = Long.parseLong(sTime); +// result = new Date(time); +// } +// } +// return result; +// } +// +// }, Date.class); - }, Date.class); + for (Class<? extends TopiaEntity> entityClass : PollenEntityEnum.getContractClasses()) { - Converter entityconverter = new Converter() { - @Override - public TopiaEntity convert(Class type, Object value) { - TopiaEntity result; - if (value != null && value.getClass().isAssignableFrom(TopiaEntity.class)) { - result = (TopiaEntity) value; - } else { - Class<?> implementationClass = PollenEntityEnum.getImplementationClass(type); - try { - result = (TopiaEntity) implementationClass.newInstance(); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - return result; - } + TopiaEntityConverter<? extends TopiaEntity> converter = TopiaEntityConverter.newconverter(entityClass); + serverContext.addConverter(converter, entityClass); - }; - for (Class<? extends TopiaEntity> entityClass : PollenEntityEnum.getContractClasses()) { - serverContext.addConverter(entityconverter, entityClass); } // --- init injectors --- // @@ -98,19 +79,23 @@ serverContext.addInjector(new ExecutorParametersInjectorHandler.Injector() { @Override public PollenRestApiRequestContext getValue(Mapping m, Call call, String name, Class<?> type, Type generic) { + PollenRestApiRequestContext result = null; if (PollenRestApiRequestContext.class.isAssignableFrom(type)) { HttpContext httpContext = call.getContext(); result = PollenRestApiRequestContext.getRequestContext(httpContext); } + return result; + } }); serverContext.addInjector(new ExecutorParametersInjectorHandler.Injector() { @Override public PollenService getValue(Mapping m, Call call, String name, Class type, Type generic) { + PollenService result = null; if (PollenService.class.isAssignableFrom(type)) { HttpContext httpContext = call.getContext(); @@ -119,7 +104,9 @@ PollenRestApiRequestContext.getRequestContext(httpContext); result = requestContext.getServiceContext().newService(type); } + return result; + } }); @@ -130,6 +117,7 @@ PollenRestApiApplicationContext.setApplicationContext( serverContext.getServletContext(), applicationContext); + } @Override @@ -144,5 +132,7 @@ if (applicationContext != null) { applicationContext.close(); } + } + } Added: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/TopiaEntityConverter.java =================================================================== --- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/TopiaEntityConverter.java (rev 0) +++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/TopiaEntityConverter.java 2014-05-07 09:04:29 UTC (rev 3917) @@ -0,0 +1,100 @@ +package org.chorem.pollen.rest.api; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.apache.commons.beanutils.converters.AbstractConverter; +import org.chorem.pollen.persistence.PollenEntityEnum; +import org.chorem.pollen.services.PollenTechnicalException; +import org.nuiton.topia.persistence.TopiaEntity; + +import java.io.IOException; + +/** + * Created on 5/6/14. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 2.0 + */ +public class TopiaEntityConverter<E extends TopiaEntity> extends AbstractConverter { + + protected Class<E> entityType; + + protected Class<E> implementationClass; + + protected ObjectMapper mapper; + + public static <E extends TopiaEntity> TopiaEntityConverter<E> newconverter(Class<E> entityType) { + return new TopiaEntityConverter<>(entityType); + } + + public TopiaEntityConverter(Class<E> entityType) { + + this.entityType = entityType; + + this.implementationClass = PollenEntityEnum.getImplementationClass(entityType); + + SimpleModule module = new SimpleModule(); + + for (Class<? extends TopiaEntity> entityClass : PollenEntityEnum.getContractClasses()) { + + Class concreteClass = PollenEntityEnum.getImplementationClass(entityClass); + module.addAbstractTypeMapping(entityClass, concreteClass); + + } + + mapper = Jsons.newEntityMapper(); + + } + + public ObjectMapper getMapper() { + + return mapper; + + } + + @Override + protected String convertToString(Object value) throws Throwable { + + String result = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(value); + return result; + + } + + @Override + protected <T> T convertToType(Class<T> type, Object value) throws Throwable { + + String stringValue; + + if (value instanceof String) { + + stringValue = (String) value; + + } else { + + stringValue = ((String[]) value)[0]; + + } + + try { + + T result = (T) mapper.readValue(stringValue, implementationClass); + + return result; + + } catch (IOException e) { + throw new PollenTechnicalException("Could not convert " + stringValue + " to " + type.getName(), e); + } + + } + + @Override + protected Class<E> getDefaultType() { + + return entityType; + + } + + +} Property changes on: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/TopiaEntityConverter.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java =================================================================== --- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java 2014-05-06 15:56:39 UTC (rev 3916) +++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java 2014-05-07 09:04:29 UTC (rev 3917) @@ -22,10 +22,14 @@ */ import org.apache.http.client.fluent.Request; +import org.chorem.pollen.persistence.entity.Choice; +import org.chorem.pollen.persistence.entity.ChoiceImpl; import org.chorem.pollen.persistence.entity.ChoiceType; import org.chorem.pollen.persistence.entity.CommentVisibility; import org.chorem.pollen.persistence.entity.Poll; +import org.chorem.pollen.persistence.entity.PollImpl; import org.chorem.pollen.persistence.entity.PollType; +import org.chorem.pollen.persistence.entity.ResultVisibility; import org.chorem.pollen.persistence.entity.VoteVisibility; import org.chorem.pollen.services.PollenFixtures; import org.junit.Before; @@ -43,6 +47,7 @@ * @author Tony Chemit <chemit@codelutin.com> * @since 2.0 */ +@Ignore public class PollApiTest extends AbstractPollenRestApiTest { @Before @@ -108,21 +113,36 @@ } @Test - public void postPoll() throws URISyntaxException, IOException { - Request request = createRequest("/v1/polls"). - addParameter("poll.pollType", PollType.FREE.name()). - addParameter("poll.commentVisibility", CommentVisibility.EVERYBODY.name()). - addParameter("poll.voteVisibility", VoteVisibility.EVERYBODY.name()). - addParameter("poll.voteCountingType", "1"). - addParameter("poll.title", "title"). - addParameter("poll.choice[1].choiceType", ChoiceType.TEXT.name()). - addParameter("poll.choice[1].name", "choiceB"). - addParameter("poll.choice[0].choiceType", ChoiceType.TEXT.name()). - addParameter("poll.choice[0].name", "choiceA"). - Post(); + public void postPoll() throws Throwable { + + Poll poll = new PollImpl(); + poll.setPollType(PollType.FREE); + poll.setCommentVisibility(CommentVisibility.EVERYBODY); + poll.setResultVisibility(ResultVisibility.EVERYBODY); + poll.setVoteVisibility(VoteVisibility.EVERYBODY); + poll.setVoteCountingType(1); + poll.setTitle("title"); + Choice choice1 = new ChoiceImpl(); + choice1.setChoiceType(ChoiceType.TEXT); + choice1.setName("choiceA"); + poll.addChoice(choice1); + Choice choice2 = new ChoiceImpl(); + choice2.setChoiceType(ChoiceType.TEXT); + choice2.setName("choiceB"); + poll.addChoice(choice2); + + TopiaEntityConverter<Poll> converter = TopiaEntityConverter.newconverter(Poll.class); + + String strPoll = converter.convertToString(poll); + + Request request = createRequest("/v1/polls") + .addParameter("poll", strPoll) + .Post(); + String content = request.execute().returnContent().asString(); showTestResult(content); assertNotNull(content); + } @Ignore Added: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/TopiaEntityConverterTest.java =================================================================== --- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/TopiaEntityConverterTest.java (rev 0) +++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/TopiaEntityConverterTest.java 2014-05-07 09:04:29 UTC (rev 3917) @@ -0,0 +1,41 @@ +package org.chorem.pollen.rest.api; + +import org.chorem.pollen.persistence.entity.ChoiceType; +import org.chorem.pollen.persistence.entity.CommentVisibility; +import org.chorem.pollen.persistence.entity.Poll; +import org.chorem.pollen.persistence.entity.PollType; +import org.chorem.pollen.persistence.entity.VoteVisibility; +import org.junit.Assert; +import org.junit.Test; + +public class TopiaEntityConverterTest { + + @Test + public void convert() { + + String pollStr = "{topiaCreateDate: 1399033089600, title: \"pollTitle\", " + + "choice: [ {name: \"choice1\", choiceType: \"TEXT\"}, " + + "{name: \"choice2\", choiceType: \"IMAGE\"} ], voteVisibility: \"ANONYMOUS\", " + + "commentVisibility:\"NOBODY\", pollType: \"FREE\" }"; + + TopiaEntityConverter<Poll> converter = new TopiaEntityConverter<>(Poll.class); + + Poll poll = converter.convert(Poll.class, pollStr); + + Assert.assertNotNull(poll); + Assert.assertEquals("pollTitle", poll.getTitle()); + Assert.assertEquals(VoteVisibility.ANONYMOUS, poll.getVoteVisibility()); + Assert.assertEquals(CommentVisibility.NOBODY, poll.getCommentVisibility()); + Assert.assertEquals(PollType.FREE, poll.getPollType()); + Assert.assertEquals(2, poll.sizeChoice()); + Assert.assertEquals("choice1", poll.getChoice(0).getName()); + Assert.assertEquals(ChoiceType.TEXT, poll.getChoice(0).getChoiceType()); + Assert.assertEquals("choice2", poll.getChoice(1).getName()); + Assert.assertEquals(ChoiceType.IMAGE, poll.getChoice(1).getChoiceType()); + + String convert = converter.convert(String.class, poll); + Assert.assertNotNull(convert); + + } + +} \ No newline at end of file Property changes on: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/TopiaEntityConverterTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-05-06 15:56:39 UTC (rev 3916) +++ trunk/pom.xml 2014-05-07 09:04:29 UTC (rev 3917) @@ -239,12 +239,6 @@ <!-- persistence module dependencies --> <dependency> - <groupId>org.hibernate.javax.persistence</groupId> - <artifactId>hibernate-jpa-2.1-api</artifactId> - <version>1.0.0.Draft-16</version> - </dependency> - - <dependency> <groupId>org.nuiton.topia</groupId> <artifactId>topia-persistence</artifactId> <version>${topiaVersion}</version> @@ -276,13 +270,6 @@ </dependency> <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-entitymanager</artifactId> - <version>${hibernateVersion}</version> - <scope>runtime</scope> - </dependency> - - <dependency> <groupId>com.esotericsoftware.yamlbeans</groupId> <artifactId>yamlbeans</artifactId> <version>1.06</version> @@ -333,17 +320,17 @@ <version>${nuitonConfigVersion}</version> </dependency> - <dependency> + <!--dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-csv</artifactId> <version>${nuitonCsvVersion}</version> - </dependency> + </dependency--> - <dependency> + <!--dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-validator</artifactId> <version>${nuitonValidatorVersion}</version> - </dependency> + </dependency--> <dependency> <groupId>org.nuiton.web</groupId> @@ -365,15 +352,15 @@ <artifactId>shiro-core</artifactId> <version>${shiroVersion}</version> </dependency> - <dependency> + <!--dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-web</artifactId> <version>${shiroVersion}</version> - </dependency> + </dependency--> <!-- JFreeChart --> - <dependency> + <!--dependency> <groupId>org.jfree</groupId> <artifactId>jfreechart</artifactId> <version>1.0.14</version> @@ -383,21 +370,15 @@ <groupId>org.jfree</groupId> <artifactId>jcommon</artifactId> <version>1.0.17</version> - </dependency> + </dependency--> - <dependency> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - <version>3.12.1.GA</version> - </dependency> - <!-- Rome (rss) --> - <dependency> + <!--dependency> <groupId>rome</groupId> <artifactId>rome</artifactId> <version>1.0</version> - </dependency> + </dependency--> <!-- Logging --> @@ -416,12 +397,12 @@ <version>0.8.13</version> </dependency> - <dependency> + <!--dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> - </dependency> + </dependency--> <dependency> <groupId>org.apache.httpcomponents</groupId> @@ -429,31 +410,49 @@ <version>${httpCommonsHttpclientVersion}</version> </dependency> - <dependency> + <!--dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>${httpCommonsHttpclientVersion}</version> - </dependency> + </dependency--> - <dependency> + <!--dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.2.4</version> + </dependency--> + + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.3.3</version> </dependency> <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>2.3.3</version> + </dependency> + + <dependency> + <groupId>com.fasterxml.jackson.module</groupId> + <artifactId>jackson-module-afterburner</artifactId> + <version>2.3.3</version> + </dependency> + + <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>7.0</version> <scope>provided</scope> </dependency> - <dependency> + <!--dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-runner</artifactId> <version>${jettyVersion}</version> <scope>provided</scope> - </dependency> + </dependency--> <dependency> <groupId>org.apache.tomcat.embed</groupId> @@ -483,11 +482,11 @@ <scope>provided</scope> </dependency> - <dependency> + <!--dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> <version>1.1.1</version> - </dependency> + </dependency--> <dependency> <groupId>org.mockito</groupId> @@ -497,7 +496,7 @@ </dependency> <!-- Selenium --> - <dependency> + <!--dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-api</artifactId> <version>${seleniumVersion}</version> @@ -550,7 +549,7 @@ <artifactId>selenium-remote-driver</artifactId> <version>${seleniumVersion}</version> <scope>test</scope> - </dependency> + </dependency--> </dependencies> </dependencyManagement>
participants (1)
-
tchemit@users.chorem.org