Author: cziegeler
Date: Wed Apr  4 11:32:03 2018
New Revision: 1828319

URL: http://svn.apache.org/viewvc?rev=1828319&view=rev
Log:
Adjust to latest parent pom and remove dependency to easymock

Modified:
    felix/trunk/http/parent/pom.xml
    felix/trunk/osgi-r7/http/base/pom.xml
    
felix/trunk/osgi-r7/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapperTest.java
    felix/trunk/osgi-r7/http/jetty/pom.xml
    
felix/trunk/osgi-r7/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyConfigTest.java

Modified: felix/trunk/http/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/http/parent/pom.xml?rev=1828319&r1=1828318&r2=1828319&view=diff
==============================================================================
--- felix/trunk/http/parent/pom.xml (original)
+++ felix/trunk/http/parent/pom.xml Wed Apr  4 11:32:03 2018
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>felix-parent</artifactId>
-        <version>4</version>
+        <version>5-SNAPSHOT</version>
         <relativePath>../../pom/pom.xml</relativePath>
     </parent>
 
@@ -32,24 +32,9 @@
     <version>10-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <prerequisites>
-        <maven>3.0.5</maven>
-    </prerequisites>
 
     <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-       <jetty.version>9.3.8.v20160314</jetty.version>
-       <cometd.version>3.0.8</cometd.version>
        <servlet.version>3.1.0</servlet.version>
-        <!--
-            Java API and class file compliance. This property supports
-            one of three values:
-              - 6: Java 6 (default)
-              - 7: Java 7 
-            Using anything else causes the 
set-bundle-required-execution-environment
-            to fail the build with an exception
-        -->
-        <felix.java.version>6</felix.java.version>
     </properties>
 
     <scm>
@@ -64,7 +49,7 @@
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
-                    <version>2.5.3</version>
+                    <version>3.5.0</version>
                     <executions>
                       <execution>
                         <id>bundle</id>
@@ -84,7 +69,7 @@
                         <instructions>
                             
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                             <Bundle-Version>${project.version}</Bundle-Version>
-                            
<Bundle-RequiredExecutionEnvironment>${felix.bree}</Bundle-RequiredExecutionEnvironment>
+                            
<Implementation-URL>https://felix.apache.org/documentation/subprojects/apache-felix-http-service.html</Implementation-URL>
                         </instructions>                        
                     </configuration>
                 </plugin>
@@ -94,14 +79,38 @@
 
     <dependencies>
         <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.annotation</artifactId>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        <dependency>
+               <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+        </dependency>
     </dependencies>
 
     <dependencyManagement>
         <dependencies>
             <dependency>
+                <groupId>com.google.code.findbugs</groupId>
+                <artifactId>jsr305</artifactId>
+                <version>3.0.2</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.osgi</groupId>
+                <artifactId>osgi.annotation</artifactId>
+                <version>6.0.1</version>
+                <scope>provided</scope>
+            </dependency>        
+            <dependency>
                 <groupId>javax.servlet</groupId>
                 <artifactId>javax.servlet-api</artifactId>
                 <version>${servlet.version}</version>
@@ -114,17 +123,17 @@
                 <scope>provided</scope>
             </dependency>
             <dependency>
-                <groupId>org.osgi</groupId>
-                <artifactId>osgi.cmpn</artifactId>
-                <version>6.0.0</version>
-                <scope>provided</scope>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.12</version>
+                <scope>test</scope>
             </dependency>
             <dependency>
-                <groupId>org.osgi</groupId>
-                <artifactId>osgi.annotation</artifactId>
-                <version>6.0.1</version>
-                <scope>provided</scope>
-            </dependency>        
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-core</artifactId>
+                <version>2.17.0</version>
+                <scope>test</scope>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>

Modified: felix/trunk/osgi-r7/http/base/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/base/pom.xml?rev=1828319&r1=1828318&r2=1828319&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/base/pom.xml (original)
+++ felix/trunk/osgi-r7/http/base/pom.xml Wed Apr  4 11:32:03 2018
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>9</version>
+        <version>10-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 
@@ -37,10 +37,6 @@
         <url>http://svn.apache.org/viewvc/felix/trunk/http/base/</url>
     </scm>
 
-    <properties>
-        <felix.java.version>7</felix.java.version>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>javax.servlet</groupId>
@@ -77,21 +73,15 @@
         <dependency>
             <groupId>commons-fileupload</groupId>
             <artifactId>commons-fileupload</artifactId>
-            <version>1.3.2</version>
+            <version>1.3.3</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>jsr305</artifactId>
-            <version>3.0.0</version>
+            <version>3.0.2</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-library</artifactId>
-            <version>1.3</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <repositories>

Modified: 
felix/trunk/osgi-r7/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapperTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapperTest.java?rev=1828319&r1=1828318&r2=1828319&view=diff
==============================================================================
--- 
felix/trunk/osgi-r7/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapperTest.java
 (original)
+++ 
felix/trunk/osgi-r7/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapperTest.java
 Wed Apr  4 11:32:03 2018
@@ -21,7 +21,7 @@ package org.apache.felix.http.base.inter
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -96,26 +96,26 @@ public class HttpSessionWrapperTest
         
when(containerSession.getAttribute(Mockito.anyString())).thenAnswer(new 
Answer<Object>() {
             @Override
             public Object answer(InvocationOnMock invocation) throws Throwable 
{
-                return attributes.get(invocation.getArgumentAt(0, 
String.class));
+                return attributes.get(invocation.getArgument(0));
             }
         });
         
when(containerSession.getAttribute(Mockito.anyString())).thenAnswer(new 
Answer<Object>() {
             @Override
             public Object answer(InvocationOnMock invocation) throws Throwable 
{
-                return attributes.get(invocation.getArgumentAt(0, 
String.class));
+                return attributes.get(invocation.getArgument(0));
             }
         });
         Mockito.doAnswer(new Answer<Object>() {
             @Override
             public Object answer(InvocationOnMock invocation) throws Throwable 
{
-                attributes.put(invocation.getArgumentAt(0, String.class), 
invocation.getArgumentAt(1, Object.class));
+                attributes.put((String)invocation.getArgument(0), 
invocation.getArgument(1));
                 return null;
             }
         }).when(containerSession).setAttribute(Mockito.anyString(), 
Mockito.any());
         Mockito.doAnswer(new Answer<Object>() {
             @Override
             public Object answer(InvocationOnMock invocation) throws Throwable 
{
-                attributes.remove(invocation.getArgumentAt(0, String.class));
+                attributes.remove(invocation.getArgument(0));
                 return null;
             }
         }).when(containerSession).removeAttribute(Mockito.anyString());

Modified: felix/trunk/osgi-r7/http/jetty/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/jetty/pom.xml?rev=1828319&r1=1828318&r2=1828319&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/jetty/pom.xml (original)
+++ felix/trunk/osgi-r7/http/jetty/pom.xml Wed Apr  4 11:32:03 2018
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>9</version>
+        <version>10-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 
@@ -49,7 +49,6 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.3.0</version>
                 <configuration>
                     <instructions>
                        <X-Jetty-Version>

Modified: 
felix/trunk/osgi-r7/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyConfigTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyConfigTest.java?rev=1828319&r1=1828318&r2=1828319&view=diff
==============================================================================
--- 
felix/trunk/osgi-r7/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyConfigTest.java
 (original)
+++ 
felix/trunk/osgi-r7/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyConfigTest.java
 Wed Apr  4 11:32:03 2018
@@ -16,8 +16,6 @@
  */
 package org.apache.felix.http.jetty.internal;
 
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.replay;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -28,6 +26,7 @@ import java.util.List;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.mockito.Mockito;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -153,8 +152,7 @@ public class JettyConfigTest
     @Before
     public void setUp()
     {
-        this.context = createNiceMock(BundleContext.class);
-        replay(this.context);
+        this.context = Mockito.mock(BundleContext.class);
         this.config = new JettyConfig(this.context);
     }
 }


Reply via email to