-
Notifications
You must be signed in to change notification settings - Fork 2
Maven AKSW
The URL for AKSW Maven repositories is https://maven.aksw.org/archiva/.
To use artifacts hosted there, you have to edit your pom.xml
. For instance, if you want to use version 1.* of OPAL common:
<dependencies>
<dependency>
<groupId>org.dice-research.opal</groupId>
<artifactId>common</artifactId>
<version>[1,2)</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven.aksw.internal</id>
<name>AKSW Repository</name>
<url>http://maven.aksw.org/archiva/repository/internal</url>
</repository>
<repository>
<id>maven.aksw.snapshots</id>
<name>AKSW Snapshot Repository</name>
<url>http://maven.aksw.org/archiva/repository/snapshots</url>
</repository>
</repositories>
An AKSW account is required to deploy artifacts, see [LDAP].
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>{myAkswLogin}</username>
<password>{myEnkryptedAkswPassword}</password>
</server>
<server>
<id>maven.aksw.snapshots</id>
<username>{myAkswLogin}</username>
<password>{myEnkryptedAkswPassword}</password>
</server>
</servers>
Source: [MVN],[AKSW]
Add the following information to your pom.xml
<distributionManagement>
<repository>
<id>maven.aksw.internal</id>
<name>AKSW Repository</name>
<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
- [LDAP] https://wiki.aksw.org/public/new-phds
- [MR] Thanks to Micha
- [MVN] https://maven.apache.org/guides/mini/guide-encryption.html