You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/01/27 14:09:07 UTC

[GitHub] [sling-org-apache-sling-distribution-core] rombert commented on a change in pull request #44: update to bundle-parent 40

rombert commented on a change in pull request #44:
URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/44#discussion_r565332881



##########
File path: pom.xml
##########
@@ -159,21 +162,39 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.cm</artifactId>
-            <version>1.6.0</version>
            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.component</artifactId>
-            <version>1.4.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.event</artifactId>
-            <version>1.4.0</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.annotation.versioning</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.annotation.bundle</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+        	<groupId>org.osgi</groupId>
+        	<artifactId>org.osgi.service.component.annotations</artifactId>
+        	<scope>provided</scope>
+      	</dependency>
+      	<dependency>
+        	<groupId>org.osgi</groupId>
+        	<artifactId>org.osgi.service.metatype.annotations</artifactId>
+        	<scope>provided</scope>
+      	</dependency>

Review comment:
       Nitpick: indentation is off here.

##########
File path: src/main/java/org/apache/sling/distribution/impl/DefaultDistributor.java
##########
@@ -31,22 +28,22 @@
 import org.apache.sling.distribution.component.impl.DistributionComponentProvider;
 import org.apache.sling.distribution.common.DistributionException;
 import org.jetbrains.annotations.NotNull;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Default implementation of Distributor interface that dispatches the request to available agents.
  */
-@Component
-@Service(Distributor.class)
+@Component(service=Distributor.class)

Review comment:
       IIRC you don't need `service=...` here as it's inferred.

##########
File path: src/test/java/org/apache/sling/distribution/queue/impl/simple/QueueItemMapperTest.java
##########
@@ -22,13 +22,15 @@
 import java.util.Map;
 
 import org.apache.sling.distribution.queue.DistributionQueueItem;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
 
 public class QueueItemMapperTest {
 
     @Test
+    @Ignore

Review comment:
       This should not be ignored.

##########
File path: pom.xml
##########
@@ -59,43 +58,47 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.sling</groupId>
-                <artifactId>maven-sling-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>org.apache.sling.distribution.core</Bundle-SymbolicName>
-                        <Export-Package>
-                            org.apache.sling.distribution.util,
-                            org.apache.sling.distribution.common,
-                            org.apache.sling.distribution.serialization,
-                            org.apache.sling.distribution.queue.spi,
-                            org.apache.sling.distribution.queue,
-                            org.apache.sling.distribution.log.spi,
-                            org.apache.sling.distribution.agent,
-                            org.apache.sling.distribution.agent.spi,
-                            org.apache.sling.distribution.packaging
-                        </Export-Package>
-                        <Import-Package>
-                            org.apache.http.nio.*;resolution:=optional,
-                            org.apache.http.impl.nio.client.*;resolution:=optional,
-                            org.apache.felix.hc.api;resolution:=optional,
-                            org.apache.sling.event.jobs;version="[1.5.0,3.0)",
-                            org.apache.sling.event.jobs.consumer;version="[1.1,2)",
-                            org.apache.sling.jcr.api;version="2.2.0",
-                            *
-                        </Import-Package>
-                    </instructions>
-                </configuration>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-maven-plugin</artifactId>
             </plugin>
+<!--             <plugin> -->

Review comment:
       You should remove the commented out code.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org