mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-06 12:23:55 +00:00
keep only one target definition
- target definitions for ide and maven (local and p2admin) were all very similar - only differences between ide and maven: bundle versions, attributes in <location> tags and order of tags - only differences between local and p2admin: once one uses the file:// url for local, then they are exactly the same but for the specific URL - retain only one base target definition (use for normal ide and maven scenario) - introduce a script that can generate the target definition for the local p2 repo
This commit is contained in:
1 parent
76121eb782
commit
56c25c50d7
9 files changed
+46
-722
No files matched your search
@@ -85,7 +85,7 @@ reporting=0
|
||||
suppress_confirmation=0
|
||||
extra=''
|
||||
parallelexecution=0
|
||||
mavenp2admin=0
|
||||
p2local=0
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "buildAndUpdateProduct [-b -u -g -t -a -r -o -c -p -v -m <config> -n <package> -l <port>] [build|install|all|hot-deploy|remote-deploy|local-deploy|release]"
|
||||
@@ -164,7 +164,7 @@ do
|
||||
HAS_OVERWRITTEN_TARGET=1;;
|
||||
w) REMOTE_SERVER_LOGIN=$OPTARG;;
|
||||
u) suppress_confirmation=1;;
|
||||
v) mavenp2admin=1;;
|
||||
v) p2local=1;;
|
||||
\?) echo "Invalid option"
|
||||
exit 4;;
|
||||
esac
|
||||
@@ -541,17 +541,12 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
||||
extra="$extra -Pdebug.no-gwt-compile"
|
||||
fi
|
||||
|
||||
if [ $mavenp2admin -eq 1 ]; then
|
||||
if [ $p2local -eq 1 ]; then
|
||||
echo "INFO: Building and using local p2 repo"
|
||||
(cd com.sap.$PROJECT_TYPE.targetplatform/scripts; ./createLocalBaseP2repositoryLinux.sh)
|
||||
extra="$extra -Dp2admin" # activates the p2-target.maven-p2admin profile in java/pom.xml
|
||||
targetdef=com.sap.$PROJECT_TYPE.targetplatform/definitions/race-analysis-p2-maven-p2admin.target
|
||||
echo "INFO: Patching $targetdef with absolute path to \$PROJECT_HOME"
|
||||
cp -n $targetdef $targetdef.bak
|
||||
cat $targetdef | sed -e "s@file://\$PROJECT_HOME@file://$PROJECT_HOME@" > $targetdef.sed
|
||||
mv $targetdef.sed $targetdef
|
||||
(cd com.sap.$PROJECT_TYPE.targetplatform/scripts; ./createLocalBaseP2repositoryLinux.sh; ./createLocalTargetDef.sh)
|
||||
extra="$extra -Dp2-local" # activates the p2-target.local profile in java/pom.xml
|
||||
else
|
||||
echo "INFO: Using central p2 repo"
|
||||
echo "INFO: Using remote p2 repo (http://p2.sapsailing.com/p2/sailing/)"
|
||||
fi
|
||||
|
||||
# back to root!
|
||||
@@ -637,12 +632,6 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
if [ $mavenp2admin -eq 1 ]; then
|
||||
# And also move back patched target definition
|
||||
echo "INFO: restoring maven p2admin target definition after it was patched before"
|
||||
mv -v $targetdef.bak $targetdef
|
||||
fi
|
||||
|
||||
if [ $MVN_EXIT_CODE -eq 0 ]; then
|
||||
echo "Build complete. Do not forget to install product..."
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user