You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2023/02/16 07:10:41 UTC
[causeway] branch master updated: minor enhancement to build.sh, -d flag for mvnd
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/master by this push:
new bb172fba26 minor enhancement to build.sh, -d flag for mvnd
bb172fba26 is described below
commit bb172fba26facc02ef9c2883ab72567685336f56
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 16 07:10:37 2023 +0000
minor enhancement to build.sh, -d flag for mvnd
---
.../causeway/applib/annotation/DomainObject.java | 17 ++++++
build.sh | 60 +++++++++++++---------
2 files changed, 53 insertions(+), 24 deletions(-)
diff --git a/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainObject.java b/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainObject.java
index 1c1f441a45..5f9100029f 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainObject.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainObject.java
@@ -173,6 +173,12 @@ public @interface DomainObject {
* Typical examples are "act", "prop", "coll", "exec", "execute", "invoke",
* "apply" and so on. The default name is `$$`.
* </p>
+ *
+ * <p>
+ * <b>NOTE</b>: it's more typical to instead use {@link Action}, {@link Property} or {@link Collection} as the
+ * class-level annotation, indicating that the domain object is a mixin. The mixin method name for these is,
+ * respectively, "act", "prop" and "coll".
+ * </p>
*/
String mixinMethod()
default "$$";
@@ -180,6 +186,17 @@ public @interface DomainObject {
/**
* The nature of this domain object.
*
+ * <p>
+ * Most common are natures of {@link Nature#ENTITY} and {@link Nature#VIEW_MODEL}. For mixins, rather than
+ * use a nature of {@link Nature#MIXIN}, it's more typical to instead use {@link Action}, {@link Property} or
+ * {@link Collection} as the class-level annotation, indicating that the domain object is a mixin.
+ * The {@link #mixinMethod() mixin method name} for these is, respectively, "act", "prop" and "coll".
+ * </p>
+ *
+ * <p>
+ * The {@link Nature#BEAN} nature is for internally use, and should not normally be specified explicitly.
+ * </p>
+ *
* @see DomainService#nature()
*/
Nature nature()
diff --git a/build.sh b/build.sh
index 14c3e75649..3638cf7e53 100644
--- a/build.sh
+++ b/build.sh
@@ -54,6 +54,7 @@ usage() {
echo " -a append '-Dmodule-all'. Cannot combine with '-I' or '-K'" >&2
echo " -K append '-Dmodule-all-except-kroviz'. Cannot combine with '-a' or '-I'" >&2
echo " -I append '-Dmodule-all-except-incubator'. Cannot combine with '-a' or '-K'" >&2
+ echo " -d use mvnd rather than mvn (requires: mvndaemon)" >&2
echo " -F do NOT search for Failures and Errors at the end" >&2
echo " -S do NOT print summary or last 50 lines at the end" >&2
echo " -w whatif - don't run the command but do print it out. Implies -v (verbose)" >&2
@@ -63,6 +64,7 @@ usage() {
echo "" >&2
echo "example usage:" >&2
echo "" >&2
+ echo "sh build.sh -ptOdI # pull, no tests, no offline, use mvnd, no incubator" >&2
echo "sh build.sh -pctOvI # pull, clean, no tests, no offline, verbose, no incubator" >&2
echo "" >&2
}
@@ -76,17 +78,19 @@ PACKAGE_ONLY=false
VERIFY_ONLY=false
WHATIF=false
SINGLE_THREADED=false
-SKIP_SEARCH_FOR_FAILURES=false
-SKIP_SUMMARY=false
ALL=false
ALL_EXCEPT_KROVIZ=false
ALL_EXCEPT_INCUBATOR=false
+TIMELINE=false
+USE_MVND=false
+SKIP_SEARCH_FOR_FAILURES=false
+SKIP_SUMMARY=false
EDIT=false
VERBOSE=false
MVN_LOG=/tmp/$BASENAME_0.$$.log
-while getopts 'prcntlkyaIKOFSwveh' opt
+while getopts 'prcntlkyaIKOdFSwveh' opt
do
case $opt in
p) export GIT_PULL=true ;;
@@ -100,6 +104,7 @@ do
a) export ALL=true ;;
I) export ALL_EXCEPT_INCUBATOR=true ;;
K) export ALL_EXCEPT_KROVIZ=true ;;
+ d) export USE_MVND=true ;;
F) export SKIP_SEARCH_FOR_FAILURES=true ;;
S) export SKIP_SUMMARY=true ;;
w) export WHATIF=true ;;
@@ -120,21 +125,22 @@ shift $((OPTIND-1))
echo ""
if [ "$VERBOSE" = "true" ]; then
- echo "-p GIT_PULL : $GIT_PULL"
- echo "-c CLEAN : $CLEAN"
- echo "-t SKIP_TESTS : $SKIP_TESTS"
- echo "-n TIMELINE : $TIMELINE"
- echo "-l SINGLE_THREADED : $SINGLE_THREADED"
- echo "-k PACKAGE_ONLY : $PACKAGE_ONLY"
- echo "-y VERIFY_ONLY : $VERIFY_ONLY"
- echo "-O SKIP_OFFLINE : $SKIP_OFFLINE"
- echo "-a ALL : $ALL"
- echo "-I ALL_EXCEPT_INCUBATOR : $ALL_EXCEPT_INCUBATOR"
- echo "-K ALL_EXCEPT_KROVIZ : $ALL_EXCEPT_KROVIZ"
- echo "-F SKIP_SEARCH_FOR_FAILURES : $SKIP_SEARCH_FOR_FAILURES"
- echo "-S SKIP_SUMMARY : $SKIP_SUMMARY"
- echo "-w WHATIF : $WHATIF"
- echo "-v VERBOSE : $VERBOSE"
+ echo "-p (git pull --ff-only) : $GIT_PULL"
+ echo "-c mvn clean : $CLEAN"
+ echo "-t skip all tests (mvn -DskipTests) : $SKIP_TESTS"
+ echo "-O not mvn --offline : $SKIP_OFFLINE"
+ echo "-l not mvn -T1C : $SINGLE_THREADED"
+ echo "-k mvn package : $PACKAGE_ONLY"
+ echo "-y mvn verify : $VERIFY_ONLY"
+ echo "-a include ALL modules : $ALL"
+ echo "-I include all modules except incubator : $ALL_EXCEPT_INCUBATOR"
+ echo "-K include all modules except kroviz : $ALL_EXCEPT_KROVIZ"
+ echo "-n serve up timeline : $TIMELINE"
+ echo "-d use mvnd rather than mvn : $USE_MVND"
+ echo "-F skip search for failures : $SKIP_SEARCH_FOR_FAILURES"
+ echo "-S skip summary : $SKIP_SUMMARY"
+ echo "-w what-if : $WHATIF"
+ echo "-v verbose : $VERBOSE"
echo ""
fi
@@ -213,6 +219,12 @@ else
fi
fi
+if [ "$USE_MVND" = "true" ]; then
+ CMD="mvnd"
+else
+ CMD="mvn"
+fi
+
if [ "$WHATIF" = "true" ]; then
if [ "$GIT_PULL" = "true" ]; then
@@ -220,10 +232,10 @@ if [ "$WHATIF" = "true" ]; then
fi
if [ "$VERBOSE" = "true" ]; then
- echo "mvn $OPTS $* 2>&1 | tee $MVN_LOG "
+ echo "$CMD $OPTS $* 2>&1 | tee $MVN_LOG "
else
OPTS="$OPTS --log-file $MVN_LOG"
- echo mvn $OPTS "$@"
+ echo $CMD $OPTS "$@"
fi
@@ -248,12 +260,12 @@ else
fi
if [ "$VERBOSE" = "true" ]; then
- echo "mvn $OPTS $* 2>&1 | tee $MVN_LOG"
- mvn $OPTS "$@" 2>&1 | tee $MVN_LOG
+ echo "$CMD $OPTS $* 2>&1 | tee $MVN_LOG"
+ $CMD $OPTS "$@" 2>&1 | tee $MVN_LOG
else
OPTS="$OPTS --log-file $MVN_LOG"
- echo "mvn $OPTS $*"
- mvn $OPTS "$@"
+ echo "$CMD $OPTS $*"
+ $CMD $OPTS "$@"
fi
if [ "$SKIP_SEARCH_FOR_FAILURES" = "false" ]; then