argo-client-java
argo-client-java copied to clipboard
Issue installing locally
Hello, I get the following error when trying to install the client to a local project:
Could not resolve dependencies for project com.udit:crudapp:jar:0.0.1-SNAPSHOT: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact io.argoproj.workflow:argo-client-java:jar:v3.0.1 has not been downloaded from it before.
The Maven central package seems to not have been updated - so I tried installing it locally, but I keep getting this error despite this. Any help?
One could try to pull the packages from the github, argo-client-java directly. For this to work, we would need to configure the ./m2/settings.xml file. Insert the appropriate GH_USER_ID --> github id, and GH_TOKEN(can be generated from --> profile settings-> Developer settings -> Personal access tokens, and enabling read-packages flag)
<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">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/argoproj-labs/argo-client-java</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>GH_USER_ID</username>
<password>GH_TOKEN</password>
</server>
</servers>
</settings>
Than in the project's pom.xml one could specify with a profile github:
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/argoproj-labs/argo-client-java</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
</profile>
</profiles>
than try:
mvn install