Public code repositories to work with Gradle

Public code repositories to work with Gradle

Search for: Public code repositories to work with Gradle

what is mavencentral?

Search for: what is mavencentral?

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

Structure of a maven artifact: Group, artifact, version

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


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

Group: Apache HttpComponents
Artifacts:
  HttpClient
  HttpCore
  HttpAsyncClient

Versions in HttpClient
4.5
4.5.6

These artifacts may rely on each other as dependencies

What is artifactory?

Search for: What is artifactory?

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

Artifactory is a Binary Repository Manager product from Jfrog.

Here are jfrog artifactory features

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

is there a public JFrog Artifactory?

Search for: is there a public JFrog Artifactory?

Competitors for JFrog Artifactory?

Search for: Competitors for JFrog Artifactory?


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();
}

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/

org.apache.httpcomponents:httpclient:4.5.2

//Group
1. org.apache.httpcomponents

//Artifact
2. httpclient

//version
3. 4.5.2

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!!

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.

What is a google binary repository?

Search for: What is a google binary repository?

Here is a bit better intro to artifactory

what is jcenter

Search for: what is jcenter

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.

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


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

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