wilx commented on code in PR #359:
URL: https://github.com/apache/felix-dev/pull/359#discussion_r1881575073


##########
log/pom.xml:
##########
@@ -49,6 +49,30 @@
       <groupId>org.osgi</groupId>
       <artifactId>osgi.core</artifactId>
       <version>6.0.0</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.namespace.service</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>osgi.annotation</artifactId>
+      <version>8.1.0</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.service.component.annotations</artifactId>
+      <version>1.5.1</version>
+      <optional>true</optional>

Review Comment:
   It makes it cleaner for users of this artifact. The annotations are only 
needed during compile time and are then discarded. The `provided` scope shows 
up in project dependencies for anyone who would use this as a dependency. While 
`optional` dependencies do not propagate automatically and have to be added by 
user of this artifact manually. See "[How do optional dependencies 
work?](https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html)"
 in Maven documentation.



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@felix.apache.org

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

Reply via email to