Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6047

incorrect metatype annotations

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0, 1.6.8, 1.8.0
    • Component/s: blob
    • Labels:
      None

      Description

      We need to update maven-scr-plugin to work with Java 8.

      Like that:

      Index: oak-parent/pom.xml
      ===================================================================
      --- oak-parent/pom.xml  (revision 1790388)
      +++ oak-parent/pom.xml  (working copy)
      @@ -63,8 +63,8 @@
           <h2.version>1.4.194</h2.version>
           <findbugs.version>3.0.0</findbugs.version>
           <derby.version>10.12.1.1</derby.version>
      -    <java.version>1.7</java.version>
      -    <java.version.signature>java17</java.version.signature>
      +    <java.version>1.8</java.version>
      +    <java.version.signature>java18</java.version.signature>
      
          <!-- specifies on which fixture to run the integration testing tests.
             override in profiles or provide from command line to change behaviour. Provide
      @@ -238,7 +238,7 @@
               <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
      -          <version>1.16.0</version>
      +          <version>1.24.0</version>
                 <executions>
                   <execution>
                     <id>generate-scr-scrdescriptor</id>
      

      Once we do that, the following declarations aren't accepted anymore:

      "Component is defined to generate metatype information, however no properties or only private properties have been defined; in case no properties or only private properties are wanted, consider to use 'metatype=false'"

      To fix this, we need:

      Index: oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3DataStoreService.java
      ===================================================================
      --- oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3DataStoreService.java        (revision 1790388)
      +++ oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3DataStoreService.java        (working copy)
      @@ -22,7 +22,7 @@
       import org.apache.felix.scr.annotations.Component;
       import org.apache.felix.scr.annotations.ConfigurationPolicy;
      
      -@Component(policy = ConfigurationPolicy.REQUIRE, name = S3DataStoreService.NAME, metatype = true)
      +@Component(policy = ConfigurationPolicy.REQUIRE, name = S3DataStoreService.NAME)
       public class S3DataStoreService extends AbstractS3DataStoreService {
           public static final String NAME = "org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore";
       }
      Index: oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/SharedS3DataStoreService.java
      ===================================================================
      --- oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/SharedS3DataStoreService.java  (revision 1790388)
      +++ oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/SharedS3DataStoreService.java  (working copy)
      @@ -22,7 +22,7 @@
       import org.apache.felix.scr.annotations.Component;
       import org.apache.felix.scr.annotations.ConfigurationPolicy;
      
      -@Component(policy = ConfigurationPolicy.REQUIRE, name = SharedS3DataStoreService.NAME, metatype = true)
      +@Component(policy = ConfigurationPolicy.REQUIRE, name = SharedS3DataStoreService.NAME)
       public class SharedS3DataStoreService extends AbstractS3DataStoreService {
           public static final String NAME = "org.apache.jackrabbit.oak.plugins.blob.datastore.SharedS3DataStore";
       }
      Index: oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureDataStoreService.java
      ===================================================================
      --- oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureDataStoreService.java        (revision 1790388)
      +++ oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureDataStoreService.java        (working copy)
      @@ -22,7 +22,7 @@
       import org.apache.felix.scr.annotations.Component;
       import org.apache.felix.scr.annotations.ConfigurationPolicy;
      
      -@Component(policy = ConfigurationPolicy.REQUIRE, name = AzureDataStoreService.NAME, metatype = true)
      +@Component(policy = ConfigurationPolicy.REQUIRE, name = AzureDataStoreService.NAME)
       public class AzureDataStoreService extends AbstractAzureDataStoreService {
           public static final String NAME = "org.apache.jackrabbit.oak.plugins.blob.datastore.AzureDataStore";
       }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amitjain Amit Jain
                Reporter:
                reschke Julian Reschke
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: