Build failed in Jenkins: olingo-odata4-all-profiles #247

2018-02-21 Thread Apache Jenkins Server
See 


Changes:

[archana.rai] [OLINGO-1237]Serialization changes for odata.metadata=minimal

--
[...truncated 427.54 KB...]
[INFO] Exclude: **/META-INF/**
[INFO] Exclude: **/*.txt
[INFO] Exclude: **/*.ini
[INFO] Exclude: **/*.bin
[INFO] Exclude: **/MANIFEST.MF
[INFO] Exclude: .gitignore
[INFO] Exclude: .git/**
[INFO] Exclude: bin/**
[INFO] Exclude: **/*.local
[INFO] Exclude: **/*.project
[INFO] Exclude: **/*.classpath
[INFO] Exclude: **/*.json
[INFO] Exclude: **/*.batch
[INFO] Exclude: **/NOTICE
[INFO] Exclude: **/DEPENDENCIES
[INFO] Exclude: **/nb-configuration.xml
[INFO] Exclude: **/.externalToolBuilders/**
[INFO] Exclude: **/maven-eclipse.xml
[INFO] Exclude: **/*.iml
[INFO] Exclude: **/ref/**
[INFO] Exclude: **/server-ref/**
[INFO] Exclude: **/dependency-reduced-pom.xml
[INFO] 1 resources included (use -debug for more details)
Compiler warnings:
  WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 
'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 1 licence.
[INFO] 
[INFO] 
[INFO] Building odata-server-osgi-sample 4.5.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
odata-server-osgi-sample ---
[INFO] Deleting 

[INFO] 
[INFO] --- build-helper-maven-plugin:1.9:add-source (add-source) @ 
odata-server-osgi-sample ---
[INFO] Source directory: 

 added.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ 
odata-server-osgi-sample ---
[INFO] Compiling 4 source files to 

[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
odata-server-osgi-sample ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-bundle-plugin:3.3.0:bundle (default-bundle) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-site-plugin:3.4:attach-descriptor (attach-descriptor) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-failsafe-plugin:2.17:integration-test (integration-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ 
odata-server-osgi-sample ---
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-failsafe-plugin:2.17:verify (integration-test) @ 
odata-server-osgi-sample ---
[INFO] Failsafe report directory: 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.12.1:check (checkstyle) @ 
odata-server-osgi-sample ---
[INFO] Starting audit...
Audit done.

[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ 
odata-server-osgi-sample ---
[INFO] Installing 

 to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-server-osgi-sample/4.5.0-SNAPSHOT/odata-server-osgi-sample-4.5.0-SNAPSHOT.jar
[INFO] Installing 

 to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-server-osgi-sample/4.5.0-SNAPSHOT/odata-server-osgi-sample-4.5.0-SNAPSHOT.pom
[INFO] Installing 

 to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-s

Build failed in Jenkins: olingo-odata4 #1460

2018-02-21 Thread Apache Jenkins Server
See 


Changes:

[archana.rai] [OLINGO-1237]Serialization changes for odata.metadata=minimal

--
[...truncated 318.33 KB...]
[INFO] Starting audit...
Audit done.

[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ odata-samples 
---
[INFO] Installing 
 to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-samples/4.5.0-SNAPSHOT/odata-samples-4.5.0-SNAPSHOT.pom
[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (rat-check) @ odata-samples ---
[INFO] 53 implicit excludes (use -debug for more details).
[INFO] Exclude: **/target/**
[INFO] Exclude: **/META-INF/**
[INFO] Exclude: **/*.txt
[INFO] Exclude: **/*.ini
[INFO] Exclude: **/*.bin
[INFO] Exclude: **/MANIFEST.MF
[INFO] Exclude: .gitignore
[INFO] Exclude: .git/**
[INFO] Exclude: bin/**
[INFO] Exclude: **/*.local
[INFO] Exclude: **/*.project
[INFO] Exclude: **/*.classpath
[INFO] Exclude: **/*.json
[INFO] Exclude: **/*.batch
[INFO] Exclude: **/NOTICE
[INFO] Exclude: **/DEPENDENCIES
[INFO] Exclude: **/nb-configuration.xml
[INFO] Exclude: **/.externalToolBuilders/**
[INFO] Exclude: **/maven-eclipse.xml
[INFO] Exclude: **/*.iml
[INFO] Exclude: **/ref/**
[INFO] Exclude: **/server-ref/**
[INFO] Exclude: **/dependency-reduced-pom.xml
[INFO] 179 resources included (use -debug for more details)
Compiler warnings:
  WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 
'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 179 licence.
[INFO] 
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ odata-samples ---
[INFO] Skipping artifact deployment
[INFO] 
[INFO] 
[INFO] Building odata-server-osgi-sample 4.5.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9:add-source (add-source) @ 
odata-server-osgi-sample ---
[INFO] Source directory: 

 added.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ 
odata-server-osgi-sample ---
[INFO] Compiling 4 source files to 

[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
odata-server-osgi-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
odata-server-osgi-sample ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-bundle-plugin:3.3.0:bundle (default-bundle) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-site-plugin:3.4:attach-descriptor (attach-descriptor) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-failsafe-plugin:2.17:integration-test (integration-test) @ 
odata-server-osgi-sample ---
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ 
odata-server-osgi-sample ---
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-failsafe-plugin:2.17:verify (integration-test) @ 
odata-server-osgi-sample ---
[INFO] Failsafe report directory: 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.12.1:check (checkstyle) @ 
odata-server-osgi-sample ---
[INFO] Starting audit...
Audit done.

[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ 
odata-server-osgi-sample ---
[INFO] Installing 

 to 
/home/jenkins/.m2/repository/org/apache/olingo/odata-server-osgi-sample/4.5.0-SNAPSHOT/odata-server-osgi-sample-4.5.0-SNAPSHOT.jar
[INFO] Installing 


olingo-odata4 git commit: [OLINGO-1237]Serialization changes for odata.metadata=minimal

2018-02-21 Thread archanarai
Repository: olingo-odata4
Updated Branches:
  refs/heads/master 48f93fd87 -> 75cc7197e


[OLINGO-1237]Serialization changes for odata.metadata=minimal


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/75cc7197
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/75cc7197
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/75cc7197

Branch: refs/heads/master
Commit: 75cc7197e32773f94cfecc973784314d7d37
Parents: 48f93fd
Author: Archana Rai 
Authored: Thu Feb 22 11:59:49 2018 +0530
Committer: Archana Rai 
Committed: Thu Feb 22 11:59:49 2018 +0530

--
 .../json/EdmAssistedJsonSerializer.java |  24 +-
 .../json/EdmAssistedJsonSerializerTest.java | 296 ++-
 2 files changed, 308 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/75cc7197/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
--
diff --git 
a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
 
b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
index fd68672..b9cbbd6 100644
--- 
a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
+++ 
b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializer.java
@@ -66,10 +66,12 @@ public class EdmAssistedJsonSerializer implements 
EdmAssistedSerializer {
 
   protected final boolean isIEEE754Compatible;
   protected final boolean isODataMetadataNone;
+  protected final boolean isODataMetadataFull;
 
   public EdmAssistedJsonSerializer(final ContentType contentType) {
 this.isIEEE754Compatible = 
ContentTypeHelper.isODataIEEE754Compatible(contentType);
 this.isODataMetadataNone = 
ContentTypeHelper.isODataMetadataNone(contentType);
+this.isODataMetadataFull = 
ContentTypeHelper.isODataMetadataFull(contentType);
   }
 
   @Override
@@ -207,15 +209,17 @@ public class EdmAssistedJsonSerializer implements 
EdmAssistedSerializer {
   if (eTag != null) {
 json.writeStringField(Constants.JSON_ETAG, eTag);
   }
-  if (type != null) {
-json.writeStringField(Constants.JSON_TYPE, type);
-  }
-  if (id == null) {
-if (writeNullId) {
-  json.writeNullField(Constants.JSON_ID);
+  if(isODataMetadataFull){
+if (type != null) {
+  json.writeStringField(Constants.JSON_TYPE, type);
+}
+if (id == null) {
+  if (writeNullId) {
+json.writeNullField(Constants.JSON_ID);
+  }
+} else {
+  json.writeStringField(Constants.JSON_ID, id.toASCIIString());
 }
-  } else {
-json.writeStringField(Constants.JSON_ID, id.toASCIIString());
   }
 }
   }
@@ -326,7 +330,7 @@ public class EdmAssistedJsonSerializer implements 
EdmAssistedSerializer {
   final ComplexValue value) throws IOException, SerializerException {
 json.writeStartObject();
 
-if (typeName != null && !isODataMetadataNone) {
+if (typeName != null && isODataMetadataFull) {
   json.writeStringField(Constants.JSON_TYPE, typeName);
 }
 
@@ -362,7 +366,7 @@ public class EdmAssistedJsonSerializer implements 
EdmAssistedSerializer {
   protected void valuable(JsonGenerator json, final Valuable valuable, final 
String name, final EdmType type,
   final EdmProperty edmProperty) throws IOException, SerializerException {
 
-if (!isODataMetadataNone
+if (isODataMetadataFull
 && !(valuable instanceof Annotation) && !valuable.isComplex()) {
 
   String typeName = valuable.getType();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/75cc7197/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
--
diff --git 
a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
 
b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
index 808e459..5874847 100644
--- 
a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
+++ 
b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/json/EdmAssistedJsonSerializerTest.java
@@ -56,9 +56,13 @@ public class EdmAssistedJsonSerializerTest {
   new EdmTechProvider(), Collections. emptyList(), null);
   private static final EdmEntityContainer entityContainer = 
metadata.getEdm().getEntityCo