@@ -42,7 +42,7 @@ To do so from the source using Maven, following the setup steps below:
4242
4343``` xml
4444 <dependency >
45- <groupId >net .conjur.api</groupId >
45+ <groupId >com.cyberark .conjur.api</groupId >
4646 <artifactId >conjur-api</artifactId >
4747 <version >2.2.0</version >
4848 <dependency >
@@ -95,12 +95,76 @@ our [Contributing](https://github.com/cyberark/conjur-api-java/blob/master/CONTR
9595 or
9696 ```sh-session
9797 $ mvn install: install-file -Dfile=/path/to/api/repo/target/conjur-api-$VERSION-with-dependencies.jar \
98- -DgroupId=net .conjur.api \
98+ -DgroupId=com.cyberark .conjur.api \
9999 -DartifactId=conjur-api \
100100 -Dversion=$VERSION \
101101 -Dpackaging=jar
102102 ```
103103
104+ ### Using Maven Releases
105+
106+ To make use of tagged releases published to Maven, verify that you have the dependency
107+ added to your ` pom.xml `
108+
109+ 1 . Add the following snippet to ` pom.xml `
110+ ``` xml
111+ <dependency >
112+ <groupId >com.cyberark.conjur.api</groupId >
113+ <artifactId >conjur-java-api</artifactId >
114+ <version >x.x.x</version >
115+ </dependency >
116+ ```
117+
118+ ### Using Maven Snapshots
119+ To make use of SNAPSHOTS, which are deployed following a nightly build, there are
120+ several steps required for configuring your project.
121+
122+ > Note: Snapshots contain the latest changes to ` conjur-java-api ` , but it is recommended
123+ > to use the current stable release unless there is a significant update required by your
124+ > project
125+
126+ 1 . Add the following to your ` settings.xml `
127+ ``` xml
128+ <profiles >
129+ <profile >
130+ <id >allow-snapshots</id >
131+ <activation ><activeByDefault >true</activeByDefault ></activation >
132+ <repositories >
133+ <repository >
134+ <id >snapshots-repo</id >
135+ <url >https://oss.sonatype.org/content/repositories/snapshots</url >
136+ <releases ><enabled >false</enabled ></releases >
137+ <snapshots ><enabled >true</enabled ></snapshots >
138+ </repository >
139+ </repositories >
140+ </profile >
141+ </profiles >
142+ ```
143+
144+ Alternatively, add the following to your list of repositories in ` pom.xml `
145+ ``` xml
146+ <repository >
147+ <id >oss.sonatype.org-snapshot</id >
148+ <url >http://oss.sonatype.org/content/repositories/snapshots</url >
149+ <releases >
150+ <enabled >false</enabled >
151+ </releases >
152+ <snapshots >
153+ <enabled >true</enabled >
154+ </snapshots >
155+ </repository >
156+ ```
157+
158+ 2 . In your ` pom.xml ` , verify that your ` conjur-java-api ` dependency includes ` SNAPSHOT `
159+ in the version tag.
160+ ``` xml
161+ <dependency >
162+ <groupId >com.cyberark.conjur.api</groupId >
163+ <artifactId >conjur-java-api</artifactId >
164+ <version >x.x.x-SNAPSHOT</version >
165+ </dependency >
166+ ```
167+
104168## Configuration
105169
106170Once the setup steps have been successfully run, we will now define the variables needed
@@ -317,7 +381,7 @@ export CONJUR_AUTHN_LOGIN=<user/host identity>
317381export CONJUR_AUTHN_API_KEY=< user/host API key or password - see notes about ` CONJUR_AUTHN_URL` >
318382```
319383``` java
320- import net .conjur.api.Conjur ;
384+ import com.cyberark .conjur.api.Conjur ;
321385
322386// Configured using environment variables
323387Conjur conjur = new Conjur ();
@@ -335,7 +399,7 @@ $ java -jar myConjurClient.jar \
335399 -DCONJUR_AUTHN_API_KEY=<user/host API key - see notes about `CONJUR_AUTHN_URL`>
336400```
337401``` java
338- import net .conjur.api.Conjur ;
402+ import com.cyberark .conjur.api.Conjur ;
339403
340404// Configured using system properties
341405Conjur conjur = new Conjur ();
@@ -354,7 +418,7 @@ $ mvn exec:java \
354418 -Dexec.mainClass="com.myorg.client.App"
355419```
356420``` java
357- import net .conjur.api.Conjur ;
421+ import com.cyberark .conjur.api.Conjur ;
358422
359423// Configured using system properties
360424Conjur conjur = new Conjur ();
@@ -370,7 +434,7 @@ export CONJUR_APPLIANCE_URL=<Conjur endpoint URL>
370434```
371435
372436``` java
373- import net .conjur.api.Conjur ;
437+ import com.cyberark .conjur.api.Conjur ;
374438
375439// Authenticate using provided username/hostname and password/API key. See notes about
376440// `CONJUR_AUTHN_URL` regarding how 'password-or-api-key' is processed.
@@ -389,8 +453,8 @@ export CONJUR_APPLIANCE_URL=<Conjur endpoint URL>
389453```
390454
391455``` java
392- import net .conjur.api.Conjur ;
393- import net .conjur.api.Credentials ;
456+ import com.cyberark .conjur.api.Conjur ;
457+ import com.cyberark .conjur.api.Credentials ;
394458
395459// Authenticate using a Credentials object. See notes about `CONJUR_AUTHN_URL`
396460// regarding how 'password-or-api-key' is processed.
@@ -410,8 +474,8 @@ export CONJUR_APPLIANCE_URL=<Conjur endpoint URL>
410474```
411475
412476``` java
413- import net .conjur.api.Conjur ;
414- import net .conjur.api.Token ;
477+ import com.cyberark .conjur.api.Conjur ;
478+ import com.cyberark .conjur.api.Token ;
415479
416480Token token = Token . fromFile(Paths . get(' path/to/conjur/authentication/token.json' ));
417481Conjur conjur = new Conjur (token);
@@ -428,8 +492,8 @@ export CONJUR_APPLIANCE_URL=<Conjur endpoint URL>
428492export CONJUR_AUTHN_TOKEN_FILE=" path/to/conjur/authentication/token.json"
429493```
430494``` java
431- import net .conjur.api.Conjur ;
432- import net .conjur.api.Token ;
495+ import com.cyberark .conjur.api.Conjur ;
496+ import com.cyberark .conjur.api.Token ;
433497
434498Token token = Token . fromEnv();
435499Conjur conjur = new Conjur (token);
@@ -443,7 +507,7 @@ To use the client, you will first create an instance of the client and then call
443507to send requests to the Conjur API. The most common use case is adding and retrieving
444508a secret from Conjur, so we provide some sample code for this use case below.
445509
446- ### Conjur Client Instance (` net .conjur.api.Conjur` )
510+ ### Conjur Client Instance (` com.cyberark .conjur.api.Conjur` )
447511
448512The client can be instantiated with any of these methods:
449513``` java
@@ -471,7 +535,7 @@ Sets a variable to a specific value based on its ID.
471535
472536Example:
473537``` java
474- import net .conjur.api.Conjur ;
538+ import com.cyberark .conjur.api.Conjur ;
475539
476540Conjur conjur = new Conjur ();
477541conjur. variables(). addSecret(VARIABLE_ID , VARIABLE_VALUE );
@@ -487,7 +551,7 @@ Retireves a variable based on its ID.
487551
488552Example:
489553``` java
490- import net .conjur.api.Conjur ;
554+ import com.cyberark .conjur.api.Conjur ;
491555
492556Conjur conjur = new Conjur ();
493557conjur. variables(). retrieveSecret(" <VARIABLE_ID>" );
@@ -504,7 +568,7 @@ alternative implementation.
504568
505569## Troubleshooting
506570
507- ### ` error: package net .conjur does not exist `
571+ ### ` error: package com.cyberark .conjur does not exist `
508572
509573This is caused by Maven's (or your dependency resolution tooling) inability to find Conjur
510574APIs. Please ensure that you have followed the [ setup] ( #setup ) section to properly install
0 commit comments