Build with Command Line Interface
(All this information is based on what the CI does)
Build
MAVEN_CLI_OPTS="--batch-mode"
MAVEN_OPTS="-Dmaven.repo.local=.m2/repository"
./mvnw $MAVEN_CLI_OPTS validate
./mvnw $MAVEN_CLI_OPTS clean
./mvnw $MAVEN_CLI_OPTS install -Dmaven.test.skip=true
./mvnw $MAVEN_CLI_OPTS test
mkdir -p \
~/var/log/asqatasun/webapp/ \
~/var/log/asqatasun/server/
You may build and skip the dependency-check task (which looks for known CVEs and takes some time) this way:
./mvnw $MAVEN_CLI_OPTS install -Dmaven.test.skip=true -Ddependency-check.skip=true
Run webapp
Launch webapp:
ASQATASUN_RELEASE="6.0.0-SNAPSHOT"
DB_PORT="3307"
DB_HOST="localhost"
DB_DRIVER="mariadb"
DB_DATABASE="asqatasun"
DB_USER="asqatasunDatabaseUserLogin"
DB_PASSWORD="asqatasunDatabaseUserP4ssword"
APP_LOG_DIR="${HOME}/var/log/asqatasun/webapp"
WAR_FILE="${HOME}/Asqatasun/web-app/asqatasun-web-app/target/asqatasun-web-app-${ASQATASUN_RELEASE}.war"
/usr/bin/java \
-Dwebdriver.firefox.bin=/opt/firefox/firefox \
-Dwebdriver.gecko.driver=/opt/geckodriver \
-Dapp.logging.path="${APP_LOG_DIR}" \
-Djdbc.url="jdbc:${DB_DRIVER}://${DB_HOST}:${DB_PORT}/${DB_DATABASE}" \
-Djdbc.user="${DB_USER}" \
-Djdbc.password="${DB_PASSWORD}" \
-jar "${WAR_FILE}"
Use webapp
Browse http://localhost:8080/ and connect with credentials:
- login:
admin@asqatasun.org
- password:
myAsqaPassword
Run server
ASQATASUN_RELEASE="6.0.0-SNAPSHOT"
DB_PORT="3307"
DB_HOST="localhost"
DB_DRIVER="mariadb"
DB_DATABASE="asqatasun"
DB_USER="asqatasunDatabaseUserLogin"
DB_PASSWORD="asqatasunDatabaseUserP4ssword"
APP_LOG_DIR="${HOME}/var/log/asqatasun/server"
JAR_FILE="${HOME}/Asqatasun/server/asqatasun-server/target/asqatasun-server-${ASQATASUN_RELEASE}.jar"
/usr/bin/java \
-Dwebdriver.firefox.bin=/opt/firefox/firefox \
-Dwebdriver.gecko.driver=/opt/geckodriver \
-Dapp.logging.path="${APP_LOG_DIR}" \
-Djdbc.url="jdbc:${DB_DRIVER}://${DB_HOST}:${DB_PORT}/${DB_DATABASE}" \
-Djdbc.user="${DB_USER}" \
-Djdbc.password="${DB_PASSWORD}" \
-jar "${JAR_FILE}"
Use server
You may leverage Swagger UI by browsing http://localhost:8080/ and connect with credentials:
- login:
admin@asqatasun.org
- password:
myAsqaPassword
You can also a plain old curl request:
ASQA_USER="admin%40asqatasun.org" 7 ↵ ✹ 693-enhance-logs-configuration
ASQA_PASSWORD="myAsqaPassword"
API_PREFIX_URL="http://${ASQA_USER}:${ASQA_PASSWORD}@localhost:8080"
API_URL="${API_PREFIX_URL}/api/v0/audit/page/run"
PROJECT_ID="1"
REFERENTIAL="RGAA_4_0"
LEVEL="AA"
URL_TO_AUDIT="https://www.wikidata.org/"
curl -X POST \
"${API_URL}" \
-H "accept: */*" \
-H "Content-Type: application/json" \
-d "{ \
\"urls\": [ \"${URL_TO_AUDIT}\" ], \
\"referential\": \"${REFERENTIAL}\", \
\"level\": \"${LEVEL}\", \
\"contractId\": ${PROJECT_ID}, \
\"tags\": [] \
}"
You may also leverage the PHP API client.
Stop service (webapp or server)
Just type CTRL-C
on the console.