Open source Java based Web framework designed to create content-centric applications on top of a Java Content Repository.
Source Location (Subversion):
Apache Felix is an implementation of the OSGi Framework and Service platform.
Source Location (Subversion):
Source Location (Subversion):
Jackrabbit Oak is a Java Content Repository implementation designed to be the foundation for modern web applications.
https://subversion.apache.org/
Subversion is a source control repository.
In subversion, every revision is a commit to the repository. A commit is a collection changes including files and/or folders.
Checkout - svn co
svn co http://svnserver/svn-repo/project-path - downloads ("checks out") the latest files from that path
svn -r {revision-id} co {url} - checks out a specific revision
Status - svn status
svn status - lists local changes
svn diff - shows diff of local changes vs. checked out version
/project-name/trunk - latest unstable changes
/project-name/branches - branched changes of the code
e.g. Oak v1.2.x code is committed to oak/branches/1.2
/project-name/tags - released versions of code
If you are looking for a specific version of the project code.
e.g. Oak 1.2.7 code can be found under oak/tags/1.2.7
Check out Apache Sling Event Support bundle version 3.74 to the current working directory:
svn co http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.event-3.7.4
project name
Tags folder
containing
released versions
tag folder
of bundle
release
checkout
command
Apache Felix Project has a releases folder instead of tags
(optional) Eclipse IDE
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/marsr
Maven
build tool with dependency management
Maven settings configuration:
{user-home}/.m2/settings.xml
Specifies which remote maven repositories to use. https://maven.apache.org/settings.html
Local Maven Repository:
{user-home}/.m2/repository
Dependency jar files are downloaded here.
Project configuration:
pom.xml
Build details - project dependencies, plugins, etc.
https://maven.apache.org/guides/introduction/introduction-to-the-pom.html
Run these commands where the pom.xml file is located.
mvn package
builds the project under the target directory of the project
mvn install
builds the project under the target
directory and copies the bundle to the local maven repostory under {user-home}/.m2/repository
mvn clean
Deletes files from the target folder.
Configure Maven Installation in Eclipse
Preferences => Maven => Installations => Add...
Import the existing maven project from the file system
(Right click) Project Explorer => Import => Import... => Maven
=> Existing Maven Projects
Select the project path
Browse... => Select Path => Finish
Project would automatically build and download dependencies. When it is done it looks like this:
Search for the source files from stack traces in the logs.
Ctrl+Shift+T (windows) or Cmd+shift+T (Mac) to open the dialog
Make the desired changes and build.
Right-click Project => Run As => Maven install
Configure a custom build configuration
Right-click Project => Run As => Run Configurations... =>
Double-click "Maven Build"
Modify the project version
Open the pom.xml file => edit the <version> by appending some identifying info "-cc#####"
Run mvn clean package via a custom build configuration
Create the build config and click Run
Leverage the Sling JCR Installer
https://sling.apache.org/documentation/bundles/jcr-installer-provider.html
Use curl to install the bundle to the Sling server.
curl -v -u user:pass -T path/to/file.jar http://host:port/path/to/install/org.apache.sling.event-3.7.4-cc98105.jar
curl -v -u admin:admin -T target/org.apache.sling.event-3.7.4-cc98105.jar http://localhost:4506/libs/system/install/org.apache.sling.event-3.7.4-cc98105.jar
In the Apache Felix bundles console:
http://host:port/system/console/bundles
we can see that our bundle is installed