Follow these Java coding guidelines:
- Google Java Style Guide, except braces must follow the Allman style instead of K & R style;
- Effective Java, Second Edition, by Joshua Bloch;
- Oracle Secure Coding Guidelines for Java SE.
For every new major functionality, there must be unit tests added to some unit test class that is part of the automated test suite of pdp-engine's MainTest.java. If the functionality has any impact on XACML - any Request/Response/Policy(Set) element - processing and/or change XACML standard conformance in any way, make sure you add relevant integration and/or conformance tests to the test suite run by pdp-testutils's MainTest.java.
You may run the tests as follows from your local copy of the repository:
$ mvn test
You may build the project and generate the JAR as follows from your local copy of the repository:
$ mvn package
Note that you must use Java 8 to run Maven when building the project.
No SNAPSHOT dependencies allowed on "develop" and "master" branches.
- From the develop branch, prepare a release (example using an HTTP proxy):
$ mvn -Dhttps.proxyHost=proxyhostname -Dhttps.proxyPort=80 jgitflow:release-start
- Update the CHANGELOG according to keepachangelog.com.
- To perform the release (example using an HTTP proxy):
If, after deployment, the command does not succeed because of some issue with the branches. Fix the issue, then re-run the same command but with 'noDeploy' option set to true to avoid re-deployment:
$ mvn -Dhttps.proxyHost=proxyhostname -Dhttps.proxyPort=80 jgitflow:release-finish
More info on jgitflow: http://jgitflow.bitbucket.org/$ mvn -Dhttps.proxyHost=proxyhostname -Dhttps.proxyPort=80 -DnoDeploy=true jgitflow:release-finish
- Connect and log in to the OSS Nexus Repository Manager: https://oss.sonatype.org/
- Go to Staging Profiles and select the pending repository authzforce-*... you just uploaded with
jgitflow:release-finish
- Click the Release button to release to Maven Central.
- Create a new Release on GitHub (copy-paste the description from previous releases and update the versions)
- If the PDP configuration XSD has changed with the new release, publish the new schema document in HTML form on https://authzforce.github.io (example for XSD version 8.1) by following the instructions in the section below.
Install FlexDoc/XML (tested with v1.12.2).
Install openjfx (e.g. on Ubuntu/Debian):
$ sudo apt install openjfx
On Linux, modify the JAVA_HOME and CLASS_PATH variables in .../flexdoc-xml-XXX/bin/linux/generator.sh
:
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
...
# Add JavaFX libraries to the classpath
CLASS_PATH="${FDH}/lib/xml-apis.jar:${FDH}/lib/xercesImpl.jar:${FDH}/lib/resolver.jar:${FDH}/lib/flexdoc-xml.jar:/usr/share/openjfx/lib/*"
Run FlexDoc generator from the XSD documentation directory pdp.xsd/XXX
where XXX
is the schema version:
$ git clone https://github.com/authzforce/authzforce.github.io.git
$ cd authzforce.github.io
$ mkdir -p pdp.xsd/7.1
$ /path/to/flexdoc-xml-XXX/bin/linux/generator.sh
In the Generator dialog, and specify:
- Template:
.../flexdoc-xml-XXX/templates/XSDDoc/FramedDoc.tpl
- Params: set Generate Details / For Schemas / Exclude parameter to
xacml-core-v3-schema-wd-17.xsd;xml.xsd
. OK.
- Params: set Generate Details / For Schemas / Exclude parameter to
- XML file:
https://raw.githubusercontent.com/authzforce/core/master/pdp-engine/src/main/resources/pdp.xsd
- Catalog: add the
catalog.xml
from the repository you just git cloned.
- Catalog: add the
- Output format: HTML
Then hit Run.