Code Monkey home page Code Monkey logo

aem-classification's Introduction

Maven Central License Build Status SonarCloud Status SonarCloud Coverage

Overview

This repository comprises of several modules around AEM's Content Classification.

Modules

  1. aem-classification-validator: A FileVault validator for AEMs content classification
  2. aem-classification-maps: Maps containing information about resource type classification. To be used with the validator
  3. aem-classification-maven-plugin: A Maven plugin to generate validation maps out of repository annotations (i.e. mixin properties). This is only necessary to generate your own maps (in case the provided ones are not sufficient)
  4. aem-classification-search-index-package: Oak index definitions necessary for the Maven plugin to work. This is only necessary to generate your own maps (in case the provided ones are not sufficient)

aem-classification's People

Contributors

dependabot[bot] avatar kwin avatar stefanseifert avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

stefanseifert

aem-classification's Issues

Merging of the maps results in incomplete final map, having incorrectly determined entries

Using AEM 6.5.13 and the latest aem-content-classifications jar, we get:

[ERROR] ValidationViolation: "netcentric-aem-classification: Element with name "jcr:root" inherits from resource 'granite/ui/components/coral/foundation/form/field' which is marked as 'granite:InternalArea (derived from parent content classification)'. It therefore violates the content classification!", filePath=jcr_root/apps/website/test/.content.xml, nodePath=/apps/website/test, line=5, column=79

But, AEM's repository says:

  • /libs/granite/ui/components/coral/foundation/form/field = granite:PublicArea
  • /libs/granite/ui/components/coral/foundation/form = granite:FinalArea
  • /libs/granite/ui/components/coral/foundation = granite:FinalArea
  • /libs/granite/ui/components/coral = granite:FinalArea
  • /libs/granite/ui/components = granite:FinalArea
  • /libs/granite/ui = No classification
  • /libs/granite = No classification
  • /libs = No classification

What is the recommended approach to using this tooling? To reference the JAR files, or to always generate the maps yourself and reference the generated maps? (When we generate a new map based on our 6.5.13 instance, we do get the correct classifications, where it also says that /libs/granite/ui/components/coral/foundation/form/field is PUBLIC, instead fo INTERNAL.)

"ERROR Resource path must not end with '/' but is '.../'" must be improved

Currently if one referenced resource ends with a slash the following exception is logged

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  49.602 s
[INFO] Finished at: 2020-03-12T09:33:12+01:00
[INFO] ------------------------------------------------------------------------
[DEBUG] No threads registered for execution at the end of the build
[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.0:validate-package (default-validate-package) on project nc-website-components-package: Execution default-validate-package of goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.0:validate-package failed: Resource path must not end with '/' but is '..../' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.0:validate-package (default-validate-package) on project nc-website-components-package: Execution default-validate-package of goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.0:validate-package failed: Resource path must not end with '/' but is '/libs/core/wcm/components/teaser/v1/teaser/

This error message must be improved to at least emit the file path where the error occurred!
Also the debug log level does not help much as the previous output is
[DEBUG] ValidationViolation: "Validating jcr file '<some jcr file>'..." which is not the failing file but the previous one!

The issue can be easily reproduced by setting the value sling:resourceSuperType on a component definition to a value like core/wcm/components/teaser/v1/teaser/

The situation will improve with the upcoming FileVault 3.4.4 (https://issues.apache.org/jira/browse/JCRVLT-406)

Improve element name in error message for violations in DocView XMLs

Currently a violation in a DocView XML leads to the following message:

[WARNING] ValidationViolation: "netcentric-aem-classification: Element with name "{}test" inherits from resource '...' which is marked as 'granite:InternalArea (derived from parent content classification)'. It therefore violates the content classification!", filePath=... nodePath=.., line=5, column=82

The element name has currently the JCR Expanded Form which is not really common for XML. Therefore it should be emitted in a more human readable format.
Unfortunately the prefix used for the namespace URI is unknown to the validator, so it should just

  • emit the local name only in case the namespace is empty
  • emit the local name followed by the namespace URI in brackets in case the namespace is not empty

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.