Skip to content

Commit

Permalink
OAK-9440 update pom.xml for migrated SCM repositories to GitBox/GitHub
Browse files Browse the repository at this point in the history
update documentation
  • Loading branch information
kwin committed Jun 1, 2021
1 parent 9c7d7bf commit 4030fd1
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 184 deletions.
4 changes: 2 additions & 2 deletions oak-doc/src/site/markdown/branching.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Check that the following files contains the right versions

## 2. Revert the local changes

You'll have a bunch of files locally that are not committed to svn.
You'll have a bunch of files locally that are not committed to Git.
Just to have a clean situation clean up everything

$ svn st | grep '^?' | awk '{print $2}' | xargs rm
$ git clean -f

## 3. Actual branching

Expand Down
6 changes: 4 additions & 2 deletions oak-doc/src/site/markdown/dev_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ to start learning about Oak.
There is also the [Jackrabbit 3 wiki page](https://jackrabbit.apache.org/archive/wiki/JCR/Jackrabbit-3_115513423.html), which
is mostly outdated though and should only be consulted for historical research.

To get started developing Oak, checkout the sources from [svn](https://svn.apache.org/repos/asf/jackrabbit/oak/trunk),
or [fork them](https://github.com/apache/jackrabbit-oak) on GitHub. Then build the latest sources with Maven 3 and
To get started developing Oak, clone the [Git repository](https://github.com/apache/jackrabbit-oak),
or fork it on [GitHub](https://github.com/apache/jackrabbit-oak). Then build the latest sources with Maven 3 and
Java 8 (or higher) like this:

mvn clean install
Expand All @@ -40,6 +40,8 @@ Before committing changes or submitting a patch, please make sure that the above
build passes without errors. If you like, you can enable integration tests by default by setting the
`OAK_INTEGRATION_TESTING` environment variable.

Please also refer to the documentation [Developing with Git](./developing-with-git.html)

MongoDB integration
-------------------

Expand Down
118 changes: 4 additions & 114 deletions oak-doc/src/site/markdown/developing-with-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,119 +17,9 @@

# Developing with Git

Oak codebase is backed by SVN, not git. The github location is a
mirror that could lag hours behind.
The Oak code base is backed by Git. It has its remote repository both at [ASF Gitbox](https://gitbox.apache.org/repos/asf/jackrabbit-oak.git) and [GitHub](https://github.com/apache/jackrabbit-oak).

Following an example on how to start on a feature named:
FEATURE. Where you'll work and commit against your fork on github and
eventually produce a patch to be attached to the jira issue or commit
it straight to svn (assuming you have rights).
For *committers* [write access to GitBox](https://infra.apache.org/git-primer.html) requires the Apache LDAP credentials via HTTPS Basic Authentication. For write access to GitHub you need to link your accounts once via the [GitBox Account Linking Utility](https://gitbox.apache.org/setup/).
For GitHub it is recommended to work with [SSH](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) instead of HTTPS authentication.

## Initialising the local environment

First of all you need to [fork the github repo](http://github.com/apache/jackrabbit-oak).

# clone your fork (as origin) into ./jackrabbit-oak
git clone https://github.com/YOUR_USER/jackrabbit-oak.git

cd jackrabbit-oak

# Adding the oak GH repo as upstream
git remote add upstream https://github.com/apache/jackrabbit-oak.git

# take the upstream trunk
git fetch upstream
git checkout -b upstream-trunk upstream/trunk

# take the latest Apache's authors file for git svn
curl https://git-wip-us.apache.org/authors.txt -o .git/authors.txt
git config svn.authorsfile .git/authors.txt

# init git svn
git svn init --prefix=upstream/ --tags=tags --trunk=trunk \
--branches=branches \
https://svn.apache.org/repos/asf/jackrabbit/oak
## Creating a new feature branch

Now it's possible to start working on a feature branch like this

# Ensure you're in upstream-trunk
git checkout upstream-trunk

# align with svn
git svn rebase

# create a new feature branch
git checkout -b FEATURE

# push it to your fork
git push --set-upstream origin FEATURE

## Work on the feature branch

Now the work can be carried out easily on the feature branch by
keeping it regularly aligned with svn and pushing it to the fork

# Merge the latest trunk from svn
git checkout upstream-trunk
git svn rebase
git checkout FEATURE
git merge upstream-trunk

# your normal work and commits in FEATURE

# sending the commits to github
git push

## Producing a patch against trunk

Now the work is completed and you want to attach a patch to the jira
issue for commit and/or review

git checkout upstream-trunk
git svn rebase
git checkout FEATURE
git merge upstream-trunk

# solve any conflicts

git push

# producing the patch file
git diff -w -p upstream-trunk > ~/FEATURE.patch


## Committing to svn

As for the patch, the work is complete and you want to commmit to svn
(assuming you have rights)

# getting the latest svn
git checkout upstream-trunk
git svn rebase
git checkout FEATURE
git merge upstream-trunk
git push

# taking all the branch commit into upstream as one big commit
git checkout upstream-trunk
git merge --squash --no-commit FEATURE

# committing all the changes as git
git commit -a

# committing all the changes to svn
git svn dcommit --username=goofy --no-rebase

# --username is needed only the first commit or if differs from
# the currently logged in
# --no-rebase is useful if you're EU based as the apache svn EU
# mirror lag behind some seconds.
#
# if in EU wait 10 seconds and give a `git svn rebase` to properly
# align your upstream later on.

## References

- https://wiki.apache.org/general/GitAtApache
For *non-committers* it is recommended to use in your own forked GitHub repository and create PR from branches there. Further details in <https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork>
60 changes: 21 additions & 39 deletions oak-doc/src/site/markdown/diagnostic-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,19 @@ version of `<version>1.16-SNAPSHOT</version>`.

### What version shall I use?

Open the svn directory where trunk is and issue a
Open the Git working directory where trunk is and issue a

$ svn up
$ svn info
$ git pull
$ git rev-parse --short HEAD

you will see something like

Working Copy Root Path: /apache/oak-svn-1.0
URL: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1708581
Node Kind: directory
Schedule: normal
Last Changed Author: chetanm
Last Changed Rev: 1708547
Last Changed Date: 2015-10-14 06:56:40 +0100 (Wed, 14 Oct 2015)
9c7d7bf569

what you're interested is the revision number. In our case: `1708581`.
which is the short Git hash of the most recent commit.

This means you'll produce a bundle with a version of
`1.15-R2708581`.
`1.15-R9c7d7bf569`.

**Note that the produced version is lower then the official release
you're working on. 1.15 vs 1.16.0**
Expand All @@ -80,28 +71,19 @@ version of `<version>1.0.23-SNAPSHOT</version>`.

### What version shall I use?

Open the svn directory where the 1.0 branch is and issue a
Open the Git working directory where the relevant branch (in the example 1.0) is and issue a

$ svn up
$ svn info
$ git pull
$ git rev-parse --short HEAD

you will see something like

Working Copy Root Path: /apache/oak-svn-1.0
URL: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1708581
Node Kind: directory
Schedule: normal
Last Changed Author: chetanm
Last Changed Rev: 1708547
Last Changed Date: 2015-10-14 06:56:40 +0100 (Wed, 14 Oct 2015)
9c7d7bf569

what you're interested is the revision number. In our case: `1708581`.
which is the short Git hash of the most recent commit in that branch.

This means you'll produce a bundle with a version of
`1.0.22-R2708581`.
`1.0.22-R9c7d7bf569`.

**Note that the produced version is lower then the official release
you're working on. 1.0.22 vs 1.0.23**
Expand All @@ -121,18 +103,18 @@ fix is going to be released.

### Changing the version in all the poms.

Now. From our examples above you either want to produce `1.0.22-R2708581`
or `1.15-R2708581`. For sake of simplicty we'll detail only the `1.0.22-R2708581`
case. For `1.15-R2708581` you simply have to change the version.
Now. From our examples above you either want to produce `1.0.22-R9c7d7bf569``
or `1.15-R9c7d7bf569`. For sake of simplicity we'll detail only the `1.0.22-R9c7d7bf569`
case. For `1.15-R9c7d7bf569` you simply have to change the version.

Go into `oak-parent` and issue the following maven command.

oak-parent$ mvn versions:set -DnewVersion=1.0.22-R2708581
oak-parent$ mvn versions:set -DnewVersion=1.0.22-R9c7d7bf569

you may encounter the following exception. Simply ignore it. Nothing
went wrong.

java.io.FileNotFoundException: /oak-svn-1.0/oak-parent/oak-parent (No such file or directory)
java.io.FileNotFoundException: .../oak-parent/oak-parent (No such file or directory)

### Building the release

Expand All @@ -141,13 +123,13 @@ Now you can build the release as usual
jackrabbit-oak$ mvn clean install

and you'll have a full oak build with the version
`1.0.22-R2708581`. Go into `oak-core/target` and take the produced
`1.0.22-R9c7d7bf569`. Go into `oak-core/target` and take the produced
jar.

### Re-setting the svn branch
### Re-setting the working directory

You don't want to commit the changes back to svn so we reset the
branch as the original state
You don't want to commit the changes in Git just reset the
branch to the original state

jackrabbit-oak$ mvn versions:revert

3 changes: 1 addition & 2 deletions oak-doc/src/site/markdown/downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

Downloads
=========
The latest Oak sources are available for checkout from [svn](https://svn.apache.org/repos/asf/jackrabbit/oak/trunk),
or you can [clone or fork them](https://github.com/apache/jackrabbit-oak) on GitHub.
The latest Oak sources are available for cloning from [GitHub](https://github.com/apache/jackrabbit-oak).

See the Jackrabbit [Downloads](http://jackrabbit.apache.org/downloads.html)
page for stable releases.
2 changes: 1 addition & 1 deletion oak-doc/src/site/markdown/participating.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ RTC or CTR is up to the committer.

[1]: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk
[2]: https://github.com/apache/jackrabbit-oak
[3]: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/
[3]: https://github.com/apache/jackrabbit-oak/tree/trunk/
2 changes: 1 addition & 1 deletion oak-doc/src/site/markdown/query/solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Configuring a single remote Solr instance consists of providing the URL to conne
(https://wiki.apache.org/solr/SolrTerminology) that will host the Solr index for the Oak repository via the _solr.http.url_
property which will have to contain such a URL (e.g. _http://10.10.1.101:8983/solr/oak_).
All the configuration and tuning of Solr, other than what's described on this page, will have to be performed on the
Solr side; [sample Solr configuration](http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-solr-core/src/main/resources/solr/)
Solr side; [sample Solr configuration](https://github.com/apache/jackrabbit-oak/tree/trunk/oak-solr-core/src/main/resources/solr/)
files (schema.xml, solrconfig.xml, etc.) to start with can be found in _oak-solr-core_ artifact.

###### SolrCloud cluster
Expand Down
14 changes: 7 additions & 7 deletions oak-doc/src/site/markdown/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ Maintenance branches
--------------------
We currently support the following maintenance branches:

* [Oak 1.22](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.22/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.22)) - from Java 8 up to Java 13
* [Oak 1.8](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.8/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.8)) - from Java 8 up to Java 13
* [Oak 1.6](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.6/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.6)) - recommended version for Java 7 (Java 8 and later since 1.6.21) - "end of life" planned for Spring 2022
* [Oak 1.4](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.4/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.4)) - recommended version for Java 7 (Java 8 and later since 1.4.27) - "end of life" planned for Spring 2021
* [Oak 1.22](https://github.com/apache/jackrabbit-oak/tree/1.22/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.22)) - from Java 8 up to Java 13
* [Oak 1.8](https://github.com/apache/jackrabbit-oak/tree/1.8/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.8)) - from Java 8 up to Java 13
* [Oak 1.6](https://github.com/apache/jackrabbit-oak/tree/1.6/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.6)) - recommended version for Java 7 (Java 8 and later since 1.6.21) - "end of life" planned for Spring 2022
* [Oak 1.4](https://github.com/apache/jackrabbit-oak/tree/1.4/) ([download](https://jackrabbit.apache.org/jcr/downloads.html#oak1.4)) - recommended version for Java 7 (Java 8 and later since 1.4.27) - "end of life" planned for Spring 2021

Users of 1.4 and 1.6 should consider upgrading to the newest stable branch applicable for the Java version in use.

End of life
-----------
The following branches have reached "end of life":

* [Oak 1.10](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.10/)
* [Oak 1.2](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.2/)
* [Oak 1.0](https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0/)
* [Oak 1.10](https://github.com/apache/jackrabbit-oak/tree/1.10/)
* [Oak 1.2](https://github.com/apache/jackrabbit-oak/tree/1.2/)
* [Oak 1.0](https://github.com/apache/jackrabbit-oak/tree/1.0/)
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The `ExternalPrincipalConfiguration` defines the following configuration options
[DefaultSyncedIdentity]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncedIdentity.html
[DefaultSyncHandler]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncHandler.html
[ExternalIdentityRef]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityRef.html
[DynamicSyncContext]: http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DynamicSyncContext.java
[DynamicSyncContext]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DynamicSyncContext.java
[OAK-4101]: https://issues.apache.org/jira/browse/OAK-4101
[OAK-2687]: https://issues.apache.org/jira/browse/OAK-2687
[OAK-4301]: https://issues.apache.org/jira/browse/OAK-4301
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ OSGi environment, please make sure it gets properly referenced by the
[ExternalUser]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalUser.html
[ExternalGroup]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalGroup.html
[ExternalIdentityRef]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityRef.html
[CustomExternalIdentityProvider]: http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-exercise/src/main/java/org/apache/jackrabbit/oak/exercise/security/authentication/external/CustomExternalIdentityProvider.java
[CustomExternalIdentityProvider]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-exercise/src/main/java/org/apache/jackrabbit/oak/exercise/security/authentication/external/CustomExternalIdentityProvider.java
[PrincipalNameResolver]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authentication/external/PrincipalNameResolver.html
[OAK-5210]: https://issues.apache.org/jira/browse/OAK-5210
8 changes: 4 additions & 4 deletions oak-doc/src/site/markdown/security/authorization/composite.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ might otherwise result in severe security issues and heavily impact overall perf
[PolicyOwner]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/PolicyOwner.html
[AggregatedPermissionProvider]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authorization/permission/AggregatedPermissionProvider.html
[AggregationFilter]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authorization/permission/AggregationFilter.html
[CompositeAuthorizationConfiguration]: http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAuthorizationConfiguration.java
[CompositeAccessControlManager]: http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManager.java
[CompositePermissionProvider]: http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositePermissionProvider.java
[ThreeRolesAuthorizationConfiguration]: http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-exercise/src/main/java/org/apache/jackrabbit/oak/exercise/security/authorization/models/simplifiedroles/ThreeRolesAuthorizationConfiguration.java
[CompositeAuthorizationConfiguration]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAuthorizationConfiguration.java
[CompositeAccessControlManager]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManager.java
[CompositePermissionProvider]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositePermissionProvider.java
[ThreeRolesAuthorizationConfiguration]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-exercise/src/main/java/org/apache/jackrabbit/oak/exercise/security/authorization/models/simplifiedroles/ThreeRolesAuthorizationConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ The time-based `RestrictionPattern` used by the example provider above.
Repository repo = new Jcr(new Oak()).with(securityProvider).createRepository();

<!-- hidden references -->
[GlobPattern]: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/GlobPattern.java?view=markup
[GlobRestrictionTest]: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/authorization/accesscontrol/L8_GlobRestrictionTest.java?view=markup
[GlobPattern]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/GlobPattern.java?view=markup
[GlobRestrictionTest]: https://github.com/apache/jackrabbit-oak/tree/trunk/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/authorization/accesscontrol/L8_GlobRestrictionTest.java?view=markup
[Restriction]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authorization/restriction/Restriction.html
[RestrictionDefinition]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionDefinition.html
[RestrictionPattern]: /oak/docs/apidocs/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionPattern.html
Expand Down

0 comments on commit 4030fd1

Please sign in to comment.