This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch v3-jdo in repository https://gitbox.apache.org/repos/asf/causeway-app-simpleapp.git
commit 0c8b50df497fc9e84370e491a5c6b92e7815ced9 Merge: 7d5796c 1496462 Author: Dan Haywood <[email protected]> AuthorDate: Thu Nov 13 06:54:50 2025 +0000 Merge branch 'v3-jpa' into v3-jdo .run/SimpleApp (jdo).run.xml | 11 +++--- ...ts in simpleapp-jdo-module-simple-tests.run.xml | 13 ------- ...pleapp-jdo [datanucleus_enhance,-pl...].run.xml | 34 ++++++++++++++++++ README.adoc | 40 ++-------------------- build.sh | 1 + module-simple-tests/pom.xml | 2 +- module-simple/pom.xml | 2 +- pom.xml | 18 +++------- run.sh | 1 + serve-timeline.sh | 38 -------------------- update-to-latest-nightly.sh | 15 -------- webapp-tests/pom.xml | 2 +- webapp/pom.xml | 4 +-- 13 files changed, 51 insertions(+), 130 deletions(-) diff --cc .run/SimpleApp (jdo).run.xml index dac4f2b,5bfd535..6a57902 --- a/.run/SimpleApp (jdo).run.xml +++ b/.run/SimpleApp (jdo).run.xml @@@ -1,13 -1,12 +1,10 @@@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="simpleapp (jdo)" type="Application" factoryName="Application"> - <option name="ALTERNATIVE_JRE_PATH" value="zulu-11" /> - <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" /> - <option name="MAIN_CLASS_NAME" value="domainapp.webapp.SimpleApp" /> - <module name="simpleapp-jdo-webapp" /> - <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" /> - <configuration default="false" name="SimpleApp (jpa)" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot"> ++ <configuration default="false" name="SimpleApp (jdo)" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot"> + <module name="simpleapp-jpa-webapp" /> - <option name="SHORTEN_COMMAND_LINE" value="ARGS_FILE" /> + <option name="SPRING_BOOT_MAIN_CLASS" value="domainapp.webapp.SimpleApp" /> - <option name="WORKING_DIRECTORY" value="file://$MODULE_WORKING_DIR$" /> <method v="2"> <option name="Make" enabled="true" /> - <option name="RunConfigurationTask" enabled="true" run_configuration_name="simpleapp-jdo [enhance]" run_configuration_type="MavenRunConfiguration" /> - <option name="RunConfigurationTask" enabled="true" run_configuration_name="simpleapp-jpa-module-simple [eclipselink:weave]" run_configuration_type="MavenRunConfiguration" /> ++ <option name="RunConfigurationTask" enabled="true" run_configuration_name="simpleapp-jdo-module-simple [datanucleus:enhance]" run_configuration_type="MavenRunConfiguration" /> </method> </configuration> </component> diff --cc .run/simpleapp-jdo [datanucleus_enhance,-pl...].run.xml index 0000000,aa6f211..7dba344 mode 000000,100644..100644 --- a/.run/simpleapp-jdo [datanucleus_enhance,-pl...].run.xml +++ b/.run/simpleapp-jdo [datanucleus_enhance,-pl...].run.xml @@@ -1,0 -1,32 +1,34 @@@ + <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="simpleapp-jpa-module-simple [eclipselink:weave]" type="MavenRunConfiguration" factoryName="Maven" nameIsGenerated="true"> ++ <configuration default="false" name="simpleapp-jdo [datanucleus:enhance,-pl...]" type="MavenRunConfiguration" factoryName="Maven" nameIsGenerated="true"> + <MavenSettings> + <option name="myGeneralSettings" /> + <option name="myRunnerSettings" /> + <option name="myRunnerParameters"> + <MavenRunnerParameters> + <option name="cmdOptions" /> + <option name="profiles"> + <set /> + </option> + <option name="goals"> + <list> - <option value="eclipselink:weave" /> ++ <option value="datanucleus:enhance" /> ++ <option value="-pl" /> ++ <option value="module-simple" /> + </list> + </option> + <option name="multimoduleDir" /> + <option name="pomFileName" /> + <option name="profilesMap"> + <map /> + </option> + <option name="projectsCmdOptionValues"> + <list /> + </option> + <option name="resolveToWorkspace" value="false" /> - <option name="workingDirPath" value="$PROJECT_DIR$/module-simple" /> ++ <option name="workingDirPath" value="$PROJECT_DIR$" /> + </MavenRunnerParameters> + </option> + </MavenSettings> + <method v="2" /> + </configuration> + </component> diff --cc README.adoc index 3e9c8fe,966d6d0..9a96474 --- a/README.adoc +++ b/README.adoc @@@ -130,46 -118,6 +118,22 @@@ The `pom.xml` also provides goals to ru It's more common for tests to reside within the same module, but we moved them into their own Maven modules because it makes them easier to be temporarily excluded, eg during initial explorations/prototyping. +[#orm-support] +== ORM Support + - //This version of the application uses EclipseLink JPA as its ORM, configured with load-time weaving. - //This requires that the application be run with a Java agent. - // - //The spring-boot plugin is configured to run with this agent already. - //If you want to run from an IDE: - // - //* first, you might wish to copy the file locally: - //+ - //[source,bash] - //---- - //cp ~/.m2/repository/org/springframework/spring-instrument/XXX/spring-instrument-XXX.jar lib/spring-instrument.jar - //---- - //+ - //Change "XXX" to the value that `${spring-framework.version}` resolves to in the webapp `pom.xml` - // - //* Then specify the agent as a VM option: - //+ - //[source,bash] - //---- - //-javaagent:lib/spring-instrument.jar - //---- - - - +This version of the application uses DataNucleus as its ORM, which requires that any entities are "enhanced", a post-compile process. + +Normally this is done as part of a "mvn clean install", but the entities can also be enhanced explicity using: + +[source,bash] +---- +mvn -pl module-simple datanucleus:enhance -o +---- + +This is useful to know if the application or integration test fails to bootstrap, complaining of "unenhanced entities". + +TIP: You can also use `enhance-all.sh` + == Testing diff --cc module-simple-tests/pom.xml index 76a3d7b,bea2d3b..844819c --- a/module-simple-tests/pom.xml +++ b/module-simple-tests/pom.xml @@@ -5,13 -5,13 +5,13 @@@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>simpleapp-jpa</artifactId> + <artifactId>simpleapp-jdo</artifactId> <groupId>org.apache.causeway.starters</groupId> - <version>3.4.0</version> + <version>3.5.0</version> </parent> - <artifactId>simpleapp-jpa-module-simple-tests</artifactId> - <name>SimpleApp (JPA) - Simple Module (tests)</name> + <artifactId>simpleapp-jdo-module-simple-tests</artifactId> + <name>SimpleApp (JDO) - Simple Module (tests)</name> <description> Integ tests for 'simple module' diff --cc module-simple/pom.xml index 5938272,3422328..cd8f37d --- a/module-simple/pom.xml +++ b/module-simple/pom.xml @@@ -5,13 -5,13 +5,13 @@@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>simpleapp-jpa</artifactId> + <artifactId>simpleapp-jdo</artifactId> <groupId>org.apache.causeway.starters</groupId> - <version>3.4.0</version> + <version>3.5.0</version> </parent> - <artifactId>simpleapp-jpa-module-simple</artifactId> - <name>SimpleApp (JPA) - Simple Module</name> + <artifactId>simpleapp-jdo-module-simple</artifactId> + <name>SimpleApp (JDO) - Simple Module</name> <build> <resources> diff --cc pom.xml index 5e0a3a1,e4c949f..32e803b --- a/pom.xml +++ b/pom.xml @@@ -10,11 -10,11 +10,11 @@@ <relativePath/> </parent> - <artifactId>simpleapp-jpa</artifactId> + <artifactId>simpleapp-jdo</artifactId> <groupId>org.apache.causeway.starters</groupId> - <version>3.4.0</version> + <version>3.5.0</version> - <name>SimpleApp (JPA) - Parent</name> + <name>SimpleApp (JDO) - Parent</name> <packaging>pom</packaging> diff --cc webapp-tests/pom.xml index 39f0700,c216d5c..07985bc --- a/webapp-tests/pom.xml +++ b/webapp-tests/pom.xml @@@ -3,13 -3,13 +3,13 @@@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>simpleapp-jpa</artifactId> + <artifactId>simpleapp-jdo</artifactId> <groupId>org.apache.causeway.starters</groupId> - <version>3.4.0</version> + <version>3.5.0</version> </parent> - <artifactId>simpleapp-jpa-webapp-tests</artifactId> - <name>SimpleApp (JPA) - Webapp (tests)</name> + <artifactId>simpleapp-jdo-webapp-tests</artifactId> + <name>SimpleApp (JDO) - Webapp (tests)</name> <description> Integ tests for entire app. diff --cc webapp/pom.xml index 348be05,70f905c..1748760 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@@ -4,13 -4,13 +4,13 @@@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>simpleapp-jpa</artifactId> + <artifactId>simpleapp-jdo</artifactId> <groupId>org.apache.causeway.starters</groupId> - <version>3.4.0</version> + <version>3.5.0</version> </parent> - <artifactId>simpleapp-jpa-webapp</artifactId> - <name>SimpleApp (JPA) - Webapp</name> + <artifactId>simpleapp-jdo-webapp</artifactId> + <name>SimpleApp (JDO) - Webapp</name> <description> Assembles and runs the Wicket viewer, the Restfulobjects viewer and the GraphQL viewer
