Repository: olingo-odata2 Updated Branches: refs/heads/master 865be3815 -> d2804b744
[OLINGO-607] Fix for JDK8 build issues Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/d2804b74 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/d2804b74 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/d2804b74 Branch: refs/heads/master Commit: d2804b744a1cf71512b676d7e1a3dbf15dc46bd4 Parents: 865be38 Author: Michael Bolz <[email protected]> Authored: Wed Apr 22 10:23:52 2015 +0200 Committer: Michael Bolz <[email protected]> Committed: Wed Apr 22 11:25:59 2015 +0200 ---------------------------------------------------------------------- .../annotation-processor-web/pom.xml | 2 +- odata2-jpa-processor/jpa-web/pom.xml | 2 +- .../odata2/fit/basic/ServiceResolutionTest.java | 40 ++++++++++++-------- odata2-lib/odata-web/pom.xml | 10 +---- .../odata-web/src/main/resources/log4j.xml | 8 ++-- pom.xml | 5 +++ 6 files changed, 37 insertions(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d2804b74/odata2-annotation-processor/annotation-processor-web/pom.xml ---------------------------------------------------------------------- diff --git a/odata2-annotation-processor/annotation-processor-web/pom.xml b/odata2-annotation-processor/annotation-processor-web/pom.xml index 5149320..cfbf15d 100644 --- a/odata2-annotation-processor/annotation-processor-web/pom.xml +++ b/odata2-annotation-processor/annotation-processor-web/pom.xml @@ -37,7 +37,7 @@ </resource> <resource> <directory>src/main/resources</directory> - <filtering>true</filtering> + <filtering>false</filtering> </resource> <resource> <directory>target/maven-shared-archive-resources</directory> http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d2804b74/odata2-jpa-processor/jpa-web/pom.xml ---------------------------------------------------------------------- diff --git a/odata2-jpa-processor/jpa-web/pom.xml b/odata2-jpa-processor/jpa-web/pom.xml index 06726de..bd665ed 100644 --- a/odata2-jpa-processor/jpa-web/pom.xml +++ b/odata2-jpa-processor/jpa-web/pom.xml @@ -34,7 +34,7 @@ </resource> <resource> <directory>src/main/resources</directory> - <filtering>true</filtering> + <filtering>false</filtering> </resource> </resources> http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d2804b74/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/basic/ServiceResolutionTest.java ---------------------------------------------------------------------- diff --git a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/basic/ServiceResolutionTest.java b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/basic/ServiceResolutionTest.java index 8ee0883..32350b6 100644 --- a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/basic/ServiceResolutionTest.java +++ b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/basic/ServiceResolutionTest.java @@ -32,7 +32,6 @@ import java.net.URI; import java.net.URISyntaxException; import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; @@ -117,7 +116,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testSplit0() throws ClientProtocolException, IOException, ODataException { + public void testSplit0() throws IOException, ODataException { server.setPathSplit(0); startServer(); @@ -134,7 +133,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testSplit1() throws ClientProtocolException, IOException, ODataException { + public void testSplit1() throws IOException, ODataException { server.setPathSplit(1); startServer(); @@ -151,7 +150,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testSplit2() throws ClientProtocolException, IOException, ODataException { + public void testSplit2() throws IOException, ODataException { server.setPathSplit(2); startServer(); @@ -169,7 +168,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testSplitUrlToShort() throws ClientProtocolException, IOException, ODataException { + public void testSplitUrlToShort() throws IOException, ODataException { server.setPathSplit(3); startServer(); @@ -180,7 +179,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testSplitUrlServiceDocument() throws ClientProtocolException, IOException, ODataException { + public void testSplitUrlServiceDocument() throws IOException, ODataException { server.setPathSplit(1); startServer(); @@ -197,7 +196,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testMatrixParameterInNonODataPath() throws ClientProtocolException, IOException, ODataException { + public void testMatrixParameterInNonODataPath() throws IOException, ODataException { server.setPathSplit(1); startServer(); @@ -222,7 +221,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testNoMatrixParameterInODataPath() throws ClientProtocolException, IOException, ODataException { + public void testNoMatrixParameterInODataPath() throws IOException, ODataException { server.setPathSplit(0); startServer(); @@ -238,7 +237,7 @@ public class ServiceResolutionTest extends BaseTest { } @Test - public void testBaseUriWithMatrixParameter() throws ClientProtocolException, IOException, ODataException, + public void testBaseUriWithMatrixParameter() throws IOException, ODataException, URISyntaxException { server.setPathSplit(3); startServer(); @@ -251,11 +250,12 @@ public class ServiceResolutionTest extends BaseTest { final ODataContext ctx = service.getProcessor().getContext(); assertNotNull(ctx); - assertEquals(endpoint + "aaa/bbb;n=2,3;m=1/ccc/", ctx.getPathInfo().getServiceRoot().toASCIIString()); + validateServiceRoot(ctx.getPathInfo().getServiceRoot().toASCIIString(), + endpoint + "aaa/bbb;", "/ccc/", "n=2,3", "m=1"); } @Test - public void testMetadataUriWithMatrixParameter() throws ClientProtocolException, IOException, ODataException, + public void testMetadataUriWithMatrixParameter() throws IOException, ODataException, URISyntaxException { server.setPathSplit(3); startServer(); @@ -268,12 +268,13 @@ public class ServiceResolutionTest extends BaseTest { final ODataContext ctx = service.getProcessor().getContext(); assertNotNull(ctx); - assertEquals(endpoint + "aaa/bbb;n=2,3;m=1/ccc/", ctx.getPathInfo().getServiceRoot().toASCIIString()); + validateServiceRoot(ctx.getPathInfo().getServiceRoot().toASCIIString(), + endpoint + "aaa/bbb;", "/ccc/", "n=2,3", "m=1"); assertEquals("$metadata", ctx.getPathInfo().getODataSegments().get(0).getPath()); } @Test - public void testBaseUriWithEncoding() throws ClientProtocolException, IOException, ODataException, + public void testBaseUriWithEncoding() throws IOException, ODataException, URISyntaxException { server.setPathSplit(3); startServer(); @@ -289,8 +290,17 @@ public class ServiceResolutionTest extends BaseTest { final ODataContext context = service.getProcessor().getContext(); assertNotNull(context); - assertEquals(server.getEndpoint() + "aaa/%C3%A4%D0%B4%D0%B5%D1%80%D0%B6b;n=2,%203;m=1/c%20c/", context - .getPathInfo().getServiceRoot().toASCIIString()); + validateServiceRoot(context.getPathInfo().getServiceRoot().toASCIIString(), + server.getEndpoint() + "aaa/%C3%A4%D0%B4%D0%B5%D1%80%D0%B6b;", "/c%20c/", "n=2,%203", "m=1"); } + private void validateServiceRoot(String serviceRoot, String prefix, String postfix, String ... matrixParameter) { + assertTrue("Service root '" + serviceRoot + "' does not start with '" + prefix + "'.", + serviceRoot.startsWith(prefix)); + assertTrue("Service root '" + serviceRoot + "' does not end with '" + postfix + "'.", serviceRoot.endsWith + (postfix)); + for (String s : matrixParameter) { + assertTrue("Service root '" + serviceRoot + "' misses matrix parameter '" + s + "'", serviceRoot.contains(s)); + } + } } http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d2804b74/odata2-lib/odata-web/pom.xml ---------------------------------------------------------------------- diff --git a/odata2-lib/odata-web/pom.xml b/odata2-lib/odata-web/pom.xml index ce48ff2..f9ee28d 100644 --- a/odata2-lib/odata-web/pom.xml +++ b/odata2-lib/odata-web/pom.xml @@ -30,20 +30,12 @@ </resource> <resource> <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - <resource> - <directory>target/maven-shared-archive-resources</directory> + <filtering>false</filtering> </resource> </resources> <plugins> <plugin> - <groupId>com.sap.research</groupId> - <artifactId>nwcloud-maven-plugin</artifactId> - <version>1.0.0.RELEASE</version> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <configuration> http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d2804b74/odata2-lib/odata-web/src/main/resources/log4j.xml ---------------------------------------------------------------------- diff --git a/odata2-lib/odata-web/src/main/resources/log4j.xml b/odata2-lib/odata-web/src/main/resources/log4j.xml index 3b15a27..3c194c0 100644 --- a/odata2-lib/odata-web/src/main/resources/log4j.xml +++ b/odata2-lib/odata-web/src/main/resources/log4j.xml @@ -7,9 +7,9 @@ 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 @@ -27,13 +27,13 @@ </layout> </appender> - <!-- + <!-- <logger name="org.apache.olingo.odata2" additivity="false"> <level value="trace" /> <appender-ref ref="console" /> </logger> --> - + <root> <priority value="error" /> <appender-ref ref="console" /> http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/d2804b74/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index ccbc102..7d757d1 100644 --- a/pom.xml +++ b/pom.xml @@ -150,6 +150,11 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-remote-resources-plugin</artifactId> + <version>1.5</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.7</version> </plugin>
