You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/03/18 13:08:57 UTC

[incubator-dlab] branch bugfix-DLAB-524 created (now 7cf976e)

This is an automated email from the ASF dual-hosted git repository.

bhliva pushed a change to branch bugfix-DLAB-524
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at 7cf976e  DLAB-524 added possibility to use bundles from maven repo during java dependencies installation

This branch includes the following new commits:

     new 7cf976e  DLAB-524 added possibility to use bundles from maven repo during java dependencies installation

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/01: DLAB-524 added possibility to use bundles from maven repo during java dependencies installation

Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bhliva pushed a commit to branch bugfix-DLAB-524
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 7cf976ed5469707f6ea6c9d8bfda76ed16d0c5f6
Author: bhliva <bo...@epam.com>
AuthorDate: Mon Mar 18 15:08:46 2019 +0200

    DLAB-524 added possibility to use bundles from maven repo during java dependencies installation
---
 .../dlab/backendapi/service/impl/MavenCentralLibraryService.java    | 6 +++---
 .../backendapi/service/impl/MavenCentralLibraryServiceTest.java     | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
index 6f8947f..b7cbce8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
@@ -56,7 +56,7 @@ public class MavenCentralLibraryService implements ExternalLibraryService {
 	}
 
 	private LibraryDTO getMavenLibrary(String groupId, String artifactId, String version) {
-		final String query = and(artifactQuery(artifactId), groupQuery(groupId), versionQuery(version), jarPackage());
+		final String query = and(artifactQuery(artifactId), groupQuery(groupId), versionQuery(version), jarOrBundlePackage());
 		return restClient.get(URI.create(String.format(SEARCH_API_QUERY_FORMAT, query)),
 				MavenSearchArtifactResponse.class)
 				.getArtifacts()
@@ -79,8 +79,8 @@ public class MavenCentralLibraryService implements ExternalLibraryService {
 		return "v:" + QUOTE_ENCODED + version + QUOTE_ENCODED;
 	}
 
-	private String jarPackage() {
-		return "p:" + QUOTE_ENCODED + "jar" + QUOTE_ENCODED;
+	private String jarOrBundlePackage() {
+		return "(p:" + QUOTE_ENCODED + "jar" + QUOTE_ENCODED + "%20OR%20p:" + QUOTE_ENCODED + "bundle" + QUOTE_ENCODED + ")";
 	}
 
 	private String and(String... strings) {
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java
index 5e94ba8..c42076d 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java
@@ -61,7 +61,8 @@ public class MavenCentralLibraryServiceTest {
 		assertEquals("version", libDTO.getVersion());
 
 		verify(client).get(refEq(URI.create("/solrsearch/select?q=a:%22artifactId%22+AND+g" +
-						":%22groupId%22+AND+v:%22version%22+AND+p:%22jar%22&rows=20&wt=json&core=gav&p=jar")),
+						":%22groupId%22+AND+v:%22version%22+AND+(p:%22jar%22%20OR%20p:%22bundle%22)" +
+						"&rows=20&wt=json&core=gav&p=jar")),
 				eq(MavenSearchArtifactResponse.class));
 	}
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org