项目作者: jfrog

项目描述 :
Artifactory REST Client Java API bindings
高级语言: Java
项目地址: git://github.com/jfrog/artifactory-client-java.git
创建时间: 2012-07-25T08:37:56Z
项目社区:https://github.com/jfrog/artifactory-client-java

开源协议:Apache License 2.0

下载




# Artifactory Java Client

Scanned by Frogbot

| Branch |Status|
|:———:|:—-:|
|master|Test
|dev|Test

Artifactory Java client provides simple yet powerful Artifactory connection and management within your Java code.

The client allows managing Artifactory repositories, users, groups, permissions and system configuration. It also allows
searches, upload and download artifacts to or from Artifactory and a lot more.

Table of Contents

Getting Started

Add artifactory-java-client-services as a dependency to your build script.

Maven

Add the following dependency to your pom.xml file:

  1. <dependency>
  2. <groupId>org.jfrog.artifactory.client</groupId>
  3. <artifactId>artifactory-java-client-services</artifactId>
  4. <version>RELEASE</version>
  5. </dependency>

Gradle

Add the following snippets to your build.gradle file:

  1. repositories {
  2. mavenCentral()
  3. }
  4. dependencies {
  5. compile 'org.jfrog.artifactory.client:artifactory-java-client-services:+'
  6. }

Examples:

This section includes a few usage examples of the Java client APIs from your application code.

Setting up Artifactory

  1. Artifactory artifactory = ArtifactoryClientBuilder.create()
  2. .setUrl("ArtifactoryUrl")
  3. .setUsername("username")
  4. .setPassword("password")
  5. .build();

Trusting your own self-signed certificates without ignoring any SSL issue:

  1. Artifactory artifactory = ArtifactoryClientBuilder.create()
  2. .setUrl("ArtifactoryUrl")
  3. .setUsername("username")
  4. .setPassword("password")
  5. .setSslContextBuilder(SSLContexts.custom()
  6. .loadTrustMaterial(< your trust strategy here >))
  7. .build();

Adding a request interceptor for logging or modifying outgoing requests:

  1. Artifactory artifactory = ArtifactoryClientBuilder.create()
  2. .setUrl("ArtifactoryUrl")
  3. .setUsername("username")
  4. .setPassword("password")
  5. .addInterceptorLast((request, httpContext) -> {
  6. System.out.println("Artifactory request: " + request.getRequestLine());
  7. })
  8. .build();

Using HTTP proxy:

  1. ProxyConfig proxy = new ProxyConfig();
  2. proxy.setHost("localhost");
  3. proxy.setPort(9090);
  4. Artifactory artifactory = ArtifactoryClientBuilder.create()
  5. .setUrl("ArtifactoryUrl")
  6. .setUsername("username")
  7. .setPassword("password")
  8. .setProxy(proxy)
  9. .setNoProxyHosts(".gom.com,*.jfrog.com,.not.important.host:443")
  10. .build();

NOTE: If hosts to ignore proxy are not set through “setNoProxyHosts(String noProxyHosts)” method,
they are set through NO_PROXY env variable.

Uploading and downloading artifacts

Uploading an Artifact
  • Using java.io.File as source:
    1. java.io.File file = new java.io.File("fileToUpload.txt");
    2. File result = artifactory.repository("RepoName").upload("path/to/newName.txt", file).doUpload();
  • Using an InputStream as source:
    1. try (InputStream inputStream = Files.newInputStream(Paths.get("fileToUpload.txt"))) {
    2. File result = artifactory.repository("RepoName").upload("path/to/newName.txt", inputStream).doUpload();
    3. }
Upload and explode an Archive
  1. java.io.File file = new java.io.File("fileToUpload.txt");
  2. File result = artifactory.repository("RepoName").upload("path/to/newName.txt", file).doUploadAndExplode(true)
Uploading an Artifact with Properties
  1. java.io.File file = new java.io.File("fileToUpload.txt");
  2. File deployed = artifactory.repository("RepoName")
  3. .upload("path/to/newName.txt", file)
  4. .withProperty("color", "blue")
  5. .withProperty("color", "red")
  6. .doUpload();
Uploading and Artifact with an UploadListener

Can be used for tracking the progress of the current upload:

  1. java.io.File file = new java.io.File("fileToUpload.txt");
  2. File result = artifactory.repository("RepoName")
  3. .upload("path/to/newName.txt", file)
  4. .withListener((bytesRead, totalBytes) -> {
  5. System.out.println("Uploaded " + format.format((double) bytesRead / totalBytes));
  6. })
  7. .doUpload();

The code snippet above would print the percentage of the current upload status.

Important: The totalBytes is calculated from the size of the input File. In case the source is a java.io.File object, the upload will use the File.length() to determine the total number of bytes. If the source is an InputStream, the total size of the upload must be specified using the withSize(long size) method.
e.g.:

  1. Path sourceFile = Paths.get("fileToUpload.txt");
  2. try (InputStream inputStream = Files.newInputStream(sourceFile)) {
  3. File result = artifactory.repository("RepoName")
  4. .upload("path/to/newName.txt", inputStream)
  5. .withSize(Files.size(sourceFile))
  6. .withListener((bytesRead, totalBytes) -> {
  7. System.out.println("Uploaded " + format.format((double) bytesRead / totalBytes));
  8. })
  9. .doUpload();
  10. }
Copy an Artifact by SHA-1
  1. java.io.File file = new java.io.File("fileToUpload.txt");
  2. String sha1 = calcSha1(file)
  3. File deployed = artifactory.repository("RepoName")
  4. .copyBySha1("path/to/newName.txt", sha1)
  5. .doUpload();
Downloading an Artifact
  1. InputStream iStream = artifactory.repository("RepoName")
  2. .download("path/to/fileToDownload.txt")
  3. .doDownload();
Downloading an Artifact with non-mandatory Properties
  1. InputStream iStream = artifactory.repository("RepoName")
  2. .download("path/to/fileToDownload.txt")
  3. .withProperty("colors", "red")
  4. .doDownload();
Downloading Artifact with mandatory properties
  1. InputStream iStream = artifactory.repository("RepoName")
  2. .download("path/to/fileToDownload.txt")
  3. .withMandatoryProperty("colors", "red")
  4. .doDownload();
Downloading Artifact with custom headers
  1. Map<String, String> headers = new HashMap<>();
  2. headers.put("Range", "bytes=0-10");
  3. InputStream iStream = artifactory.repository("RepoName")
  4. .download("path/to/fileToDownload.txt")
  5. .doDownloadWithHeaders(headers);

File, Folder and Repository Info

File Info
  1. File file = artifactory.repository("RepoName").file("path/to/file.txt").info();
  2. boolean isFile = file.isFolder();
  3. long fileSize = file.getSize();
  4. String fileUri = file.getDownloadUri();
  5. String md5Checksum = file.getChecksums().getMd5();
  6. String sha1Checksum = file.getChecksums().getSha1();
  7. String sha2Checksum = file.getChecksums().getSha256();
Folder Info
  1. Folder folder = artifactory.repository("RepoName").folder("path/to/folder").info();
  2. boolean isFolder = folder.isFolder();
  3. String repoName = folder.getRepo();
  4. String folderPath = folder.getPath();
  5. int childrenItemsSize = folder.getChildren().size();
Repository Info
  1. Repository repo = artifactory.repository("RepoName").get();
  2. String repoKey = repo.getKey();
  3. String desc = repo.getDescription();
  4. String layout = repo.getRepoLayoutRef();
  5. RepositoryType repoClass = repo.getRclass();
  6. RepositorySettings settings = repo.getRepositorySettings();
  7. PackageType packageType = settings.getPackageType();
  8. if (PackageType.bower == packageType) {
  9. BowerRepositorySettings settingsForBower = (BowerRepositorySettings) settings;
  10. String bowerRegistryUrl = settingsForBower.getBowerRegistryUrl();
  11. }
Storage Summary Info
  1. BinariesSummary binariesSummary = artifactory.storage().getStorageInfo().getBinariesSummary();
  2. FileStorageSummary fileStorageSummary = artifactory.storage().getStorageInfo().getFileStoreSummary();
  3. for (RepositorySummary repoSummary : artifactory.storage().getStorageInfo().getRepositoriesSummaryList()) {
  4. repoSummary.getRepoKey();
  5. }
Available Searches
  1. Searches repositories(String... repositories);
  2. Searches artifactsByName(String name);
  3. Searches artifactsCreatedSince(long sinceMillis);
  4. Searches artifactsCreatedInDateRange(long fromMillis, long toMillis);
  5. Searches artifactsByGavc();
  6. Searches artifactsLatestVersion();
  7. List<AqlItem> artifactsByFileSpec(FileSpec fileSpec);
Searching Files in Repositories
  1. List<RepoPath> searchItems = artifactory.searches()
  2. .repositories("RepoName", "RepoName2")
  3. .artifactsByName("prefixedWith*.txt")
  4. .doSearch();
  5. for (RepoPath searchItem : searchItems) {
  6. String repoKey = searchItem.getRepoKey();
  7. String itemPath = searchItem.getItemPath();
  8. }
Searching Files by Properties
  1. List<RepoPath> searchItems = artifactory.searches()
  2. .repositories("RepoName", "RepoName2")
  3. .itemsByProperty()
  4. .property("released")
  5. .property("colors", "r*?")
  6. .doSearch();
  7. for (RepoPath searchItem : searchItems) {
  8. String repoKey = searchItem.getRepoKey();
  9. String itemPath = searchItem.getItemPath();
  10. }
Searching Files by GAVC
  1. List<RepoPath> results = artifactory.searches().artifactsByGavc()
  2. .groupId("com.example")
  3. .artifactId("com.example.test")
  4. .version("1.0.0")
  5. .classifier("zip")
  6. .doSearch();
  7. for (RepoPath searchItem : searchItems) {
  8. String repoKey = searchItem.getRepoKey();
  9. String itemPath = searchItem.getItemPath();
  10. }
Searching Files by GAVC and Repository
  1. List<RepoPath> results = artifactory.searches().artifactsByGavc()
  2. .groupId("com.example")
  3. .artifactId("com.example.test")
  4. .repositories("liba-release-local")
  5. .doSearch();
  6. for (RepoPath searchItem : searchItems) {
  7. String repoKey = searchItem.getRepoKey();
  8. String itemPath = searchItem.getItemPath();
  9. }
Searching Latest Version by GAVC and Repository
  1. String latestVersion = artifactory.searches().artifactsLatestVersion()
  2. .groupId("com.example")
  3. .artifactId("com.example.test")
  4. .repositories("liba-release-local")
  5. .doRawSearch();
Searching Files Using File Specs
  1. FileSpec fileSpec = FileSpec.fromString("{\"files\": [{\"pattern\": \"liba-release-local/*test*\"}]}");
  2. List<AqlItem> results = artifactory.searches().artifactsByFileSpec(fileSpec);

Builds

Get All Builds
  1. AllBuilds allBuilds = artifactory.builds().getAllBuilds();
Get Build Runs
  1. BuildRuns buildRuns = artifactory.builds().getBuildRuns("BuildName");

Managing Items (files and folders)

Getting Items
  1. ItemHandle fileItem = artifactory.repository("RepoName").file("path/to/file.txt");
  2. ItemHandle folderItem = artifactory.repository("RepoName").folder("path/to/folder");
Copying Items
  1. ItemHandle item =
  2. ...
  3. ItemHandle newItem = item.copy("ToRepoName", "path/to/item");
Moving Items
  1. ItemHandle item =
  2. ...
  3. ItemHandle newItem = item.move("ToRepoName", "path/to/item");
Deleting Items
  1. String result = artifactory.repository("RepoName").delete("path/to/item");

Managing Repositories

List all Repositories
  1. import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.LOCAL;
  2. import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.REMOTE;
  3. import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.VIRTUAL;
  4. import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.FEDERATED;
  5. ...
  6. List<LightweightRepository> localRepoList = artifactory.repositories().list(LOCAL);
  7. List<LightweightRepository> remoteRepoList = artifactory.repositories().list(REMOTE);
  8. List<LightweightRepository> virtualRepoList = artifactory.repositories().list(VIRTUAL);
  9. List<LightweightRepository> federatedRepoList = artifactory.repositories().list(FEDERATED);
Creating Repositories
  1. DebianRepositorySettingsImpl settings = new DebianRepositorySettingsImpl();
  2. settings.setDebianTrivialLayout(true);
  3. Repository repository = artifactory.repositories()
  4. .builders()
  5. .localRepositoryBuilder()
  6. .key("NewRepoName")
  7. .description("new local repository")
  8. .repositorySettings(settings)
  9. .build();
  10. String result = artifactory.repositories().create(2, repository);
Creating Federated Repositories
  1. DockerRepositorySettings settings = new DockerRepositorySettingsImpl();
  2. List<FederatedMember> federatedMembers = new ArrayList<FederatedMember>();
  3. FederatedMember federatedMember = new FederatedMember("http://<JPDURL>/artifactory/"+NewRepoName, true);
  4. federatedMembers.add(federatedMember);
  5. Repository repository = artifactory.repositories()
  6. .builders()
  7. .federatedRepositoryBuilder()
  8. .members(federatedMembers)
  9. .key("NewRepoName")
  10. .description("new federated repository")
  11. .repositorySettings(settings)
  12. .build();
  13. String result = artifactory.repositories().create(2, repository);
Repository Settings

For choosing your repository characteristic, use the right settings, each one of them possess the relevant attributes
available in Artifactory.

Example for using generic repository with maven layout:

  1. RepositorySettings settings = new GenericRepositorySettingsImpl()
  2. settings.setRepoLayout("maven-2-default")
Updating Repositories
  1. Repository repository = artifactory.repository("RepoName").get();
  2. RepositorySettings settings = repository.getRepositorySettings();
  3. if (PackageType.debian == settings.getPackageType()) {
  4. DebianRepositorySettingsImpl settingsForDebian = (DebianRepositorySettingsImpl) settings;
  5. settingsForDebian.setDebianTrivialLayout(false);
  6. }
  7. Repository updatedRepository = artifactory.repositories()
  8. .builders()
  9. .builderFrom(repository)
  10. .description("new_description")
  11. .build();
  12. String result = artifactory.repositories().update(updatedRepository);
Deleting Repositories
  1. String result = artifactory.repository("RepoName").delete();
Deleting all Repository Replications
  1. // Method supported for local and remote repositories
  2. artifactory.repository("RepoName").replications.delete()
Creating or replacing a replication on a local repository
  1. LocalReplication replication = new LocalReplicationBuilderImpl()
  2. .url("http://hostname1:port/artifactory/RepoName")
  3. .socketTimeoutMillis(30000)
  4. .username("john.doe")
  5. .password("secret")
  6. .enableEventReplication(false)
  7. .enabled(false)
  8. .cronExp("0 0 0/2 * * ?")
  9. .syncDeletes(true)
  10. .syncProperties(true)
  11. .syncStatistics(true)
  12. .pathPrefix("")
  13. .repoKey("RepoName")
  14. .build();
  15. artifactory.repository("RepoName").getReplications().createOrReplace(replication);
Creating or replacing a replication on a remote repository
  1. RemoteReplication replication = new RemoteReplicationBuilderImpl()
  2. .enabled(false)
  3. .cronExp("0 0 0/2 * * ?")
  4. .syncDeletes(true)
  5. .syncProperties(true)
  6. .repoKey("RepoName")
  7. .build();
  8. artifactory.repository("RepoName").getReplications().createOrReplace(replication)
Managing Xray properties
  1. Repository repository = artifactory.repository("RepoName").get();
  2. XraySettings xraySettings = repository.getXraySettings();
  3. xraySettings.setXrayIndex(true)
  4. Repository updatedRepository = artifactory.repositories()
  5. .builders()
  6. .builderFrom(repository)
  7. .description("new_description")
  8. .build();
  9. String result = artifactory.repositories().update(updatedRepository);
Custom Package Type and Properties
  1. CustomPackageTypeImpl customPackageType = new CustomPackageTypeImpl("name");
  2. CustomRepositorySettingsImpl settings = new CustomRepositorySettingsImpl(customPackageType);
  3. Map<String, Object> customProperties = new HashMap<>();
  4. customProperties.put("key", "value");
  5. Repository repository = artifactory.repositories()
  6. .builders()
  7. .localRepositoryBuilder()
  8. .key("NewRepoName")
  9. .description("new local repository")
  10. .repositorySettings(settings)
  11. .customProperties(customProperties)
  12. .build();
  13. String result = artifactory.repositories().create(2, repository);
Smart Remote Repositories

A smart remote repository is a remote
repository that proxies a repository from another instance of Artifactory. Smart remote repositories are configured with
four additional properties.

  1. RemoteRepository remoteRepository = (RemoteRepository) artifactory.repository("SmartRemoteRepoName").get();
  2. ContentSync contentSync = remoteRepository.getContentSync();
  3. contentSync.setEnabled(true);
  4. // Report Statistics
  5. contentSync.getStatistics().setEnabled(true);
  6. // Sync Properties
  7. contentSync.getProperties().setEnabled(true);
  8. // Source Absence Detection
  9. contentSync.getSource().setOriginAbsenceDetection(true);
  10. Repository updatedRepository = artifactory.repositories()
  11. .builders()
  12. .builderFrom(remoteRepository)
  13. .listRemoteFolderItems(true) // List Remote Folder Items
  14. .build();
  15. String result = artifactory.repositories().update(updatedRepository);

Managing Users

Geting User Information
  1. User user = artifactory.security().user("userName");
  2. String name = user.getName();
  3. String email = user.getEmail();
  4. Collection<String> groups = user.getGroups();
  5. Date loggedIn = user.getLastLoggedIn();
  6. boolean profileUpdatable = user.isProfileUpdatable();
  7. boolean isAdmin = user.isAdmin();
  8. boolean internalPass = user.isInternalPasswordDisabled();
  9. String realm = user.getRealm();
List all User Names
  1. Collection<String> userNames = artifactory.security().userNames();
  2. for (String userName : userNames) {
  3. User user = artifactory.security().user(userName);
  4. }
Creating or Updating Users
  1. UserBuilder userBuilder = artifactory.security().builders().userBuilder();
  2. User user = userBuilder.name("userName")
  3. .email("user@mail.com")
  4. .admin(false)
  5. .profileUpdatable(true)
  6. .password("password")
  7. .build();
  8. artifactory.security().createOrUpdate(user);
Deleting Users
  1. String result = artifactory.security().deleteUser("userName");

Managing User Groups

Get User Group Information
  1. Group group = artifactory.security().group("groupName");
  2. String description = group.getDescription();
  3. boolean isAutoJoin = group.isAutoJoin();
  4. boolean isAdminPrivileges = group.isAdminPrivileges();
List all User Groups
  1. List<String> groupNames = artifactory.security().groupNames();
  2. for (String groupName : groupNames) {
  3. Group group = artifactory.security().group(groupName);
  4. }
Creating or Updating User Groups
  1. Group group = artifactory.security().builders().groupBuilder()
  2. .name("groupName")
  3. .autoJoin(true)
  4. .adminPrivileges(true)
  5. .description("new group")
  6. .build();
  7. artifactory.security().createOrUpdateGroup(group);
Creating or Updating User External Groups

When using LDAP integration
or realm User plugin, it could be
interesting to preload groups (and permissions) before any user login :

  1. String realmAttributes = "ldapGroupName=groupName;groupsStrategy=STATIC;groupDn=cn=GROUPNAME,ou=foo,o=bar";
  2. Group group = artifactory.security().builders().groupBuilder()
  3. .name("groupName")
  4. .description("GROUPNAME")
  5. .realm("ldap")
  6. .realmAttributes(realmAttributes)
  7. .build();
  8. artifactory.security().createOrUpdateGroup(group);

NB: The realmAttributes depends of realm implementation ; so firstly,
use LDAP Groups Synchronization
to import some groups manually in Artifactory, and analyse a JSON GET on one of this/these group(s) to understand the
content of realmAttributes parameter.

Deleting User Groups
  1. artifactory.security().deleteGroup("groupName");

Permissions

Getting Item Permissions
  1. Set<ItemPermission> itemPermissions = artifactory.repository("RepoName")
  2. .file("path/to/file.txt")
  3. .effectivePermissions();
  4. for (ItemPermission itemPermission : itemPermissions) {
  5. RepoPath repoPath = itemPermissions.getRepoPath();
  6. List<Privilege> privileges = getPrivileges();
  7. Subject subject = getSubject();
  8. boolean isAllowedTo = isAllowedTo(ADMIN, DELETE, DEPLOY, ANNOTATE, READ);
  9. }
Getting Permission Target information
  1. PermissionTarget permissionTarget = artifactory.security().permissionTarget("permissionName");
  2. String name = permissionTarget.getName()
  3. );
  4. String exclude = permissionTarget.getExcludesPattern();
  5. String include = permissionTarget.getIncludesPattern();
  6. List<String> repos = permissionTarget.getRepositories();
  7. List<ItemPermission> perm = permissionTarget.getItemPermissions();
Listing all Permission Targets
  1. List<String> permissionTargetNames = artifactory.security().permissionTargets();
  2. for (String permissionTargetName : permissionTargetNames) {
  3. PermissionTarget permissionTarget = artifactory.security().permissionTarget(permissionTargetName);
  4. }
Creating a Permission Target
  1. Principal userAdmin = artifactory.security().builders().principalBuilder()
  2. .name("admin")
  3. .privileges(Privilege.ADMIN)
  4. .build();
  5. Principal groupTest = artifactory.security().builders().principalBuilder()
  6. .name("myTest")
  7. .privileges(Privilege.DEPLOY, Privilege.READ)
  8. .build();
  9. Principals principals = artifactory.security().builders().principalsBuilder()
  10. .users(userAdmin)
  11. .groups(groupTest)
  12. .build();
  13. PermissionTarget permissionTarget = artifactory.security().builders().permissionTargetBuilder()
  14. .name("myPermission")
  15. .principals(principals)
  16. .repositories("some-repository")
  17. .includesPattern("com/company/**,org/public/**")
  18. .build();
  19. artifactory.security().createOrReplacePermissionTarget(permissionTarget);

System

Artifactory version
  1. Version version = artifactory.system().version();
  2. String version = version.getVersion();
  3. String revision = version.getRevision();
  4. String license = version.getLicense();
  5. List<String> addons = version.getAddons();
Getting System Configuration XML
  1. String xml = artifactory.system().configuration();
Setting System Configuration XML
  1. artifactory.system().configuration(xml);
Getting System Configuration YAML
  1. String yaml = artifactory.system().yamlConfiguration();
Setting System Configuration YAML
  1. artifactory.system().yamlConfiguration(yaml);

Rest API

Executing an Artifactory REST API

  1. ArtifactoryRequest repositoryRequest = new ArtifactoryRequestImpl().apiUrl("api/repositories")
  2. .method(ArtifactoryRequest.Method.GET)
  3. .responseType(ArtifactoryRequest.ContentType.JSON);
  4. ArtifactoryResponse response = artifactory.restCall(repositoryRequest);
  5. // Get the response headers
  6. org.apache.http.Header[] headers = response.getAllHeaders();
  7. // Get the response status information
  8. org.apache.http.StatusLine statusLine = response.getStatusLine();
  9. // A convenience method for verifying success
  10. assert response.isSuccessResponse();
  11. // Get the response raw body
  12. String rawBody = response.getRawBody();
  13. // If the the response raw body has a JSON format, populate an object with the body content,
  14. // by providing a object's class.
  15. List<Map<String, String>> parsedBody = response.parseBody(List.class);

Executing an Artifactory streaming REST API

  1. ArtifactoryRequest repositoryRequest = new ArtifactoryRequestImpl().apiUrl("api/repositories")
  2. .method(ArtifactoryRequest.Method.GET)
  3. .responseType(ArtifactoryRequest.ContentType.JSON);
  4. ArtifactoryStreamingResponse response = artifactory.streamingRestCall(repositoryRequest);
  5. // Get the response headers
  6. org.apache.http.Header[] headers = response.getAllHeaders();
  7. // Get the response status information
  8. org.apache.http.StatusLine statusLine = response.getStatusLine();
  9. // A convenience method for verifying success
  10. assert response.isSuccessResponse();
  11. // Get the response raw body using input stream
  12. String rawBody = IOUtils.toString(response.getInputStream(), StandardCharsets.UTF_8);

Building and Testing the Sources

The code is built using Gradle and includes integration tests.

Since the tests may use features which have been recently added to Artifactory, such as new package types, it is best to
run the tests against the latest release of Artifactory. Some tests may therefore fail otherwise. Those tests can be
manually commented out in that case.

If you’d like to build the code without tests, run:

  1. gradle clean build -x test

Please follow these steps to build and test the code:

  • Startup an Artifactory-Pro instance.
  • Set the CLIENTTESTS_ARTIFACTORY_URL, CLIENTTESTS_ARTIFACTORY_USERNAME and CLIENTTESTS_ARTIFACTORY_PASSWORD
    environment variables with your Artifactory URL, username and password.
  • Run:
  1. gradle clean test

Example Projects

We created sample projects
demonstrating how to use the Artifactory Java Client.

Contributing Code

We welcome community contribution through pull requests.

Guidelines

  • If the existing tests do not already cover your changes, please add tests..
  • Pull requests should be created on the dev branch.

License

This client is available under the Apache License, Version 2.0.

Release Notes

The release notes are available here.