This repository was archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: sample script for cleanstall and install in Netbeans
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
#################################################################################################################################################### | ||
#################################################################################################################################################### | ||
#### #### | ||
#### This script runs the maven clean install and then moves the jar file and the folder with #### | ||
#### the dependencies to the location where the installed plugins normally reside in the userdir #### | ||
#### of the designer. This means no manual uninstall and install via the plugins window of the designer #### | ||
#### #### | ||
#################################################################################################################################################### | ||
#################################################################################################################################################### | ||
|
||
# name of the jar file to be moved. Example of the git plugin: | ||
# jarFile="de-adito-git-adito-nbm-git.jar" | ||
jarFile="de-adito-git-adito-nbm-git.jar" | ||
# path to the jar file above, from the location of this script. Example of the git plugin (Note that the git plugin builds the nbm in a submodule, | ||
# path probably starts with target/...): | ||
# jarPath="nbm/target/nbm/netbeans/extra/modules/" | ||
jarPath="nbm/target/nbm/netbeans/extra/modules/" | ||
# the path to the folder in which the jar should be moved. Example of the git plugin: | ||
# jarTargetPath="../0.0/workingdir/nbp_userdir/modules/" | ||
jarTargetPath="../0.0/workingdir/nbp_userdir/modules/" | ||
# name of the folder that contains the gathered dependencies of the plugin. These have to be moved as well. Example of the git plugin: | ||
# folderName="de.adito.git.adito-nbm-git/" | ||
folderName="de.adito.git.adito-nbm-git/" | ||
# path to the folder containing the gathered dependencies, as seen from the location of the script. Example of the git plugin: | ||
# folderPath="nbm/target/nbm/netbeans/extra/modules/ext/" | ||
folderPath="nbm/target/nbm/netbeans/extra/modules/ext/" | ||
|
||
if test -z "$jarFile" || test -z "$jarPath" || test -z "$jarTargetPath" || test -z "$folderName" || test -z "$folderPath"; then | ||
echo "Variables for the file paths not set up, aborting the job. Please fill in the variables in the script" | ||
|
||
else | ||
targetPathFolder="ext/" | ||
jarFilePath=$jarPath$jarFile | ||
jarFileTargetPath=$jarTargetPath$jarFile | ||
folderNamePath=$folderPath$folderName | ||
folderTargetPath=$jarTargetPath$targetPathFolder | ||
|
||
JAVA_HOME="/usr/lib/jdk-13.0.2/" mvn clean install -Dmaven.test.skip=true -T 1C -P adito.m2 | ||
|
||
cp $jarFilePath $jarFileTargetPath | ||
if test -d $folderNamePath; then | ||
cp -r $folderNamePath $folderTargetPath | ||
fi | ||
|
||
fi |