OakPAL - API bundle

OakPAL API bundle

License

License

Categories

Categories

Net
GroupId

GroupId

net.adamcin.oakpal
ArtifactId

ArtifactId

oakpal-api
Last Version

Last Version

2.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

OakPAL - API bundle
OakPAL API bundle
Project URL

Project URL

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

Source Code Management

https://github.com/adamcin/oakpal

Download oakpal-api

How to add to project

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

Dependencies

compile (7)

Group / Artifact Type Version
org.osgi : org.osgi.annotation.versioning jar 1.1.0
org.apache.jackrabbit.vault : org.apache.jackrabbit.vault jar 3.4.4
org.apache.jackrabbit : jackrabbit-jcr-commons jar 2.20.0
org.apache.jackrabbit : oak-jackrabbit-api jar 1.26.0
org.apache.sling : org.apache.sling.commons.johnzon jar 1.1.0
javax.jcr : jcr jar 2.0
org.slf4j : slf4j-api jar 1.7.21

provided (1)

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

test (6)

Group / Artifact Type Version
junit : junit jar 4.12
net.adamcin.oakpal : oakpal-testing jar 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