You will need to install the following for extension development:
- Java 1.8, 11, or 17 (JRE and JDK)
- maven (for other automated tooling)
- Optional: Docker and Docker Compose (for managing test database servers)
- Install the repo -
git clone [email protected]:ortus-solutions/extension-hibernate.git
- Set up an environment/secrets file -
cp .env.template .env
- Download dependency sources for IDE integration -
mvn dependency:copy-dependencies
- Build extension via
mvn package
- Test via
box run-script deploy.lucee5 && server restart && testbox run
(See #Testing for more info)
Before you send a PR:
- Run the test suite
- (if you can't get tests to pass, ask for help!)
- Add a note to
CHANGELOG.md
under## Unreleased
with a summary of the change
mvn dependency:copy-dependencies
Download dependency sources for VS code detection and source browsing. This is not needed to build the extension, but it is useful to remove the "Import not found" errors in VS Code.mvn clean
clean build directoriesmvn package
Package the extension into a Lucee-installable.lex
extension filemvn test
run java-based (junit) testsmvn javadoc:javadoc
generate java docsmvn formatter:format
format java source codebox run-script format
format CFML source code (mainly thetests/
directory.)
To run CFML tests against the extension:
- Start the test server using
box server start
- For testing on Lucee 6, run
box server start server-lucee6.json
- For testing on Lucee 6, run
- Build and deploy the extension source via
box run-script deploy.lucee5
- For testing on Lucee 6, run
box run-script deploy.lucee6
- For testing on Lucee 6, run
- Restart the server to pick up the new extension -
box server restart
- Run tests from the extension root with
box testbox run
For "full" database suite tests, you'll want to start the test databases using Docker-compose docker-compose up -d
. This will start up MSSQL, MySQL, and Postgres database instances for database-specific tests.
To build and test on Lucee 6, use the server-lucee6.json
file and deploy.lucee6
build script:
box server start server-lucee6.json
box run-script deploy.lucee6
box server restart name=lucee6
box testbox run
Releasing is mostly automated. To publish a release:
- Check out the
master
branch -git checkout master
- Merge in
development
changes -git merge development
- Push to github:
git push
Once you push, the release
GitHub workflow will kick in and:
- compile and test the extension
- create javadocs
- push up the built artifact, javadocs, and the logo to S3
- publish the extension to Forgebox
- create a git tag
CREATE a GitHub release with changelog release notes** Currently broken and requires manual creation using theCHANGELOG.md as the release notes
After pushing a stable release:
- Check out
development
branch for further work -git checkout development
- Bump the patch version number so you don't push snapshots on a released version:
box run-script startNextVersion
Every push to development
will create a -snapshot
release on ForgeBox. See snapshot versions on ForgeBox.
To skip pushing a release, add [ci skip]
to your commit message.
We use the following branches for managing releases:
master
- Each push to this branch will trigger a stable release build.development
- Each push to this branch will trigger asnapshot
build.release/x.x
- These are occasionally used for work-in-progress on a new version without affecting the main development-to-master workflow. Each push to this branch will trigger asnapshot
build
General development can be branched at will, but we prefer the following naming structure:
feat/the-new-feature
- Contains work in progress on a new featurepatch/the-bug-in-question
- Contains work in progress on a patch for a known bug or issue
In general, work on a new feature, bug fix, or improvement should be done on a new branch. When the work is ready for releasing, it should be merged or PR-ed to the development
branch, where it will be deployed with the next release.
I highly recommend VS Code for java development. More experienced Java developers may appreciate a java-specific IDE like Intellij. For VS Code Java support, check out:
- Extension Pack for Java - a must for java language support, easy refactoring tools, etc.
- Refactoring Java documentation - Keyboard shortcuts for moving methods, renaming variables, the works.