OakPAL - Core

OakPAL Core Implementation

License

License

Categories

Categories

Net
GroupId

GroupId

net.adamcin.oakpal
ArtifactId

ArtifactId

oakpal-core
Last Version

Last Version

2.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

OakPAL - Core
OakPAL Core Implementation
Project URL

Project URL

http://adamcin.net/oakpal/oakpal-core
Source Code Management

Source Code Management

https://github.com/adamcin/oakpal

Download oakpal-core

How to add to project

<!-- https://jarcasting.com/artifacts/net.adamcin.oakpal/oakpal-core/ -->
<dependency>
    <groupId>net.adamcin.oakpal</groupId>
    <artifactId>oakpal-core</artifactId>
    <version>2.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.adamcin.oakpal/oakpal-core/
implementation 'net.adamcin.oakpal:oakpal-core:2.2.2'
// https://jarcasting.com/artifacts/net.adamcin.oakpal/oakpal-core/
implementation ("net.adamcin.oakpal:oakpal-core:2.2.2")
'net.adamcin.oakpal:oakpal-core:jar:2.2.2'
<dependency org="net.adamcin.oakpal" name="oakpal-core" rev="2.2.2">
  <artifact name="oakpal-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.adamcin.oakpal', module='oakpal-core', version='2.2.2')
)
libraryDependencies += "net.adamcin.oakpal" % "oakpal-core" % "2.2.2"
[net.adamcin.oakpal/oakpal-core "2.2.2"]

Dependencies

compile (11)

Group / Artifact Type Version
org.osgi : org.osgi.annotation.versioning jar 1.1.0
net.adamcin.oakpal : oakpal-api jar 2.2.2
org.apache.jackrabbit.vault : org.apache.jackrabbit.vault jar 3.4.4
org.apache.sling : org.apache.sling.commons.johnzon jar 1.1.0
org.apache.sling : org.apache.sling.repoinit.parser jar 1.6.2
javax.jcr : jcr jar 2.0
org.apache.jackrabbit : jackrabbit-spi-commons jar 2.20.0
org.apache.jackrabbit : oak-core jar 1.26.0
org.apache.jackrabbit : oak-jcr jar 1.26.0
org.apache.jackrabbit : oak-authorization-principalbased jar 1.26.0
org.slf4j : slf4j-api jar 1.7.21

provided (1)

Group / Artifact Type Version
org.jetbrains : annotations jar 18.0.0

test (7)

Group / Artifact Type Version
junit : junit jar 4.12
net.adamcin.oakpal : oakpal-testing jar 2.2.2
net.adamcin.oakpal : oakpal-caliper.all zip 2.2.2
ch.qos.logback : logback-classic jar 1.0.7
org.mockito : mockito-core jar 3.3.3
commons-io : commons-io jar 2.5
junit-addons : junit-addons jar 1.4

Project Modules

There are no modules declared in this project.

OakPAL: Oak Package Acceptance Library

Build Status Coverage Status Maven Central

About OakPAL

OakPAL was inspired by my continuing attempts to improve the validation features of the CRX Content Package Deployer Plugin for Jenkins. It relies on another library I created called granite-client-packman. The validation features

I added to that library began to hit significant limitations because I was approaching the task from a static analysis perspective. It's easy to statically examine a package for the content that it will create in a repository, because this content exists in the artifact itself, and is predictably shaped by the package's workspace filter. It is also relatively easy to check package metadata for completeness and conformance to CI assumptions and to parse DocView XML files to ensure well-formedness.

However, static package analysis leaves some major gaps and edge cases unaddressed:

  1. Inability to make deterministic assertions about what existing content will be deleted or changed upon package installation.

  2. Inability to account for NodeType constraints.

  3. Inability to perform analysis of multiple packages that will be installed in sequence.

After ultimately failing to completely address the above issues with heuristics and broad and/or high-level restrictions on ACHandling and FilterSet import modes, I finally realized that the only way to properly test a package is by installing it, and watching (listening?) for what happens to the target repository.

The CRX Jenkins plugin (and the content-package-maven-plugin) make it possible to install packages in AEM servers over HTTP, but the simple protocol returns only limited information about errors, you have to account for transport errors and authentication, and the heavyweight nature of the application makes it painful to implement a CI process that can reset an AEM server to an exact precondition state.

OakPAL was designed to fill this gap, by providing:

  1. A model for repeatable repository state initialization using InitStages and preinstall packages.

  2. An OakMachine class with a fluent Builder API that encapsulates the creation of a fresh Oak repository, state initialization, and package installation for every set of package files.

  3. A pluggable listener API with classpath discovery of third-party Checklists, ProgressChecks, and ScriptProgressChecks, which receive progress tracker events along with read-only access to incremental repository state, and which can report Violations at the end of a scan.

Docker Image

The oakpal docker image is built on adoptopenjdk11 / OpenJ9.

# pull the latest
docker pull adamcin/oakpal:latest

# print the help text
docker run -v $(pwd):/work adamcin/oakpal --help

# scan a file using the basic checklist
cp <somepackage> my-content-package.zip
docker run -v $(pwd):/work adamcin/oakpal my-content-package.zip

Versions

Version
2.2.2
2.2.1
2.2.0
2.1.0
2.0.0
1.5.2
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.4.0-RC3
1.4.0-RC2
1.4.0-RC1
1.3.0
1.3.0-RC3
1.3.0-RC2
1.3.0-RC1
1.2.1
1.2.0
1.1.13
1.1.12
1.1.11
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.9.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0