You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2019/07/10 08:25:00 UTC

[jira] [Updated] (OAK-6049) incorrect metatype annotations in CustomRestrictionProvider exercise

     [ https://issues.apache.org/jira/browse/OAK-6049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated OAK-6049:
--------------------------------
    Fix Version/s: 1.6.18

> incorrect metatype annotations in CustomRestrictionProvider exercise
> --------------------------------------------------------------------
>
>                 Key: OAK-6049
>                 URL: https://issues.apache.org/jira/browse/OAK-6049
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: exercise
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Trivial
>              Labels: candidate_oak_1_4, candidate_oak_1_6
>             Fix For: 1.7.0, 1.8.0, 1.6.18
>
>
> We need to update maven-scr-plugin to work with Java 8. 
> Like that:
> {noformat}
> 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>
> {noformat}
> 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:
> {noformat}
> Index: oak-exercise/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/CustomRestrictionProvider.java
> ===================================================================
> --- oak-exercise/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/CustomRestrictionProvider.java      (revision 1790388)
> +++ oak-exercise/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/CustomRestrictionProvider.java      (working copy)
> @@ -36,9 +36,9 @@
>  import org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider;
>  /**
> - * EXERCISE: complete the implemenation
> + * EXERCISE: complete the implementation
>   */
> -@Component(metatype = true, policy = ConfigurationPolicy.REQUIRE)
> +@Component(policy = ConfigurationPolicy.REQUIRE)
>  @Service({RestrictionProvider.class})
>  public class CustomRestrictionProvider implements RestrictionProvider {
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)