Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
JFrog Pipelines Step committed Feb 13, 2022
2 parents a122dab + 748f65c commit f450d7f
Show file tree
Hide file tree
Showing 35 changed files with 582 additions and 78 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,13 @@ String result = artifactory.repository("RepoName").delete("path/to/item");
import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.LOCAL;
import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.REMOTE;
import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.VIRTUAL;
import static org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl.FEDERATED;
...
List<LightweightRepository> localRepoList = artifactory.repositories().list(LOCAL);
List<LightweightRepository> remoteRepoList = artifactory.repositories().list(REMOTE);
List<LightweightRepository> virtualRepoList = artifactory.repositories().list(VIRTUAL);
List<LightweightRepository> federatedRepoList = artifactory.repositories().list(FEDERATED);
```

##### Creating Repositories
Expand All @@ -427,6 +429,26 @@ Repository repository = artifactory.repositories()
String result = artifactory.repositories().create(2, repository);
```


##### Creating Federated Repositories

```groovy
DockerRepositorySettings settings = new DockerRepositorySettingsImpl();
List<FederatedMember> federatedMembers = new ArrayList<FederatedMember>();
FederatedMember federatedMember = new FederatedMember("http://<JPDURL>/artifactory/"+NewRepoName, true);
federatedMembers.add(federatedMember);
Repository repository = artifactory.repositories()
.builders()
.federatedRepositoryBuilder()
.members(federatedMembers)
.key("NewRepoName")
.description("new federated repository")
.repositorySettings(settings)
.build();
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
Expand Down Expand Up @@ -823,7 +845,7 @@ 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*
* Set the *CLIENTTESTS_ARTIFACTORY_URL*, *CLIENTTESTS_ARTIFACTORY_USERNAME* and *CLIENTTESTS_ARTIFACTORY_PASSWORD*
environment variables with your Artifactory URL, username and password.
* Run:

Expand Down
35 changes: 3 additions & 32 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes

## 2.11.0 (February 13, 2022)
- Support for managing Federated Repositories

## 2.10.0 (January 9, 2022)
- Allow uploading artifacts with progress.
- Add builds API for downloading basic build information from Artifactory.
Expand All @@ -8,68 +11,54 @@
- Dependencies updates.

## 2.9.2 (May 2, 2021)

- Migrate project to Maven Central.
- Add missing properties to repository builders.
- Support providing SSLContext in the client builder.

## 2.9.1 (April 15, 2020)

- Remove Authorization header on cross host redirection.

## 2.9.0 (March 11, 2020)

- Support for Go repositories.

## 2.8.6 (October 10, 2019)

- Build thin JAR instead of Uber JAR.
- Added support for Helm repositories.

## 2.8.5 (September 12, 2019)

- Fix failure to upload large files.

## 2.8.4 (July 02, 2019)

- Added Artifactory requests interceptor.

## 2.8.3 (March 31, 2019)

- Added PyPIRegistryUrl configuration to pyPI repository settings.

## 2.8.2 (March 14, 2019)

- Allow full configuration of Apache HTTP Client SSLContext.

## 2.8.1 (December 10, 2018)

- Added atomic header to doUploadAndExplode.
- Added support for virtual debian repositories.

## 2.8.0 (September 27, 2018)

- Added support for the Conda package type.
- Enhanced the API to Support the OPTIONS HTTP method.

## 2.7.0 (August 13, 2018)

- Migrate the client build to use JDK 8.
- Added new yamlConfiguration API.
- Added support for maven force authentication
- Added support for Nuget v3.

## 2.6.2 (May 23, 2018)

- Upgraded project dependencies.

## 2.6.1 (May 09, 2018)

- Removed Xray APIs following changes in Artifactory 5.10
- Bug fixes

## 2.6.0 (February 21, 2018)

- JttpBuilder replaced with the native Apache Http Client.
- Many groovy classes were converted to java.
- RestCall API was modified, and now returns ArtifactoryResponse, instead of throwing exceptions on errors.
Expand All @@ -79,89 +68,71 @@
- Encoding fixes.

## 2.5.2 (August 03, 2017)

- Added custom package type and properties support

## 2.5.1 (July 10, 2017)

- Fixed EqualsAndHashCode implementation for repositories.

## 2.5.0 (June 22, 2017)

- Added sha256 for File info
- clientTlsCertificate added to RemoteRepository
- enableFileListsIndexing added to local RpmRepositorySettings

## 2.4.0 (May 30, 2017)

- Support concurrent requests
- Added RPM package type support
- Copy artifacts by sha1
- Fixed building Artifactory URL in ArtifactoryClientBuilder

## 2.3.5 (April 27, 2017)

- Authentication token support.
- "ignoreSSLIssues" option added to the Artifactory client.

## 2.3.4 (March 15, 2017)

- Fix support for JDK7
- Support searching latest version by GAVC and repository

## 2.3.3 (February 15, 2017)

- Added support for chef and puppet package types
- Added URLENC content-type to requests
- Support the Docker 'maxUniqueTags' repository property
- Permission principals support

## 2.3.2 (December 18, 2016)

- Smart remote repo support

## 2.3.1 (December 08, 2016)

- Conan package type support.

## 2.3.0 (October 30, 2016)

- Jfrog Xray properties support

## 2.2.0 (October 16, 2016)

- PHP composer support
- Added jvm up time support to system info query
- Support for external user groups

## 2.1.0 (September 19, 2016)

- GAVC Search
- YUM virtual repository support

## 2.0.0 (July 20, 2016)

- Changes and improvements to the Repositories API.

## 1.2.2 (January 28, 2016)

- https://github.com/JFrogDev/artifactory-client-java/pull/69

## 1.2.1 (January 28, 2016)

- Repositories API fixes.

## 1.2.0 (December 24, 2015)

- Added storage-info and system-info API.
- A few improvements and bug fixes.

## 1.1.0 (November 12, 2015)

- https://www.jfrog.com/jira/browse/RTFACT-6025

## 1.0.0 (October 27, 2015)

- Support proxy configuration for remote repositories
- Adding configuration to RemoteRepository creation with the client
- Support Artifactory 4 repository package type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package org.jfrog.artifactory.client.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* @author Siva Singaravelan
* @since 01/05/2022
*/
public class FederatedMember {
private String url;
private boolean enabled;

public void setUrl(String url) {
this.url = url;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

@JsonCreator
public FederatedMember(@JsonProperty("url") String url, @JsonProperty("enabled") boolean enabled) {
this.url = url;
this.enabled = enabled;
}

public String getUrl() {
return url;
}

public boolean isEnabled() {
return enabled;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

FederatedMember federatedMember = (FederatedMember) o;

return url.equals(federatedMember.url) ;
}

@Override
public int hashCode() {
return 31 * url.hashCode();
}

@Override
public String toString() {
return "FederatedMember{" +
"url='" + url + '\'' +
", enabled='" + enabled + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.jfrog.artifactory.client.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.List;

/**
* @author Siva Singaravelan
* @since 01/07/2022
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public interface FederatedRepository extends Repository, NonVirtualRepository {

List<FederatedMember> getMembers();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
* @author jbaruch
* @since 30/07/12
* @author Siva Singaravelan
* @since 01/07/2022
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public interface LightweightRepository {
Expand All @@ -16,5 +16,7 @@ public interface LightweightRepository {

String getUrl();

String getPackageType();

String getConfiguration();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.jfrog.artifactory.client.model.builder;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.jfrog.artifactory.client.model.FederatedMember;
import org.jfrog.artifactory.client.model.FederatedRepository;

import java.util.List;

/**
* @author Siva Singaravelan
* @since 13/08/12
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public interface FederatedRepositoryBuilder extends NonVirtualRepositoryBuilder<FederatedRepositoryBuilder, FederatedRepository> {

FederatedRepositoryBuilder members(List<FederatedMember> members);

List<FederatedMember> getMembers();
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jfrog.artifactory.client.model.builder;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.jfrog.artifactory.client.model.FederatedRepository;
import org.jfrog.artifactory.client.model.LocalRepository;
import org.jfrog.artifactory.client.model.RemoteRepository;
import org.jfrog.artifactory.client.model.VirtualRepository;
Expand All @@ -20,6 +21,10 @@ public interface RepositoryBuilders {

LocalRepositoryBuilder builderFrom(LocalRepository from);

FederatedRepositoryBuilder federatedRepositoryBuilder();

FederatedRepositoryBuilder builderFrom(FederatedRepository from);

VirtualRepositoryBuilder virtualRepositoryBuilder();

VirtualRepositoryBuilder builderFrom(VirtualRepository from);
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ allprojects {
}
}

apply plugin: 'maven'

apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'

Expand Down Expand Up @@ -59,15 +59,15 @@ subprojects {
targetCompatibility = 1.8

dependencies {
compile('org.apache.httpcomponents:httpclient:4.5.13') {
implementation('org.apache.httpcomponents:httpclient:4.5.13') {
exclude group: 'commons-codec', module: 'commons-codec'
}
compile 'commons-codec:commons-codec:1.13'
compile 'org.apache.commons:commons-lang3:3.12.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.12.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.12.6'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.12.6'
compile 'org.jfrog.filespecs:file-specs-java:1.1.1'
implementation 'commons-codec:commons-codec:1.13'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.6'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.6'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.6'
implementation 'org.jfrog.filespecs:file-specs-java:1.1.1'
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
currentVersion=2.10.0
currentVersion=2.10.x-SNAPSHOT
2 changes: 1 addition & 1 deletion release/pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pipelines:
ORG_GRADLE_PROJECT_sonatypePassword=$int_mvn_central_password
ORG_GRADLE_PROJECT_signingKey=$(echo $int_mvn_central_signingKey | base64 -d)
ORG_GRADLE_PROJECT_signingPassword=$int_mvn_central_signingPassword
./gradlew clean build publishToSonatype closeSonatypeStagingRepository -x test
./gradlew clean build publishToSonatype closeAndReleaseSonatypeStagingRepository -x test
# Update next development version
- git clean -fd
Expand Down
Loading

0 comments on commit f450d7f

Please sign in to comment.