Add a script to install and run the app.

(some missing dependencies will be deployed on a public repo soon)
This commit is contained in:
Lampros Smyrnaios 2022-11-16 16:20:58 +02:00
parent e99f334708
commit 83f9ce36ce
3 changed files with 83 additions and 14 deletions

26
installAndRun.sh Executable file
View File

@ -0,0 +1,26 @@
cd "${0%/*}" || (echo "Could not change-dir to this script's dir!" && exit) # Change the working directory to the script's directory, when running from other location.
justRun=0
if [[ $# -eq 1 ]]; then
justRun=$1
elif [[ $# -gt 1 ]]; then
echo -e "Wrong number of arguments given: ${#}\nPlease execute it like: script.sh <justInstall: 0 | 1>"; exit 1
fi
if [[ justRun -eq 0 ]]; then
if [ ! -d ~/.m2/repository-dnet45/ ]; then
mkdir ~/.m2/repository-dnet45/ || (echo -e "The directory \"~/.m2/repository-dnet45/\" could not be created! Exiting.." && exit 2)
fi
if [ ! -f ~/.m2/repository-dnet45/settings-dnet45.xml ]; then
cp ./settings-dnet45.xml ~/.m2/repository-dnet45/ || (echo -e "The file \"settings-dnet45.xml\" could not be copied in directory \"~/.m2/repository-dnet45\"! Exiting.." && exit 3)
fi
else
if [ ! -f ~/.m2/repository-dnet45/settings-dnet45.xml ]; then
echo -e "The file \"~/.m2/repository-dnet45/settings-dnet45.xml\" does not exist! Exiting.." && exit 4
fi
fi
mvn clean install -s ~/.m2/repository-dnet45/settings-dnet45.xml

43
settings-dnet45.xml Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>${env.HOME}/.m2/repository-dnet45</localRepository>
<pluginGroups>
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>dnet4.0</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>dnet45-bootstrap-snapshot</id>
<name>D-Net 45 Bootstrap Snapshot</name>
<url>https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-bootstrap-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<layout>default</layout>
</repository>
<repository>
<id>dnet45-bootstrap-release</id>
<name>D-Net 45 Bootstrap Release</name>
<url>https://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-bootstrap-release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<layout>default</layout>
</repository>
</repositories>
</profile>
</profiles>
</settings>

View File

@ -4,29 +4,29 @@ services:
baseURL: https://aai.openaire.eu
oidc:
domain: .openaire.eu
id: 767422b9-5461-4807-a80a-f9a2072d3a7d
id: XX
issuer: ${services.provide.aai.baseURL}/oidc/
redirectURL: http://88.197.53.69/api/openid_connect_login
secret: AMQtGlbTXNjwjhF0st28LmM6V0XypMdaVS7tJmGuYFlmH36iIv4t7tVqYuLYrNPkhnZ_GPUJvhymBhFupdgb6aU
secret: XX
webURL: http://88.197.53.69/join
registry:
coid: 2
password: u8WfYv2R^f#y7G98
coid: XX
password: XX
production: false
url: ${services.provide.aai.baseURL}/registry/
username: provide_openaire
adminEmail: antleb@di.uoa.gr
adminEmail: XX
analyticsURL: https://analytics.openaire.eu/addsite.php?
baseUrl: https://beta.provide.openaire.eu/
broker:
api: api/
openaire: openaireBroker
port: 8080
url: http://broker1-dev-dnet.d4science.org
url: https://broker1-dev-dnet.d4science.org
clients:
dsm: http://beta.services.openaire.eu/openaire
dsm: https://beta.services.openaire.eu/openaire
search: https://beta.services.openaire.eu/search/v2/api
usageEvents: http://beta.lbs.openaire.eu:8080/ajax/summary
usageEvents: https://beta.lbs.openaire.eu:8080/ajax/summary
usagestats: https://services.openaire.eu/usagestats
db:
driverClassName: org.postgresql.Driver
@ -38,13 +38,13 @@ services:
mail:
authenticate: true
debug: false
from: test.openaire@gmail.com
from: XX
host: smtp.gmail.com
mode: ssl
password: ^($*@$)*!$
password: XX
port: 465
replyTo: test.openaire@gmail.com
username: test.openaire@gmail.com
replyTo: XX
username: XX
redis:
host: localhost
password: 2106875370
@ -54,8 +54,8 @@ services:
usageStatisticsDiagramsBaseURL: https://beta.openaire.eu/stats3/
usageStatisticsNumbersBaseURL: https://beta.services.openaire.eu/usagestats/datasources/
usagestats:
adminEmail: antleb@di.uoa.gr
sushiliteEndpoint: http://beta.services.openaire.eu/usagestats/sushilite/
adminEmail: XX
sushiliteEndpoint: https://beta.services.openaire.eu/usagestats/sushilite/
validator:
results:
url: https://beta.provide.openaire.eu/compatibility/browseHistory/