You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2014/07/22 08:42:04 UTC

git commit: [OLINGO-344] fix issued with shaded jars

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 3a060746c -> fcc5564d7


[OLINGO-344] fix issued with shaded jars


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

Branch: refs/heads/master
Commit: fcc5564d792bc6dc78f0f5a56454d9cbd86d640a
Parents: 3a06074
Author: Stephan Klevenz <st...@sap.com>
Authored: Tue Jul 22 08:41:11 2014 +0200
Committer: Stephan Klevenz <st...@sap.com>
Committed: Tue Jul 22 08:42:14 2014 +0200

----------------------------------------------------------------------
 ext/client-core-android/pom.xml                 | 22 +---------
 ext/client-proxy-android/pom.xml                | 29 +++----------
 .../android/http/AndroidHttpClientFactory.java  | 44 ++++++++++++++++++++
 3 files changed, 51 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/fcc5564d/ext/client-core-android/pom.xml
----------------------------------------------------------------------
diff --git a/ext/client-core-android/pom.xml b/ext/client-core-android/pom.xml
index 706ecfa..b5ac2ee 100644
--- a/ext/client-core-android/pom.xml
+++ b/ext/client-core-android/pom.xml
@@ -66,27 +66,7 @@
           </execution>
         </executions>
         <configuration>
-          <artifactSet>
-            <includes>
-              <include>org.apache.olingo:olingo-client-core-android</include>
-              <include>org.apache.olingo:olingo-client-core</include>
-              <include>org.apache.olingo:olingo-client-api</include>
-              <include>org.apache.olingo:olingo-commons-core</include>
-              <include>org.apache.olingo:olingo-commons-api</include>
-              <include>org.apache.commons:commons-lang3</include>
-              <include>org.slf4j:slf4j-api</include>
-              <include>commons-io:commons-io</include>
-              <include>com.fasterxml.jackson.core:jackson-core</include>
-              <include>com.fasterxml.jackson.core:jackson-databind</include>
-              <include>com.fasterxml.jackson.core:jackson-annotations</include>
-              <include>com.fasterxml.jackson.dataformat:jackson-dataformat-xml</include>
-              <include>com.fasterxml.jackson.module:jackson-module-jaxb-annotations</include>
-              <include>org.codehaus.woodstox:stax2-api</include>
-              <include>javax.xml.stream:stax-api</include>
-              <include>com.fasterxml:aalto-xml</include>
-            </includes>
-          </artifactSet>
-          <relocations>
+           <relocations>
             <relocation>
               <pattern>javax.xml.stream</pattern>
               <shadedPattern>org.apache.olingo.javax.xml.stream</shadedPattern>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/fcc5564d/ext/client-proxy-android/pom.xml
----------------------------------------------------------------------
diff --git a/ext/client-proxy-android/pom.xml b/ext/client-proxy-android/pom.xml
index 90990c2..5920c72 100644
--- a/ext/client-proxy-android/pom.xml
+++ b/ext/client-proxy-android/pom.xml
@@ -41,6 +41,11 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.olingo</groupId>
+      <artifactId>olingo-client-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
       <groupId>com.google.android</groupId>
       <artifactId>android</artifactId>
       <version>${android.platform.version}</version>
@@ -66,29 +71,7 @@
           </execution>
         </executions>
         <configuration>
-          <artifactSet>
-            <includes>
-              <include>org.apache.olingo:olingo-client-proxy-android</include>
-              <include>org.apache.olingo:olingo-client-proxy</include>
-              <include>org.apache.olingo:olingo-client-core-android</include>
-              <include>org.apache.olingo:olingo-client-core</include>
-              <include>org.apache.olingo:olingo-client-api</include>
-              <include>org.apache.olingo:olingo-commons-core</include>
-              <include>org.apache.olingo:olingo-commons-api</include>
-              <include>org.apache.commons:commons-lang3</include>
-              <include>org.slf4j:slf4j-api</include>
-              <include>commons-io:commons-io</include>
-              <include>com.fasterxml.jackson.core:jackson-core</include>
-              <include>com.fasterxml.jackson.core:jackson-databind</include>
-              <include>com.fasterxml.jackson.core:jackson-annotations</include>
-              <include>com.fasterxml.jackson.dataformat:jackson-dataformat-xml</include>
-              <include>com.fasterxml.jackson.module:jackson-module-jaxb-annotations</include>
-              <include>org.codehaus.woodstox:stax2-api</include>
-              <include>javax.xml.stream:stax-api</include>
-              <include>com.fasterxml:aalto-xml</include>
-            </includes>
-          </artifactSet>
-          <relocations>
+           <relocations>
             <relocation>
               <pattern>javax.xml.stream</pattern>
               <shadedPattern>org.apache.olingo.javax.xml.stream</shadedPattern>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/fcc5564d/ext/client-proxy-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java b/ext/client-proxy-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java
new file mode 100644
index 0000000..c11a38f
--- /dev/null
+++ b/ext/client-proxy-android/src/main/java/org/apache/olingo/client/core/android/http/AndroidHttpClientFactory.java
@@ -0,0 +1,44 @@
+/*
+ * 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.olingo.client.core.android.http;
+
+import android.net.http.AndroidHttpClient;
+import org.apache.http.client.HttpClient;
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.client.core.http.AbstractHttpClientFactory;
+
+import java.net.URI;
+
+public class AndroidHttpClientFactory extends AbstractHttpClientFactory {
+
+    private static final long serialVersionUID = -5224104561624556177L;
+
+    @Override
+    public AndroidHttpClient create(final HttpMethod method, final URI uri) {
+        return AndroidHttpClient.newInstance(USER_AGENT);
+    }
+
+    @Override
+    public void close(final HttpClient httpClient) {
+        if (httpClient instanceof AndroidHttpClient) {
+            ((AndroidHttpClient) httpClient).close();
+        }
+    }
+
+}