-
Notifications
You must be signed in to change notification settings - Fork 2
Maven AKSW
Adrian Wilke edited this page Nov 6, 2019
·
8 revisions
- Maven repository URL: https://maven.aksw.org/archiva/
- OPAL artifacts: https://maven.aksw.org/archiva/#browse/org.dice-research.opal
An AKSW account is required to deploy artifacts.
Create a master password using mvn --encrypt-master-password.
Add the generated password in ~/.m2/settings-security.xml using the following format:
<settingsSecurity>
<master>{myGeneratedMasterPassword}</master>
</settingsSecurity>
Source: [MVN]
Encrypt your AKSW password using mvn --encrypt-password.
Add your login and encrypted password tp ~/.m2/settings.xml using the following format:
<servers>
<server>
<id>maven.aksw.internal</id>
<username>AkswLogin</username>
<password>{myEnkryptedAkswPassword}</password>
</server>
<server>
<id>maven.aksw.snapshots</id>
<username>AkswLogin</username>
<password>{myEnkryptedAkswPassword}</password>
</server>
</servers>
Source: [MVN],[AKSW]
Add the following information to your pom.xml
<distributionManagement>
<repository>
<id>maven.aksw.internal</id>
<url>http://maven.aksw.org/archiva/repository/internal</url>
</repository>
<snapshotRepository>
<id>maven.aksw.snapshots</id>
<name>AKSW Snapshot Repository</name>
<url>http://maven.aksw.org/archiva/repository/snapshots</url>
</snapshotRepository>
</distributionManagement>
Source: [AKSW]
Use the following script deploy-project.sh to deploy your component:
#!/bin/bash
#check whether all parameters are there
if test $# -ge 1
then
#store the current directory and change to the jar directory
pushd $1
mvn clean package deploy -DaltDeploymentRepository=maven.aksw.internal::default::http://maven.aksw.org/repository/internal $2
#restore the current directory
popd
#check the status of the last command (mvn ...)
if [ $? != 0 ]
then
pause
fi
else
echo "ERROR! Missing arguments. usage: mvn_deploy_cmd <path_to_project_folder> [mvn-arguments]"
fi
Deployment without tests
Use the file deploy-project-without-testing.sh [MR]:
#!/bin/bash
#check whether all parameters are there
if test $# -ge 1
then
./deploy-project.sh $1 -DskipTests
else
echo "ERROR! Missing arguments. usage: mvn_deploy_cmd <path_to_project_folder> [mvn-arguments]"
fi
Source: [MR]
- [AKSW] https://wiki.aksw.org/private/infrastructure/aksw-responsibilities/maven
- [MR] Thanks to Micha
- [MVN] https://maven.apache.org/guides/mini/guide-encryption.html