Public code repositories to work with Gradle

satya - 8/25/2018, 4:54:11 PM

Public code repositories to work with Gradle

Public code repositories to work with Gradle

Search for: Public code repositories to work with Gradle

satya - 8/25/2018, 4:55:47 PM

what is mavencentral?

what is mavencentral?

Search for: what is mavencentral?

satya - 8/25/2018, 5:01:39 PM

Here is how to browse a maven repository to see what libraries are available

Here is how to browse a maven repository to see what libraries are available

satya - 8/25/2018, 5:05:25 PM

Structure of a maven artifact: Group, artifact, version

Structure of a maven artifact: Group, artifact, version

Search for: Structure of a maven artifact: Group, artifact, version

satya - 8/25/2018, 5:07:31 PM

The structure seem to be


Group
  Artifact 1
      ver 1
      ver 2
  Artifact 2 
      ver 1
      ver 2

satya - 8/25/2018, 5:09:21 PM

Example


Group: Apache HttpComponents
Artifacts:
  HttpClient
  HttpCore
  HttpAsyncClient

Versions in HttpClient
4.5
4.5.6

satya - 8/25/2018, 5:09:39 PM

These artifacts may rely on each other as dependencies

These artifacts may rely on each other as dependencies

satya - 8/25/2018, 5:10:08 PM

What is artifactory?

What is artifactory?

Search for: What is artifactory?

satya - 8/25/2018, 5:16:39 PM

Here is a good explanation of a binary repository of jars, DLLs, npm modules etc.

Here is a good explanation of a binary repository of jars, DLLs, npm modules etc.

satya - 8/25/2018, 5:18:44 PM

Artifactory is a Binary Repository Manager product from Jfrog.

Artifactory is a Binary Repository Manager product from Jfrog.

satya - 8/25/2018, 5:23:03 PM

Here are jfrog artifactory features

Here are jfrog artifactory features

satya - 8/25/2018, 5:27:04 PM

Key take aways

from JFrog started in 2008

Supports all existing varied binary repository formats: Maven, Nuget (dotnet), npm etc.

OSS, Free, Premium, Cloud, On premise

Enterprise Release management

Calls it universal artifact management

Security built in

satya - 8/25/2018, 5:28:03 PM

is there a public JFrog Artifactory?

is there a public JFrog Artifactory?

Search for: is there a public JFrog Artifactory?

satya - 8/25/2018, 5:31:32 PM

Competitors for JFrog Artifactory?

Competitors for JFrog Artifactory?

Search for: Competitors for JFrog Artifactory?

satya - 8/25/2018, 6:15:46 PM

Consider this code


buildscript {
   repositories {
      mavenCentral()
   }
   dependencies {
      classpath "org.apache.httpcomponents:httpclient:4.5.2"
   }
}
ext {
   //Replace this with a suitable URL for your need
   restURl = "http://api.geonames.org/postalCodeSearch?postalcode=9011&maxRows=10&username=demo"
}
//importing java libaray to use in tasks
import org.apache.http.client.methods.*
import org.apache.http.impl.client.*
 
task RESTTest1 {
   doLast {
      println ("Going to be using ${restURl}")
          myfunction(restURl);
   }
}//eof-task

def myfunction(String resturl)
{
      def apacheURL = new HttpGet(restURl)
      def client = HttpClientBuilder.create().build()
      def response = client.execute(apacheURL)
      //printing the response
      println response.getEntity().getContent().getText();
}

satya - 8/25/2018, 6:16:31 PM

This would download from mavencentral


Download https://repo.maven.apache.org/maven2/
     /org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.pom
     /org/apache/httpcomponents/httpcomponents-client/4.5.2/httpcomponents-client-4.5.2.pom
     /org/apache/httpcomponents/project/7/project-7.pom
     /org/apache/apache/13/apache-13.pom
     /org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.pom
     /commons-logging/commons-logging/1.2/commons-logging-1.2.pom
     /org/apache/httpcomponents/httpcomponents-core/4.4.4/httpcomponents-core-4.4.4.pom
     /org/apache/commons/commons-parent/34/commons-parent-34.pom
     /commons-codec/commons-codec/1.9/commons-codec-1.9.pom
     /org/apache/commons/commons-parent/32/commons-parent-32.pom
     /org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar
     /org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar
     /commons-codec/commons-codec/1.9/commons-codec-1.9.jar
     /commons-logging/commons-logging/1.2/commons-logging-1.2.jar
     
Notice the URL

      https://repo.maven.apache.org/maven2/

satya - 8/25/2018, 6:18:42 PM

Notice these 3 things


org.apache.httpcomponents:httpclient:4.5.2

//Group
1. org.apache.httpcomponents

//Artifact
2. httpclient

//version
3. 4.5.2

satya - 8/25/2018, 6:21:07 PM

You will find these three by navigating

Maven Browser: mvnrepository.com

This is a search engine for a number of other repos as well in addition to maven central. But appears to be a nice way to search for repos.

Nicely done!! MvnRepository!!

satya - 8/25/2018, 6:30:42 PM

What is a group in artifacts?

In a simple sense an artifact is a file. It can be a jar, a DLL, or just a text file say.

A jar file may have a name. Like say JDBC or HttpClient, or any other meaningful name. This can be seen as a component, artifact or a jar.

Because maven central is a repository where these jar files (or components) are collected, the repo may want to group them together so that a publisher can classify them into related functionality for easy browsing and identification.

An artifact is a releasable unit (whether one jar or many jars) so it will have any number of versions.

satya - 8/25/2018, 6:33:45 PM

What is a google binary repository?

What is a google binary repository?

Search for: What is a google binary repository?

satya - 8/25/2018, 6:36:18 PM

Here is a bit better intro to artifactory

Here is a bit better intro to artifactory

satya - 8/25/2018, 6:38:25 PM

what is jcenter

what is jcenter

Search for: what is jcenter

satya - 8/25/2018, 6:41:48 PM

Here is JFrog, Bintray, Artifactory public facing browsable code repo

Here is JFrog, Bintray, Artifactory public facing browsable code repo

JCenter is the public repo of JFrog. BinTray looks like another product from JFrog by combingin JCenter capabilities to distribute binaries. Artifactory is the underlying repository in all this for JFrog.

satya - 3/14/2019, 11:52:17 AM

Here is how one would search MVN browser for Hadoop core libraries

Here is how one would search MVN browser for Hadoop core libraries

satya - 3/14/2019, 11:55:51 AM

Here is how you could include those hadoop core libraries this way


// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core
compile group: 'org.apache.hadoop', name: 'hadoop-core', version: '1.2.1'

satya - 3/14/2019, 11:56:52 AM

Here is how to search for all hadoop related repositories in MVNBrowser

Here is how to search for all hadoop related repositories in MVNBrowser