You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by cd...@apache.org on 2017/11/21 11:51:12 UTC
[32/50] incubator-edgent-samples git commit: tweaks to package-app.sh
tweaks to package-app.sh
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/commit/6c7236ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/tree/6c7236ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/diff/6c7236ff
Branch: refs/heads/develop
Commit: 6c7236ff84529b05ba54c63b01887ebad2a1a7fe
Parents: bba42c2
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Tue Oct 10 17:29:38 2017 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Tue Oct 10 17:29:38 2017 -0400
----------------------------------------------------------------------
package-app.sh | 13 +++++++++----
template/pom.xml | 2 +-
2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/blob/6c7236ff/package-app.sh
----------------------------------------------------------------------
diff --git a/package-app.sh b/package-app.sh
index 75b8ff2..c27edcc 100755
--- a/package-app.sh
+++ b/package-app.sh
@@ -19,11 +19,9 @@
## Create a self contained application specific tar bundle that can be
## brought to a system, unpacked and run.
##
-## Requires that maven (mvn) be installed and on the PATH
-##
## Run from the Application project's top level directory.
-USAGE="usage: `basename $0` [--platform {java8|java7|android}] [--mainClass classname] [--appjar jarname] [--add csv-paths]"
+USAGE="usage: `basename $0` [--platform {java8|java7|android}] [--mainClass classname] [--appjar jarname] [--add csv-paths] [--mvn mvn-cmd]"
## --platform the platform the app was built for (default: java8. options: java7, android)
## This controls which Edgent platform jars are collected.
@@ -35,9 +33,13 @@ USAGE="usage: `basename $0` [--platform {java8|java7|android}] [--mainClass clas
## Works best for paths in/under the App's project dir.
## NOTE: anything in the App's src/main/resources dir generally
## gets included in the App's jar.
+## --mvn mvn-cmd use mvn-cmd instead of "./mvnw"
set -e
+SAMPLES_DIR=`(cd $(dirname $0); pwd)`
+MVN_CMD=${SAMPLES_DIR}/mvnw
+
MAIN_CLASS=com.mycompany.app.App
APP_JAR=my-app-1.0-SNAPSHOT.jar
ADD_PATHS=
@@ -73,7 +75,10 @@ if [ "${PLATFORM}" ] ; then
PROFILES="-Pplatform-${PLATFORM}"
fi
rm -rf target/dependency
-mvn dependency:copy-dependencies -DincludeScope=runtime ${PROFILES}
+# if someone screws up j7 or android deps, uncomment the following and
+# it will help identify wrong jars that are getting included / copied.
+#DEBUG_DEPS=-Dmdep.prependGroupId=true
+${MVN_CMD} dependency:copy-dependencies -DincludeScope=runtime ${PROFILES} ${DEBUG_DEPS}
echo
echo "##### create target/app-run.sh..."
http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/blob/6c7236ff/template/pom.xml
----------------------------------------------------------------------
diff --git a/template/pom.xml b/template/pom.xml
index 5d67cd2..593b958 100644
--- a/template/pom.xml
+++ b/template/pom.xml
@@ -35,7 +35,7 @@
<name>My Edgent Application</name>
<properties>
- <edgent.platform></edgent.platform>
+ <edgent.platform/> <!-- set by -Pplatform-* -->
<edgent.base.groupId>org.apache.edgent${edgent.platform}</edgent.base.groupId>
<edgent.version>1.2.0-SNAPSHOT</edgent.version>