Repository: incubator-batchee
Updated Branches:
  refs/heads/master 7a74df4bc -> 93adf7ce3


BATCHEE-103 BATCHEE-102 BATCHEE-101 upgrade xbean + provide a jaxrs tomeeplus 
webapp + use johnzon as default instead of jackson


Project: http://git-wip-us.apache.org/repos/asf/incubator-batchee/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-batchee/commit/93adf7ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-batchee/tree/93adf7ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-batchee/diff/93adf7ce

Branch: refs/heads/master
Commit: 93adf7ce37efb3b3de4efb091a4731d7b8c67fe5
Parents: 7a74df4
Author: Romain manni-Bucau <[email protected]>
Authored: Wed Aug 3 14:44:32 2016 +0200
Committer: Romain manni-Bucau <[email protected]>
Committed: Wed Aug 3 14:46:56 2016 +0200

----------------------------------------------------------------------
 extensions/jsonp/pom.xml                        |  6 +--
 gui/jaxrs/jaxrs-client/pom.xml                  |  9 ++--
 .../jaxrs/client/BatchEEJAXRS2Client.java       |  6 ++-
 .../jaxrs/client/ClientConfiguration.java       |  2 +-
 .../resources/batchee/job-execution/159.json    |  2 +-
 gui/jaxrs/jaxrs-common/pom.xml                  |  7 +++
 .../batchee/jaxrs/common/JBatchResource.java    |  7 ++-
 .../batchee/jaxrs/common/RestJobInstance.java   |  8 +++
 .../batchee/jaxrs/common/RestProperties.java    |  4 ++
 .../common/johnzon/JohnzonBatcheeProvider.java  | 51 ++++++++++++++++++++
 gui/jaxrs/jaxrs-server/pom.xml                  |  9 ++--
 .../jaxrs/server/JBatchResourceImpl.java        |  3 ++
 .../apache/batchee/jaxrs/server/RestTest.java   | 10 ++--
 gui/jaxrs/webapp/pom.xml                        | 37 ++++++++++++--
 gui/servlet/webapp/pom.xml                      | 11 +++--
 jbatch/pom.xml                                  |  2 +-
 pom.xml                                         | 13 +++++
 src/site/markdown/gui.md                        |  6 ++-
 src/site/markdown/maven.md                      |  2 +-
 19 files changed, 163 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/extensions/jsonp/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/jsonp/pom.xml b/extensions/jsonp/pom.xml
index d555852..4ab4b93 100644
--- a/extensions/jsonp/pom.xml
+++ b/extensions/jsonp/pom.xml
@@ -43,12 +43,8 @@
     <dependency>
       <groupId>org.apache.johnzon</groupId>
       <artifactId>johnzon-core</artifactId>
-      <version>0.9.2-incubating</version>
+      <version>${johnzon.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
-
-  <properties>
-    <jackson.version>2.2.3</jackson.version>
-  </properties>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-client/pom.xml
----------------------------------------------------------------------
diff --git a/gui/jaxrs/jaxrs-client/pom.xml b/gui/jaxrs/jaxrs-client/pom.xml
index f1cd155..8c90e14 100644
--- a/gui/jaxrs/jaxrs-client/pom.xml
+++ b/gui/jaxrs/jaxrs-client/pom.xml
@@ -53,9 +53,12 @@
         </dependency>
 
         <dependency>
-            <groupId>com.fasterxml.jackson.jaxrs</groupId>
-            <artifactId>jackson-jaxrs-json-provider</artifactId>
-            <scope>compile</scope>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-json_1.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.johnzon</groupId>
+            <artifactId>johnzon-jaxrs</artifactId>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/BatchEEJAXRS2Client.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/BatchEEJAXRS2Client.java
 
b/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/BatchEEJAXRS2Client.java
index 9c0556b..1ed5e9d 100644
--- 
a/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/BatchEEJAXRS2Client.java
+++ 
b/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/BatchEEJAXRS2Client.java
@@ -138,7 +138,7 @@ class BatchEEJAXRS2Client extends 
BatchEEJAXRSClientBase<Response> {
             resolvedTarget = resolvedTarget.queryParam(qp.getKey(), 
qp.getValue());
         }
 
-        final Invocation.Builder request = 
resolvedTarget.resolveTemplates(templates).request(MediaType.APPLICATION_JSON_TYPE);
+        final Invocation.Builder request = 
resolvedTarget.resolveTemplates(templates).request(findType(method.getReturnType()));
         if (jaxrsMethod.getAnnotation(GET.class) != null) {
             return request.get();
         } else if (jaxrsMethod.getAnnotation(HEAD.class) != null) {
@@ -149,6 +149,10 @@ class BatchEEJAXRS2Client extends 
BatchEEJAXRSClientBase<Response> {
         throw new IllegalArgumentException("Unexpected http method");
     }
 
+    private MediaType findType(final Class<?> returnType) {
+        return returnType.isPrimitive() ? MediaType.TEXT_PLAIN_TYPE : 
MediaType.APPLICATION_JSON_TYPE;
+    }
+
     @Override
     protected void close() {
         // no-op

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/ClientConfiguration.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/ClientConfiguration.java
 
b/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/ClientConfiguration.java
index 304e028..29a0dc7 100644
--- 
a/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/ClientConfiguration.java
+++ 
b/gui/jaxrs/jaxrs-client/src/main/java/org/apache/batchee/jaxrs/client/ClientConfiguration.java
@@ -20,7 +20,7 @@ import static java.util.Arrays.asList;
 
 public class ClientConfiguration {
     private static final String JACKSON_PROVIDER = 
"com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider";
-    private static final String JOHNZON_PROVIDER = 
"org.apache.johnzon.jaxrs.JohnzonProvider";
+    private static final String JOHNZON_PROVIDER = 
"org.apache.batchee.jaxrs.common.johnzon.JohnzonBatcheeProvider";
 
     private String baseUrl = null;
     private String jsonProvider = null;

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-client/src/test/resources/batchee/job-execution/159.json
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-client/src/test/resources/batchee/job-execution/159.json 
b/gui/jaxrs/jaxrs-client/src/test/resources/batchee/job-execution/159.json
index 872de26..83ba429 100644
--- a/gui/jaxrs/jaxrs-client/src/test/resources/batchee/job-execution/159.json
+++ b/gui/jaxrs/jaxrs-client/src/test/resources/batchee/job-execution/159.json
@@ -5,4 +5,4 @@
             "value": "jbatch"
         }
     ]
-}}
\ No newline at end of file
+}}

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-common/pom.xml
----------------------------------------------------------------------
diff --git a/gui/jaxrs/jaxrs-common/pom.xml b/gui/jaxrs/jaxrs-common/pom.xml
index a8e3e81..72df1b9 100644
--- a/gui/jaxrs/jaxrs-common/pom.xml
+++ b/gui/jaxrs/jaxrs-common/pom.xml
@@ -35,5 +35,12 @@
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jaxrs_1.1_spec</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.johnzon</groupId>
+            <artifactId>johnzon-jaxrs</artifactId>
+            <version>${johnzon.version}</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/JBatchResource.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/JBatchResource.java
 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/JBatchResource.java
index a9f8e31..a6d49a6 100644
--- 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/JBatchResource.java
+++ 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/JBatchResource.java
@@ -26,8 +26,8 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 
-@Consumes({MediaType.APPLICATION_JSON})
-@Produces({MediaType.APPLICATION_JSON})
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
 @Path("batchee")
 public interface JBatchResource {
     @GET
@@ -36,6 +36,7 @@ public interface JBatchResource {
 
     @GET
     @Path("job-instance/count/{name}")
+    @Produces(MediaType.TEXT_PLAIN)
     int getJobInstanceCount(final @PathParam("name") String jobName);
 
     @GET
@@ -68,10 +69,12 @@ public interface JBatchResource {
 
     @POST
     @Path("execution/start/{name}")
+    @Produces(MediaType.TEXT_PLAIN)
     long start(final @PathParam("name") String jobXMLName, final 
RestProperties jobParameters);
 
     @POST
     @Path("execution/restart/{id}")
+    @Produces(MediaType.TEXT_PLAIN)
     long restart(final @PathParam("id") long executionId, final RestProperties 
restartParameters);
 
     @HEAD

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestJobInstance.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestJobInstance.java
 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestJobInstance.java
index 43f228f..77a6a8a 100644
--- 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestJobInstance.java
+++ 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestJobInstance.java
@@ -41,6 +41,14 @@ public class RestJobInstance {
         return name;
     }
 
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setId(final long id) {
+        this.id = id;
+    }
+
     public static List<RestJobInstance> wrap(final List<JobInstance> 
jobInstances) {
         final List<RestJobInstance> instances = new 
ArrayList<RestJobInstance>(jobInstances.size());
         for (final JobInstance instance : jobInstances) {

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestProperties.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestProperties.java
 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestProperties.java
index 1eea047..3d5d90b 100644
--- 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestProperties.java
+++ 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/RestProperties.java
@@ -24,6 +24,10 @@ import java.util.Properties;
 public class RestProperties {
     private List<RestEntry> entries = new LinkedList<RestEntry>();
 
+    public void setEntries(final List<RestEntry> entries) {
+        this.entries = entries;
+    }
+
     public List<RestEntry> getEntries() {
         return entries;
     }

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/johnzon/JohnzonBatcheeProvider.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/johnzon/JohnzonBatcheeProvider.java
 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/johnzon/JohnzonBatcheeProvider.java
new file mode 100644
index 0000000..b4fd032
--- /dev/null
+++ 
b/gui/jaxrs/jaxrs-common/src/main/java/org/apache/batchee/jaxrs/common/johnzon/JohnzonBatcheeProvider.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.batchee.jaxrs.common.johnzon;
+
+import org.apache.johnzon.jaxrs.JohnzonProvider;
+import org.apache.johnzon.mapper.MapperBuilder;
+import org.apache.johnzon.mapper.converter.TimestampAdapter;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
+import javax.ws.rs.ext.Provider;
+import java.util.Comparator;
+
+/**
+ * Johnzon integration provider to keep old date formatting.
+ *
+ * Note 1: that if your client and server use the same formatting/provider 
(jackson, default johnzon, other...)
+ * then this one is useless.
+ *
+ * Note 2: this provider also sort attribute in a deterministic order (String 
natural order).
+ */
+@Provider
+@Produces("application/json")
+@Consumes("application/json")
+public class JohnzonBatcheeProvider<T> extends JohnzonProvider<T> {
+    public JohnzonBatcheeProvider() {
+        super(new MapperBuilder()
+                .addAdapter(new TimestampAdapter()) // backward compatibility
+                .setAttributeOrder(new Comparator<String>() { // deterministic 
order (useful when used with scripts)
+                    @Override
+                    public int compare(final String o1, final String o2) {
+                        return o1.compareTo(o2);
+                    }
+                })
+                .build(), null);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-server/pom.xml
----------------------------------------------------------------------
diff --git a/gui/jaxrs/jaxrs-server/pom.xml b/gui/jaxrs/jaxrs-server/pom.xml
index 8a07b3e..21ac88e 100644
--- a/gui/jaxrs/jaxrs-server/pom.xml
+++ b/gui/jaxrs/jaxrs-server/pom.xml
@@ -57,9 +57,12 @@
         </dependency>
 
         <dependency>
-            <groupId>com.fasterxml.jackson.jaxrs</groupId>
-            <artifactId>jackson-jaxrs-json-provider</artifactId>
-            <scope>compile</scope>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-json_1.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.johnzon</groupId>
+            <artifactId>johnzon-jaxrs</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-server/src/main/java/org/apache/batchee/jaxrs/server/JBatchResourceImpl.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-server/src/main/java/org/apache/batchee/jaxrs/server/JBatchResourceImpl.java
 
b/gui/jaxrs/jaxrs-server/src/main/java/org/apache/batchee/jaxrs/server/JBatchResourceImpl.java
index 5ca54b2..c2d74a5 100644
--- 
a/gui/jaxrs/jaxrs-server/src/main/java/org/apache/batchee/jaxrs/server/JBatchResourceImpl.java
+++ 
b/gui/jaxrs/jaxrs-server/src/main/java/org/apache/batchee/jaxrs/server/JBatchResourceImpl.java
@@ -58,6 +58,7 @@ public class JBatchResourceImpl implements JBatchResource {
 
     @GET
     @Path("job-instance/count/{name}")
+    @Produces(MediaType.TEXT_PLAIN)
     public int getJobInstanceCount(final @PathParam("name") String jobName) {
         return operator.getJobInstanceCount(jobName);
     }
@@ -110,12 +111,14 @@ public class JBatchResourceImpl implements JBatchResource 
{
 
     @POST
     @Path("execution/start/{name}")
+    @Produces(MediaType.TEXT_PLAIN)
     public long start(final @PathParam("name") String jobXMLName, final 
RestProperties jobParameters) {
         return operator.start(jobXMLName, 
RestProperties.unwrap(jobParameters));
     }
 
     @POST
     @Path("execution/restart/{id}")
+    @Produces(MediaType.TEXT_PLAIN)
     public long restart(final @PathParam("id") long executionId, final 
RestProperties restartParameters) {
         return operator.restart(executionId, 
RestProperties.unwrap(restartParameters));
     }

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/jaxrs-server/src/test/java/org/apache/batchee/jaxrs/server/RestTest.java
----------------------------------------------------------------------
diff --git 
a/gui/jaxrs/jaxrs-server/src/test/java/org/apache/batchee/jaxrs/server/RestTest.java
 
b/gui/jaxrs/jaxrs-server/src/test/java/org/apache/batchee/jaxrs/server/RestTest.java
index 321404a..086dc3b 100644
--- 
a/gui/jaxrs/jaxrs-server/src/test/java/org/apache/batchee/jaxrs/server/RestTest.java
+++ 
b/gui/jaxrs/jaxrs-server/src/test/java/org/apache/batchee/jaxrs/server/RestTest.java
@@ -16,13 +16,13 @@
  */
 package org.apache.batchee.jaxrs.server;
 
-import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
 import org.apache.batchee.jaxrs.common.JBatchResource;
 import org.apache.batchee.jaxrs.common.RestEntry;
 import org.apache.batchee.jaxrs.common.RestJobExecution;
 import org.apache.batchee.jaxrs.common.RestJobInstance;
 import org.apache.batchee.jaxrs.common.RestProperties;
 import org.apache.batchee.jaxrs.common.RestStepExecution;
+import org.apache.batchee.jaxrs.common.johnzon.JohnzonBatcheeProvider;
 import org.apache.batchee.jaxrs.server.util.CreateSomeJobs;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.jaxrs.client.WebClient;
@@ -43,8 +43,8 @@ import javax.batch.runtime.BatchStatus;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.net.URL;
-import java.util.Arrays;
 
+import static java.util.Collections.singletonList;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
@@ -63,7 +63,7 @@ public class RestTest {
 
     @Test
     public void getJobInstanceCount() {
-        final int count = newClient().path("job-instance/count/{id}", 
"init").get(Integer.class);
+        final int count = newClient().path("job-instance/count/{id}", 
"init").accept(MediaType.TEXT_PLAIN_TYPE).get(Integer.class);
         assertEquals(1, count);
     }
 
@@ -152,7 +152,7 @@ public class RestTest {
                     .up()
                     .createInitParam()
                     .paramName("jaxrs.providers")
-                    
.paramValue("com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider," + 
JBatchExceptionMapper.class.getName())
+                    .paramValue(JohnzonBatcheeProvider.class.getName() + "," + 
JBatchExceptionMapper.class.getName())
                     .up()
                     .createInitParam()
                     .paramName("jaxrs.outInterceptors")
@@ -171,6 +171,6 @@ public class RestTest {
     }
 
     private WebClient newClient() {
-        return WebClient.create(base.toExternalForm() + "api/batchee", 
Arrays.asList(new 
JacksonJsonProvider())).accept(MediaType.APPLICATION_JSON_TYPE);
+        return WebClient.create(base.toExternalForm() + "api/batchee", 
singletonList(new 
JohnzonBatcheeProvider())).accept(MediaType.APPLICATION_JSON_TYPE);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/jaxrs/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/gui/jaxrs/webapp/pom.xml b/gui/jaxrs/webapp/pom.xml
index f5b23ea..7d43f47 100644
--- a/gui/jaxrs/webapp/pom.xml
+++ b/gui/jaxrs/webapp/pom.xml
@@ -41,6 +41,38 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>
                 <version>2.4</version>
+                <executions>
+                    <execution>
+                        <id>default-war</id>
+                        <goals>
+                            <goal>war</goal>
+                        </goals>
+                        <configuration>
+                            <packagingExcludes>
+                                WEB-INF/classes/META-INF/LICENSE,
+                                WEB-INF/classes/META-INF/NOTICE,
+                                WEB-INF/classes/META-INF/DEPENDENCIES
+                            </packagingExcludes>
+                        </configuration>
+                    </execution>
+                    <execution> <!-- tomee already provides johnzon, xbean and 
jbatch module, no need to add them -->
+                        <id>war-tomee</id>
+                        <goals>
+                            <goal>war</goal>
+                        </goals>
+                        <configuration>
+                            <classifier>tomeeplus</classifier>
+                            <packagingExcludes>
+                                WEB-INF/lib/batchee-jbatch*jar,
+                                WEB-INF/lib/xbean-reflect*jar,
+                                WEB-INF/lib/johnzon-*jar,
+                                WEB-INF/classes/META-INF/LICENSE,
+                                WEB-INF/classes/META-INF/NOTICE,
+                                WEB-INF/classes/META-INF/DEPENDENCIES
+                            </packagingExcludes>
+                        </configuration>
+                    </execution>
+                </executions>
                 <configuration>
                     <failOnMissingWebXml>false</failOnMissingWebXml>
                     <webResources>
@@ -55,11 +87,6 @@
                             <filtering>false</filtering>
                         </resource>
                     </webResources>
-                    <packagingExcludes>
-                        WEB-INF/classes/META-INF/LICENSE,
-                        WEB-INF/classes/META-INF/NOTICE,
-                        WEB-INF/classes/META-INF/DEPENDENCIES
-                    </packagingExcludes>
                 </configuration>
             </plugin>
             <plugin>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/gui/servlet/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/gui/servlet/webapp/pom.xml b/gui/servlet/webapp/pom.xml
index 85196cf..b4cf109 100644
--- a/gui/servlet/webapp/pom.xml
+++ b/gui/servlet/webapp/pom.xml
@@ -183,9 +183,14 @@
             <version>${batch-api.version}</version>
           </dependency>
           <dependency>
-            <groupId>com.fasterxml.jackson.jaxrs</groupId>
-            <artifactId>jackson-jaxrs-json-provider</artifactId>
-            <version>${jackson.version}</version>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-json_1.0_spec</artifactId>
+            <version>1.0-alpha-1</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.johnzon</groupId>
+            <artifactId>johnzon-jaxrs</artifactId>
+            <version>${johnzon.version}</version>
           </dependency>
           <dependency>
             <groupId>org.apache.cxf</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/jbatch/pom.xml
----------------------------------------------------------------------
diff --git a/jbatch/pom.xml b/jbatch/pom.xml
index 4a5763d..bb62c9e 100644
--- a/jbatch/pom.xml
+++ b/jbatch/pom.xml
@@ -72,7 +72,7 @@
     <dependency>
       <groupId>org.apache.xbean</groupId>
       <artifactId>xbean-reflect</artifactId>
-      <version>3.16</version>
+      <version>4.5</version>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5384c7d..90c0edb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,7 @@
         <batch-api.version>1.0</batch-api.version>
         <jackson.version>2.2.2</jackson.version>
         <jodatime.version>2.9.1</jodatime.version>
+        <johnzon.version>0.9.5-SNAPSHOT</johnzon.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         
<batchee.scmPubUrl>https://svn.apache.org/repos/asf/incubator/batchee/site</batchee.scmPubUrl>
         
<batchee.scmPubCheckoutDirectory>${basedir}/.site-content</batchee.scmPubCheckoutDirectory>
@@ -167,6 +168,18 @@
             </dependency>
 
             <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-json_1.0_spec</artifactId>
+                <version>1.0-alpha-1</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.johnzon</groupId>
+                <artifactId>johnzon-jaxrs</artifactId>
+                <version>${johnzon.version}</version>
+            </dependency>
+
+            <dependency>
                 <!-- We have optional support for joda time IF it is available 
on the classpath -->
                 <groupId>joda-time</groupId>
                 <artifactId>joda-time</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/src/site/markdown/gui.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/gui.md b/src/site/markdown/gui.md
index 51b9871..0a68cda 100644
--- a/src/site/markdown/gui.md
+++ b/src/site/markdown/gui.md
@@ -43,7 +43,7 @@ to map `javax.batch.operations.BatchRuntimeException` to 
status 500:
     <init-param>
       <param-name>jaxrs.providers</param-name>
       <param-value>
-        com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider,
+        org.apache.batchee.jaxrs.common.johnzon.JohnzonBatcheeProvider,
         org.apache.batchee.jaxrs.server.JBatchExceptionMapper
       </param-value>
     </init-param>
@@ -61,6 +61,10 @@ to map `javax.batch.operations.BatchRuntimeException` to 
status 500:
 </web-app>
 ]]></pre>
 
+Note: instead of johnzon you can also use jackson as JAX-RS Json provider: 
`com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider`.
+Note: `JohnzonBatcheeProvider` is exactly the same as 
`org.apache.johnzon.jaxrs.JohnzonProvider` provider with 
`org.apache.batchee.jaxrs.common.johnzon.TimestampAdapter` registered
+to convert dates to timestamps. You can use Johnzon provider directly as well 
but the date conversion will be Johnzon one.
+
 Here is the mapping:
 
 * /job-names

http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/93adf7ce/src/site/markdown/maven.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/maven.md b/src/site/markdown/maven.md
index a09461c..929c65d 100644
--- a/src/site/markdown/maven.md
+++ b/src/site/markdown/maven.md
@@ -37,7 +37,7 @@ under the License.
   <configuration>
     <clientConfiguration>
       <baseUrl>http://localhost:8080/myapp/</baseUrl>
-      
<jsonProvider>com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider</jsonProvider>
+      <jsonProvider>org.apache.johnzon.jaxrs.JohnzonProvider</jsonProvider>
       <security>
         <type>Basic</type>
         <username>foo</username>

Reply via email to