{"id":14988127,"url":"https://github.com/apache/db-jdo","last_synced_at":"2025-05-12T17:24:15.574Z","repository":{"id":35615398,"uuid":"141723615","full_name":"apache/db-jdo","owner":"apache","description":"Apache JDO project","archived":false,"fork":false,"pushed_at":"2025-04-06T16:55:42.000Z","size":110559,"stargazers_count":32,"open_issues_count":3,"forks_count":21,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-03T09:17:41.538Z","etag":null,"topics":["apache","api","database","db","java","jdo","jpa","jta","nosql","orm"],"latest_commit_sha":null,"homepage":"https://db.apache.org/jdo","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-20T14:42:36.000Z","updated_at":"2025-04-15T00:01:18.000Z","dependencies_parsed_at":"2024-06-04T20:42:46.937Z","dependency_job_id":"dce18339-ef67-45a1-b161-5b7aa0ba59be","html_url":"https://github.com/apache/db-jdo","commit_stats":{"total_commits":1903,"total_committers":20,"mean_commits":95.15,"dds":0.7277982133473463,"last_synced_commit":"6431f93cc7dc2d5252ee89c769ec97f7a2a9afd3"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdb-jdo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdb-jdo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdb-jdo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdb-jdo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/db-jdo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253267564,"owners_count":21881121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","api","database","db","java","jdo","jpa","jta","nosql","orm"],"created_at":"2024-09-24T14:16:07.581Z","updated_at":"2025-05-12T17:24:15.549Z","avatar_url":"https://github.com/apache.png","language":"Java","funding_links":[],"categories":["数据库开发"],"sub_categories":[],"readme":"\u003c!--\n  Licensed to the Apache Software Foundation (ASF) under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  The ASF licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the License at\n\n      https://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  --\u003e\n# Apache JDO\n\nThe Apache JDO project includes the following subprojects:\n\n* [api](https://github.com/apache/db-jdo/tree/main/api) contains source to build `jdo-api-{version}.jar`, which defines the JDO API for Java 1.8 and later.\n* [exectck](https://github.com/apache/db-jdo/tree/main/exectck) contains source to build the maven plugin to run the JDO TCK the Reference Implementation (RI) or an implementation under test (IUT)\n* [tck](https://github.com/apache/db-jdo/tree/main/tck) contains the JDO TCK for Java 1.8 and later.\n* [parent-pom](https://github.com/apache/db-jdo/tree/main/parent-pom) contains the Maven `pom.xml` that ties the projects together.\n* [specification](https://github.com/apache/db-jdo/tree/main/specification) contains the JDO API specification, in OpenDocument format.\n\nApache JDO releases may be downloaded from [the Apache JDO downloads page](http://db.apache.org/jdo/downloads.html).\nMinor updates of releases are only available as source from the GitHub repository.\nFollow the instructions [below](#building-the-jdo-api) to build the API from source.\n\nFor complete rules for certifying a JDO implementation, see [RunRules.html](https://github.com/apache/db-jdo/blob/main/tck/RunRules.html) in the *tck* project directory.\n\nRaise any issues with the content of this project over in [Apache JIRA](https://issues.apache.org/jira/browse/JDO).\n\n\n## Checking Out The Project\n\nYou can check out the source for this project using the `Clone or Download` option above. For example you can type either of the following:\n\n    git clone git@github.com:apache/db-jdo.git\n\nor\n\n    git clone https://github.com/apache/db-jdo.git\n\nwhich will create a folder `db-jdo` with all code in it. You can read up on [GIT here](https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control).\n\n\n## Prerequisites\n\nYou must install the software listed in the following sections to build the API, and successfully run the TCK.\nOther dependencies, such as the reference implementation, [DataNucleus](https://github.com/datanucleus), and the Apache Derby database, are downloaded automatically by Maven.\nNote that Apache JDO uses the Apache Commons Logging package for logging.\n\n### Maven\n\nYou must have Maven (version 2+) to build the projects from source and to execute the TCK. You can download Maven from [here](http://maven.apache.org/download.html).\n\nNote that Maven uses the `user.home` system property for the location of the Maven local repository: `${user.home}/.m2/repository`.\nUnder Windows this system property is `C:\\Documents and Settings\\{user}` no matter what the `HOME` variable is set to. As a workaround you may set the system property by adding `-Duser.home=%HOME%` to the environment variable `MAVEN_OPTS`.\n\n### JNDI Implementation \n\nThe JNDI test cases in *tck* need a JNDI implementation. The TCK is configured to use the TCK's own JNDI mock implementation. To use your own implementation, add the dependencies to the TCK's `.pom` or put the implementation jar files directly into `lib/ext`. Then update `jndi.properties` in the TCK directory `src/conf`.\n\nFor example, to use Oracle's implementation, go [here](http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#7110-jndi-1.2.1-oth-JPR). Accept the license agreement and download *File System Service Provider, 1.2 Beta 3* and then unpack the downloaded zip into `lib/ext`. It includes the jars `fscontext.jar` and `providerutil.jar`. \nThen update the factory class property in `tck/src/main/resources/conf/jndi.properties`: \n`java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory`.\n\n\n## Building from Top Level Project\n\nTo build Apache JDO with all subprojects (api, exectck, tck) go to the root directory of the branch you are working in\n\n    mvn clean install\n\nThis will build the artifacts *jdo-api* and *jdo-exectck* and will then run the TCK.\n\n\n## Building the JDO API\n\nTo build just the API, change to the \"api\" directory of the branch you are working in and run\n\n    mvn clean install\n\nThis will build the *jdo-api* artifact and install it in your local Maven repository.\n\n\n## Running the JDO TCK on an Implementation Under Test\n\nFirstly build from the top level project as described above.\nTo run the JDO TCK on an Implementation Under Test, edit [tck/pom.xml](https://github.com/apache/db-jdo/blob/main/tck/pom.xml) and add the iut dependencies to the profile called *iut*. \nAlso check the following files under [tck/src/main/resources/conf](https://github.com/apache/db-jdo/tree/main/tck/src/main/resources/conf) and change the content to the needs of the Implementation Under Test: `iut-jdoconfig.xml`, `iut-log4j.properties`, `iut-persistence.xml` and `iut-pmf.properties`.\n\nChange to the \"tck\" directory of the branch you are working in and run\n\n    mvn -Djdo.tck.impl=\"iut\" clean install\n\nand this will run the TCK (via the \"jdo-exectck\" plugin) on the Implementation Under Test on all supported databases and identity types.\n\nThe *jdo-exectck* Maven plugin (built from the *exectck* directory) has various options so you can run other implementations or only run particular tests.\n\n\n### Custom Goals\n\nThe *jdo-exectck* Maven plugin has the following custom goals\n\n* *help* : Displays help text describing custom goals and options\n* *installSchema* : Installs the database schema\n* *enhance* : enhances the test classes being used\n* *runtck* : Runs the TCK\n\n\n### Command Line Options\n\nThe *jdo-exectck* Maven plugin has the following options\n\n* -Djdo.tck.impl : either *jdori* (reference implementation) or *iut* (implementation under test).\n* -Djdo.tck.cfglist : Overrides the definition of jdo.tck.cfglist found in tck/src/conf/configuration.list by supplying one or more comma-separated test configuration files. Test configuration files typically have the .conf extension. To run a single test, create a .conf file (copy an existing file) and put the test into the jdo.tck.classes property.\n* -Djdo.tck.dblist : Overrides the property value in project.properties by supplying one or more comma-separated database names. Currently only derby is supported.\n* -Djdo.tck.identitytypes : Overrides the identity types to be run, supplying one or more comma-separated identity types (*applicationidentity* or *datastoreidentity*) to use for this run.\n* -Djdo.tck.impl.logfile : Location of implementation log file. Default: `${user.dir}/datanucleus.txt`\n* -Djdo.tck.doInstallSchema : Setting this parameter to *false* will bypass schema installation.\n* -Djdo.tck.doEnhance : Setting this parameter to false will bypass enhancement.\n* -Djdo.tck.doRunTCK : Setting this parameter to false will bypass running the TCK.\n* -Djdo.tck.runTCKVerbose : Setting this parameter to *true* will display test progress and error output while the TCK is running.\n* -Djdo.tck.onFailure : Specifies how test failures are treated. *failFast* will immediately abort the test run. *failGoal* (default) will execute the whole TCK before failing. *logOnly* will report failures to console and logs only but return 'SUCCESS' to the Maven execution environment.\n\n\n### Examples\n\nExample 1 : Installs the database schema for datastore identity for all supported databases.\n\n    mvn -Djdo.tck.identitytypes=datastoreidentity jdo-exectck:installSchema\n\n\nExample 2 : Runs the test configurations specified in `alltests.conf` and `cfg1.conf` on the JDORI, using all supported identity types and databases.\n\n    mvn -Djdo.tck.cfglist=\"alltests.conf cfg1.conf\" jdo-exectck:runtck\n\n\n\n### Files\n\nWhile running the TCK, maven uses the following configuration files in src/conf:\n\n* configurations.list  : A list of files. Each file listed is a test configuration file.\n* test configuration files (*.conf). Each of these files sets values for\n    * jdo.tck.testdescription : An optional string describing the purpose of these tests\n    * jdo.tck.classes : A list of one or more test classes (required)\n    * jdo.tck.testdata : The fully qualified file name of the xml test data file(optional)\n    * jdo.tck.standarddata : The fully qualified file name of the xml test data file(optional)\n    * jdo.tck.mapping : The file designator that maven.xml uses to build a javax.jdo.option.Mapping value and corresponding schema name (required)\n* exclude.list  : A list of test classes NOT to execute during a TCK test run\n\n### Warnings\n\nThere is a profile called `warnings` that configures the maven-compiler-plugin to show compiler warnings and passes \n`-Xlint:all,-try,-rawtypes` as argument to javac. Activate the warnings profile to enable compiler warnings. \nPlease note, the tck enables the profile `jdori` per default and this default is disabled when specifying the profile \n`warnings`. So if you want to run the tck with the jdori with warnings enabled please use the following:\n\n    mvn -Pwarnings,jdori clean install\n\nYou can pass different compiler arguments using the `-D` option:\n\n    mvn -Pwarnings,jdori -DcompilerArgument=-Xlint:all clean install\n\n### Formatting\n\nThe JDO project uses the google-java-format for checking and reformatting the Java code to comply with \nGoogle Java Style [Google Java Style](https://google.github.io/styleguide/javaguide.html). \n\nThe code is formatted using the [Google Java Format](https://github.com/google/google-java-format) tool.\nThe formatter can be run in the command line or can be integrated into IntelliJ or Eclipse as a plugin.\nMore information on this is given in the [GJF README](https://github.com/google/google-java-format#using-the-formatter).\n\n#### Formatting using Maven\n\nThere are two profiles to support code formatting using the maven fmt-maven-plugin.\n\n* `verify-format` checks the formatting of the project's Java files. It prints the list of the files that are not compliant.\n\n        mvn -Pverify-format clean compile\n\n* `format` reformats the project's Java files.\n\n        mvn -Pformat clean compile\n\n#### GitHub Action Integration\n\nThe formatting of the code is checked automatically through the GitHub actions for every PR and/or push on master.\n\n### SBOM Support\n\nIn order to create SBOM files using the cyclonedx-maven-plugin and the spdx-maven-plugin please call\n\n    mvn clean cyclonedx:makeBom spdx:createSPDX\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fdb-jdo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fdb-jdo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fdb-jdo/lists"}